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
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
idstringrequired- The reference's id,
pref_and 32 hex characters. It must be open or expired; any other state answers 409payment_reference_closed.
Headers
Idempotency-Keystring- Any unique string, so a retry runs once. See Idempotency.
Body
cashOutPaymentstringrequired- 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 409payment_elsewhere) and settling no other reference (otherwise 409payment_taken).
Notes
- Needs a key with the
writescope. - 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 409sender_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_requireduntil 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_only404 payment_reference_unknown409 payment_reference_closed403 restricted404 cash_out_payment_unknown409 payment_elsewhere409 payment_taken409 amount_unknown409 sender_required