Invoices

Create and manage crypto payment invoices. Each invoice generates a unique deposit address.

POST/v1/invoices

Create a new payment invoice. Returns a checkout URL for the customer.

Request body

FieldTypeRequiredDescription
tokenIdintegerYesToken ID (get from /v1/public/tokens)
amountFiatnumberYesAmount in fiat currency
fiatCurrencystringNo3-letter currency code, default USD
descriptionstringNoInvoice description, max 512 chars
merchantReferencestringNoYour internal reference ID
redirectUrlstringNoURL to redirect after payment
cancelUrlstringNoURL to redirect on cancellation
metadataobjectNoArbitrary key/value pairs
ttlSecondsintegerNoInvoice expiry in seconds
{
  "ok": true,
  "data": {
    "id": "clxyz123...",
    "publicId": "pub_abc123",
    "status": "pending",
    "checkoutUrl": "https://oxinpayments.com/checkout/pub_abc123",
    "amountFiat": "50.00",
    "fiatCurrency": "USD",
    "amountCrypto": "47.321000",
    "tokenSymbol": "USDT",
    "chainCode": "BSC",
    "depositAddress": "0xabc...",
    "expiresAt": "2026-06-21T13:00:00Z",
    "createdAt": "2026-06-21T12:00:00Z"
  }
}
GET/v1/invoices/:id

Retrieve a single invoice by ID.

GET/v1/invoices

List invoices with optional filters.

Query parameters

ParamDescription
pagePage number (default 1)
limitResults per page (max 100)
statusFilter: pending, completed, expired, cancelled
dateFromISO date filter start
dateToISO date filter end

Invoice statuses

StatusDescription
pendingAwaiting payment
detectingTransaction detected, awaiting confirmations
confirmingConfirmations in progress
completedPayment confirmed and swept
expiredCustomer did not pay within TTL
underpaidPayment received but below required amount
cancelledManually cancelled