Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-18
Browse: SET API

Invoice a customer, accept bank, USDC or card, match the payment, export to your ledger (UC-B-02)

Status: current as of 2026-11-18.

Who this is for

A business with a business account that sends invoices and wants each payment, whichever way it arrives, matched to its invoice and written to its books. The result is an invoice that turns paid on its own, a balanced journal entry per payment, and a monthly export for your ledger.

Before you start

  • Account: a business account on the SET API. Invoices are for a business invoicing its own customers.
  • Key scopes: write (invoice, link, claim, match, ledger mapping) and read (lists and export). Send the key as Authorization: Bearer set_test_… or set_live_….
  • Your business's customer id (cus_…), verified by SET's provider.
  • Where the invoice is paid, one of:
  • Card payment through a payment link needs your card account to be taking payments (Card payments).

By API

  1. Create the invoice. One currency per invoice: usd, eur or gbp. POST /v1/invoices · Header: Idempotency-Key ``json { "customer": "cus_…", "number": "…", "amount": "250.00", "currency": "usd", "pay": { "cashOutAddress": "…" }, "dueAt": "…" } ` For bank payers send "pay": { "virtualAccount": "…" } instead. payer (optional) is { "type": "business" | "individual", "name": "…", "address": { "country": "…" } }; SET seals it at rest and names it as the sender when a payment matches. Next step uses: id, state (open), payableAmount, pay.amount, pay.reference. Paid in stablecoin, the payer sends exactly payableAmount: its last decimals identify the invoice. Paid by bank, the payer quotes the invoice number (pay.reference`).
  1. Give the payer one link. The link carries the amount still due and the invoice's currency, and offers card when the invoice is in USD (send "card": false to offer none). One link per invoice: asking again returns the same link. POST /v1/payment_links · Header: Idempotency-Key ``json { "invoice": "inv_…" } ` Next step uses: url, card, active`.
  1. A payer who sent stablecoin can name the transaction, before or after it arrives. Stablecoin invoices only. POST /v1/invoices/{id}/payment_claims · Header: Idempotency-Key ``json { "txHash": "0x…" } ` Next step uses: claim.matched, state`.
  1. Read what matched, and match the rest by hand. Matches happen by themselves. Read paid invoices with GET /v1/invoices?state=paid and payments that matched nothing with GET /v1/payments?state=unmatched (fields id, kind, receivedAmount). Then match one: POST /v1/payments/{id}/match · Header: Idempotency-Key ``json { "invoice": "inv_…" } ` Next step uses: state (matched), invoice, rule (manual`).
  1. Name your ledger accounts once. Each key is a journal role; each value is your account's name or number (1 to 80 characters). Roles: clearing, receivable, tag_income, overpayment, bank, fees_set, fees_provider, rounding, returned_wallet, card_clearing, card_sales, refunds, wallet, stablecoin_wallet, escrow_funds, payable, prefunding_payable (the last four for SET Escrow). PUT /v1/ledger_mapping ``json { "receivable": "…", "clearing": "…" } ` Next step uses: mapping (roles you leave out keep defaults`).
  1. Export the month. format is csv (default), json, or qbo for a QuickBooks Online journal import. GET /v1/journal_entries/export?month=2026-10&format=csv Answer: a CSV file, or with json the fields month and entries.

In SET Console

  1. In SET Console, open Merchant View › Invoices and press Send an invoice (or Workflows › Send an invoice). Fill in Your account (customer), Invoice number, Amount, Currency, Due date (optional) and Paid into account, then Review and Confirm. The receipt shows Invoice, Number and its state. The console form makes a bank-paid invoice (pay.virtualAccount); an invoice paid to a Cash-Out Address: Console: not available. Use the API call.
  2. A payment link for an invoice: Console: not available. Use the API call. (The Create a payment link workflow is demo-only and makes a card link for an amount, not for an invoice.)
  3. Naming a transaction for an invoice: Console: not available. Use the API call.
  4. Matching a payment by hand: Console: not available. Use the API call.
  5. Ledger mapping: Console: not available. Use the API call.
  6. Export: Console: not available. Use the API call. Merchant View › Accounting › Journal entries lists the entries, and Export CSV under the table saves the rows shown, not the month's export file.

Signed in, the API Builder in the console's top bar sends any of the calls above as you, within your role.

Check it worked

  • GET /v1/invoices/{id}: state is paid (or short, over), receivedAmount, and payments with each match's rule.
  • GET /v1/journal_entries: one receipt entry per matched payment.
  • In SET Console: Merchant View › Invoices › Invoices shows the invoice's state; Overview lists an open invoice past its due date under what needs attention.
  • Webhooks: invoice.created, payment.matched, payment.unmatched and invoice.<state> (for example invoice.paid); payment_link.created for a new link. See Webhooks and events.

If it fails

All codes: Errors.

Changes

  • 2026-11-18: Docs, OpenAPI and Postman synced to the wallet at: SET Escrow journal entries and SET Close.
  • 2026-11-18: SET Docs lead with the SET Crypto API Suite, then the SET API, then SET Direct Deposit.
  • 2026-11-16: Every use case step by step, by API and in the console.
  • 2026-11-16: The modernized API Reference, the sandbox-key form, Direct Deposit without a revenue share.