SET API · Invoices
Create an invoice
POST/v1/invoices
An invoice SET matches automatically. Paid in stablecoin to a Cash-Out Address, it gets a unique payableAmount (the amount plus a tag under one cent) whose last decimals identify it. Paid by bank to a virtual account, the invoice number is the reference to quote. On a match SET names the invoice's payer for the Travel Rule and writes a balanced journal entry.
Headers
Idempotency-Keystring- Optional. The same key and body run once; a replay answers with
Idempotent-Replayed: true. Kept 24 hours.
Body
customerstringrequired- The merchant itself.
numberstringrequired- Your invoice number: 1–40 of letters, digits, space and
_ . / # -. amountdecimal stringrequired- Up to two decimals; at least the Cash-Out minimum for stablecoin invoices.
currency"usd" | "eur" | "gbp"required- A USD invoice needs a USDC address paying USD; a EUR invoice a EURC address paying EUR. Cross-currency invoices are refused.
pay{ cashOutAddress } | { virtualAccount }required- Where the payer pays.
payerobject- Who will pay (same body as
/sender); sealed at rest and sent to the provider when the payment matches. dueAtISO time- Due date (informational; no automatic expiry).
Notes
- Matching only labels money; it never changes where money goes. Stablecoin: the exact on-chain amount (rule
exact), else a transaction hash the payer claimed (claim), elseunmatched. Bank: the invoice number in the reference with the exact amount (reference), else the only open invoice of that amount (amount). - Not yet built: a hosted pay page, automatic expiry, per-payer accounts, wire memo matching.
Errors
400 number_invalid400 amount_invalid400 amount_too_small400 currency_invalid400 pay_invalid400 due_at_invalid409 invoice_number_taken409 currency_mismatch409 payable_amount_exhausted403 invoices_merchant_only401 api_key_required401 api_key_invalid401 api_key_wrong_mode401 api_key_expired403 scope_missing403 platform_api_paused429 rate_limited503 api_disabled