Skip to content

Invoices

An invoice is a request for a fixed amount, paid on the hosted checkout to a fresh address created for that invoice. Confirmed payments are credited to your U Xa balance.

Create an invoice

POST/api/v1/invoices
FieldTypeDescription
amountstringRequired. Decimal amount, for example "25.00".
currencystringUSD (default) or any active ISO 4217 fiat code from GET /api/v1/fx (or GET /api/v1/coins fiat), or a coin symbol such as BTC or USDT to bill in crypto. For fiats other than USD, EUR, GBP and TRY, the USD rate is locked when the invoice is created. If that rate is missing or older than an hour, the server returns 422 fx_unavailable.
methodsstring[]Optional subset of your enabled methods, for example ["btc","usdt_trc20"].
methodstringOptional. Pre-select one method; the checkout opens directly on the payment step.
order_idstringYour reference, up to 120 characters.
descriptionstringShown to the customer, up to 255 characters.
success_urlstringWhere the customer goes after paying.
cancel_urlstringShown as “Back to store”.
webhook_urlstringOverrides your account webhook for this invoice.
customer_emailstringStored with the invoice for your records.
expires_inintegerMinutes until expiry, 10–1440. Default 30.
metadataobjectAny JSON object up to 4 KB, returned in responses and webhooks.

The invoice object

{
  "id": "inv_7fK2mQ9xYp3RtB8wLs4N",
  "status": "confirming",
  "amount": "25",
  "currency": "USD",
  "description": "2 x Ethiopia Guji",
  "order_id": "1042",
  "methods": ["btc", "eth", "usdt_trc20"],
  "payment": {
    "method": "usdt_trc20",
    "symbol": "USDT",
    "network": "Tron (TRC-20)",
    "address": "TQx9…4hP2",
    "amount": "25.02",
    "amount_units": "25020000",
    "received": "25.02",
    "rate": "0.9992",
    "txid": "a6aa97db04c3…",
    "confirmations": 1,
    "confirmations_required": 1,
    "explorer_url": "https://tronscan.org/#/transaction/a6aa97db04c3…",
    "uri": "TQx9…4hP2"
  },
  "checkout_url": "https://uxa.world/pay/inv_7fK2mQ9xYp3RtB8wLs4N",
  "created_at": "2026-10-22T15:00:00Z",
  "expires_at": "2026-10-22T15:30:00Z",
  "paid_at": null,
  "metadata": null
}

payment is null until a method is chosen. The crypto amount is locked at that moment and stays valid until expires_at.

Statuses

StatusMeaning
pendingWaiting for the customer to pay.
confirmingThe full amount was seen on-chain and is waiting for confirmations.
paidConfirmed. Fulfil the order.
partialLess than the requested amount arrived. The customer can send the rest before expiry.
expiredNot paid in time. Payments arriving up to 6 hours late are still matched and move the invoice to paid.
cancelledCancelled by you before any payment.

Retrieve an invoice

GET/api/v1/invoices/{id}

Also triggers a fresh blockchain check (at most every 12 seconds).

List invoices

GET/api/v1/invoices?status=paid&limit=25

Cancel an invoice

POST/api/v1/invoices/{id}/cancel

Only pending invoices without any detected payment can be cancelled.

Addresses and settlement

Every invoice gets its own deposit address the first time the customer picks a coin, so a payment can only ever match one invoice. Underpayments up to 0.5% are accepted as paid; this tolerance is configurable.

When the payment has enough confirmations, the amount received is credited to your balance and the payment fee is deducted in the same coin. The invoice in the app and in GET /api/v1/app/invoices shows the credited amount, the fee and the net amount.