Custodian
Invoice

Invoice

An invoice is a payment request: a deposit address, a token, and an expected amount. When a matching deposit arrives, the invoice is marked paid. All endpoints require authentication.

Create Invoice

POST /api/v1/invoices

Request Body

FieldTypeRequiredDescription
amountnumberYesExpected amount (> 0)
tokenCodestringYesToken to receive, e.g. USDT
referencestringNoYour external reference
expiresAtstring (RFC3339)NoDefaults to the app's configured expiry
{
  "amount": 100,
  "tokenCode": "USDT",
  "reference": "order-555"
}

Response 201

{
  "data": {
    "id": "inv_abc123",
    "expiresAt": "2026-01-01T01:00:00Z",
    "token": {
      "tokenCode": "USDT",
      "network": "ethereum",
      "tokenAddress": "0x...",
      "symbol": "USDT",
      "decimals": 6
    },
    "walletId": "wal_1",
    "walletNetwork": "ethereum",
    "recipientAddress": "0xabc...",
    "recipientAddressType": "evm",
    "amount": 100,
    "amountInDecimals": "100000000",
    "reference": "order-555",
    "status": "pending",
    "createdAt": "2026-01-01T00:00:00Z"
  }
}

status can be pending, paid, expired, cancelled, or failed.

CodeMeaning
400Validation error, inactive token, or invalid amount/expiry
404Token not found
409No available wallet

List Invoices

GET /api/v1/invoices

Query Parameters

ParamTypeDefaultDescription
pageint1Page number
limitint10Items per page
statusstringFilter by status
startDatestringRFC3339 or YYYY-MM-DD
endDatestringRFC3339 or YYYY-MM-DD
walletIdstringFilter by wallet
tokenCodestringFilter by token

Response 200

{
  "data": {
    "items": [ /* invoice objects */ ],
    "total": 42,
    "page": 1,
    "limit": 10
  }
}

Get Invoice

GET /api/v1/invoices/:id{ "data": { /* invoice */ } }

CodeMeaning
404Invoice not found

Cancel Invoice

POST /api/v1/invoices/:id/cancel (no body). Returns the updated invoice with status: "cancelled".

CodeMeaning
404Invoice not found
409Only pending invoices can be cancelled