Developers
Build with confidence
Clean RESTful API, comprehensive webhooks, full sandbox environment, and detailed documentation. Integrate crypto payments in hours, not weeks.
Quick Start
Three steps to integration
Install & Configure
Install our SDK or use the REST API directly. Generate your API keys from the dashboard and configure your webhook endpoint.
# Install via your preferred method
npm install xiwire
# or
pip install xiwireCreate Invoices
Generate payment invoices with unique deposit addresses. Each invoice is independently tracked with automatic amount matching and expiry management.
// Create a payment invoice
const xiwire = require('xiwire')('your_api_key');
const invoice = await xiwire.invoices.create({
asset: "USDT",
chain: "TRON",
network: "TRC20",
amount: "500.00",
metadata: {
client_id: "CLIENT-001",
order_ref: "ORD-2026-0142"
},
webhook_url: "https://your-site.com/webhooks",
expires_in: 3600
});
console.log(invoice.address);
// => "TJYvSK...GnK9D"Handle Webhooks
Receive real-time notifications for deposits, confirmations, and status changes. Process events asynchronously and credit your users' accounts instantly.
// Handle webhook events
app.post('/webhooks', (req, res) => {
const event = req.body;
switch (event.type) {
case 'invoice.paid':
// Credit user's account
creditAccount(event.data.metadata.client_id,
event.data.amount);
break;
case 'invoice.expired':
// Handle expiry
notifyUser(event.data.metadata.client_id);
break;
}
res.json({ received: true });
});API Features
Built for developers
RESTful API
Predictable resource-oriented URLs with standard HTTP methods. All responses in JSON with consistent error handling.
Webhook Events
Real-time notifications for invoice status changes, deposits, confirmations, and more. Retry logic with exponential backoff.
Sandbox Environment
Full-featured test environment that mirrors production. Test all API endpoints without real transactions.
API Key Authentication
Simple API key-based authentication. Generate multiple keys with different permissions from your dashboard.
Idempotent Operations
Safe to retry requests. Invoice creation and other operations are idempotent to prevent duplicate processing.
Consistent Schemas
Every resource follows consistent patterns. Pagination, filtering, and sorting work the same across all endpoints.
API Reference
Core endpoints
Everything you need to accept and manage crypto payments.
/api/v1/invoices/api/v1/invoices/:id/api/v1/invoices/api/v1/withdrawals/api/v1/wallets/balances/api/v1/transactionsReady to start building?
Create an account, generate your API keys, and start testing in our sandbox environment. Free to get started.