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 Crypto API Suite · Cash out to a bank

Settle a reference with a Cash-Out payment by hand

POST/v1/payment_references/{id}/match

Key scope: write · Platform accounts · Success: 200

Settles a reference by hand with a Cash-Out payment made to the reference's own address. The payment's amount against payableAmount decides the state: equal is matched, less is underpaid (with shortBy), more is overpaid (with overBy); rule is manual.

Path parameters

id stringrequired
The reference's id, pref_ and 32 hex characters. It must be open or expired; any other state answers 409 payment_reference_closed.

Headers

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

Body

cashOutPayment stringrequired
The id of one of your Cash-Out payments (otherwise 404 cash_out_payment_unknown), made to the reference's own Cash-Out Address (otherwise 409 payment_elsewhere) and settling no other reference (otherwise 409 payment_taken).

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.
  • The payment's sender must be named first (POST /v1/cash_out_payments/{id}/sender), unless the reference carries a payer; otherwise 409 sender_required.
  • The provider must have reported the payment's amount; otherwise 409 amount_unknown.
  • An open or an expired reference can be matched; a repeat on a matched reference answers 409 payment_reference_closed.
  • Matching only labels money: what reached the address is paid to the customer's bank either way.
  • The example was made with a sandbox key: a sandbox payment from a wallet nobody named was refused with 409 sender_required until its sender was named.
  • 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
  • 404 payment_reference_unknown
  • 409 payment_reference_closed
  • 403 restricted
  • 404 cash_out_payment_unknown
  • 409 payment_elsewhere
  • 409 payment_taken
  • 409 amount_unknown
  • 409 sender_required

All codes: Errors.