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 Crypto API Suite

SET Crypto API Suite · Cash out to a bank

Reserve an order's payable amount on a Cash-Out Address (a platform account)

POST/v1/payment_references

Key scope: write · Platform accounts · Success: 201

Reserves an order's payable amount on one of your customers' Cash-Out Addresses. The answer's payableAmount is the order amount plus a tag under one cent, unique among the address's open references; a payment of exactly that amount settles the reference. A payer, when given, is sent as the settling payment's sender for the Travel Rule.

Headers

Idempotency-Key string
Any unique string, so a retry runs once. See Idempotency.

Body

cashOutAddress stringrequired
The id of one of your customers' Cash-Out Addresses (otherwise 404 cash_out_address_unknown). A retired address answers 409 cash_out_address_retired. Conversion Addresses are not taken.
amount stringrequired
The order total, at most 9 integer digits and 2 decimals, for example "1250.00"; at least the Cash-Out minimum (400 amount_too_small).
currency string
The stablecoin the payer sends. On an ordinary address it is the address's own currency (usdc by default, or eurc), and naming another answers 400 currency_invalid. On a currency "any" address it is required (400 currency_required) and must be one the address takes; only a payment in it settles the reference.
expiresAt stringrequired
An ISO 8601 date-time after now and at most 30 days ahead (otherwise 400 expires_at_invalid).
payer object
The payer, in the sender shape: type ("business" or "individual"), name, and an address with streetLine1, streetLine2, city, state, postalCode and an ISO 3166-1 alpha-3 country (for example USA). It is stored sealed and never shown back.
metadata object
Your own key-value pairs, returned on the reference.

Notes

  • Needs a key with the write scope.
  • Payment references are for platform accounts: a business (merchant) account's key gets 403 payment_references_platform_only.
  • A restricted business or customer is refused.
  • Storing a payer needs a deployment that can seal it; otherwise 503 payment_reference_payer_unavailable: leave payer out and name each payment's sender.
  • The payer must send exactly payableAmount: the order amount plus a tag in decimals 3 to 6, so the payer must be able to send 6-decimal amounts.
  • In the answer payer is a boolean: true means a payer is stored and will be sent as the payment's Travel Rule sender.
  • id and reference are the same value.
  • Event payment_reference.created is written.
  • Without a payer, the reference settles only a payment whose sender is already named; otherwise the payment waits to be matched by hand with POST /v1/payment_references/{id}/match.
  • The reference names no chain: it is on whatever chain its Cash-Out Address is on.
  • The example was made with a sandbox key.
  • This example is a recorded run of SET's own code (wallet release e9b03447) with a sandbox key; ids and times are that run's.

Errors

  • 403 payment_references_platform_only
  • 400 conversion_address_not_supported
  • 404 cash_out_address_unknown
  • 409 cash_out_address_retired
  • 404 customer_unknown
  • 403 restricted
  • 400 currency_invalid
  • 400 currency_required
  • 400 amount_invalid
  • 400 amount_too_small
  • 400 expires_at_invalid
  • 400 sender_type_invalid
  • 400 sender_invalid
  • 503 payment_reference_payer_unavailable
  • 409 payable_amount_exhausted

All codes: Errors.