Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-21 · wallet release 7d8a79fb
Browse: SET API

SET API · Invoices

Create an invoice

POST/v1/invoices

Key scope: write · Business accounts · Success: 201

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-Key string
Optional. The same key and body run once; a replay answers with Idempotent-Replayed: true. Kept 24 hours.

Body

customer stringrequired
The merchant itself.
number stringrequired
Your invoice number: 1–40 of letters, digits, space and _ . / # -.
amount decimal 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.
payer object
Who will pay (same body as /sender); sealed at rest and sent to the provider when the payment matches.
dueAt ISO 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), else unmatched. 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_invalid
  • 400 amount_invalid
  • 400 amount_too_small
  • 400 currency_invalid
  • 400 pay_invalid
  • 400 due_at_invalid
  • 409 invoice_number_taken
  • 409 currency_mismatch
  • 409 payable_amount_exhausted
  • 403 invoices_merchant_only
  • 401 api_key_required
  • 401 api_key_invalid
  • 401 api_key_wrong_mode
  • 401 api_key_expired
  • 403 scope_missing
  • 403 platform_api_paused
  • 429 rate_limited
  • 503 api_disabled

All codes: Errors.