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

01

Install & Configure

Install our SDK or use the REST API directly. Generate your API keys from the dashboard and configure your webhook endpoint.

terminal
# Install via your preferred method
npm install xiwire
# or
pip install xiwire
02

Create Invoices

Generate payment invoices with unique deposit addresses. Each invoice is independently tracked with automatic amount matching and expiry management.

create-invoice.js
// 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"
03

Handle Webhooks

Receive real-time notifications for deposits, confirmations, and status changes. Process events asynchronously and credit your users' accounts instantly.

webhooks.js
// 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.

POST/api/v1/invoices
GET/api/v1/invoices/:id
GET/api/v1/invoices
POST/api/v1/withdrawals
GET/api/v1/wallets/balances
GET/api/v1/transactions

Ready to start building?

Create an account, generate your API keys, and start testing in our sandbox environment. Free to get started.