The Invoice object
Every invoice returned by the API is anInvoiceResponse object.
UUID that uniquely identifies this invoice.
UUID of the merchant that owns this invoice.
Your own reference / idempotency key, if provided at creation time.
null when omitted.SwiftPay-generated 10-character human-readable reference (e.g.
A3FX9KZ2QP). Safe to share with customers.One deposit address per supported network. Each element contains:
networkId— chain identifier (e.g.ethereum,polygon,sepolia)network— human-readable chain name (e.g.Ethereum Mainnet)address— EVM address to which the customer should send funds
EVM treasury address that receives settled funds after the platform fee.
null if not set.On-chain contract address of the accepted token.
Ticker symbol of the accepted token (e.g.
USDC, USDT).Chain on which the first payment was detected.
null until at least one payment is received.Requested payment amount as a decimal string (e.g.
"100.00").Amount not yet confirmed on-chain.
null when no transactions are in-flight.Total confirmed amount received so far.
Protocol fee transferred to SwiftPay at settlement. Calculated at invoice creation time from
amountExpected using the per-token fee configuration (configurable rate with optional ceiling).Total amount forwarded to
recipient at settlement — the full received balance minus platformFee. Any overpayment above amountExpected is included here.Amount received above
amountExpected. Forwarded to recipient alongside the net payment at settlement (no additional fee is charged on the overpayment). "0" when the exact amount or less was received.Invoice lifecycle status. One of:
pending— awaiting first paymentpartial— partially paidpaid— fully paid, funds not yet settledcompleted— funds settled torecipient
ISO 8601 timestamp after which the invoice will no longer accept payments.
null if no expiry set.ISO 8601 timestamp when the invoice was created.
ISO 8601 timestamp when the invoice reached
paid status. null until then.ISO 8601 timestamp when the invoice reached
completed status. null until then.Arbitrary key-value pairs you attached at creation time. Empty object
{} when none provided.Array of on-chain payment records associated with this invoice. Empty array until a payment is detected.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /v1/invoices | Create a new invoice |
GET | /v1/invoices | List all invoices for the authenticated merchant |
GET | /v1/invoices/:id | Retrieve a single invoice by ID |
GET | /v1/invoices/:id/transactions | List transactions for an invoice |
X-Swift-Key header:
Create an invoice
POST /v1/invoices Creates a new invoice and derives a unique deposit address on each supported network. If you supply anexternalRef that was used before with identical parameters, the original invoice is returned with HTTP 200 instead of 201 (idempotent creation).
Request body
Token symbol to accept. Must be a token supported by SwiftPay (e.g.
"USDC", "USDT").Requested payment amount in the token’s major unit (e.g.
100 for 100 USDC). Must be greater than 0.List of
networkId values to generate deposit addresses for (e.g. ["ethereum", "polygon"]). Omit or pass an empty array to use all chains that support the requested token.Your own idempotency key (e.g. an order ID). If the same
externalRef is submitted again with the same parameters, the existing invoice is returned unchanged. If parameters differ, a 409 error is returned.EVM address to receive settled funds after the protocol fee. If omitted, funds are held until a recipient is configured in dashboard settings.
ISO 8601 timestamp for invoice expiry (e.g.
"2026-03-11T12:00:00Z"). After this time the invoice will no longer accept payments.Arbitrary key-value pairs stored alongside the invoice and returned in all responses. Useful for linking to your internal records.
Response
Returns the created Invoice object with HTTP201, or 200 when an idempotent match is found.
Error codes
| Status | Error | Condition |
|---|---|---|
400 | invalid request body | Missing required fields, amountExpected ≤ 0, or malformed JSON |
400 | unknown chain | One or more values in chains are not recognised |
400 | no supported chains for token | The requested token has no supported chains (after filtering) |
400 | invalid recipient address | recipient is not a valid EVM address |
401 | unauthorized | X-Swift-Key header is missing or the key is invalid / revoked |
409 | externalRef conflict | externalRef was used before but with different parameters |
List invoices
GET /v1/invoices Returns a paginated list of all invoices belonging to the authenticated merchant, ordered bycreatedAt descending.
Query parameters
Maximum number of invoices to return. Accepted range:
1–100.Number of invoices to skip (cursor-style pagination).
Filter by invoice status. One of:
pending, partial, paid, completed.Response
Error codes
| Status | Error | Condition |
|---|---|---|
401 | unauthorized | X-Swift-Key header is missing or the key is invalid / revoked |
Get an invoice
GET /v1/invoices/:id Retrieves a single invoice by its UUID.Path parameters
UUID of the invoice to retrieve (e.g.
b3f1c2d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d).Response
Returns the Invoice object with HTTP200.
Error codes
| Status | Error | Condition |
|---|---|---|
400 | invalid invoice id | :id is not a valid UUID |
401 | unauthorized | X-Swift-Key header is missing or the key is invalid / revoked |
404 | invoice not found | No invoice with this ID belongs to the authenticated merchant |
List invoice transactions
GET /v1/invoices/:id/transactions Returns all on-chain payment transactions detected for a given invoice. Transactions are returned in the order they were detected.Path parameters
UUID of the invoice whose transactions you want to retrieve.
Response
Error codes
| Status | Error | Condition |
|---|---|---|
400 | invalid invoice id | :id is not a valid UUID |
401 | unauthorized | X-Swift-Key header is missing or the key is invalid / revoked |
404 | invoice not found | No invoice with this ID belongs to the authenticated merchant |
Error response format
All errors share the same envelope:traceId when contacting support@swiftpay.finance to help diagnose issues.