SET Crypto API Suite · Cash out to a bank
A payment reference
GET/v1/payment_references/{id}
Reads one payment reference: its state, the payment that settled it and how it was matched. Reading an open reference past its expiresAt moves it to expired.
Path parameters
idstringrequired- The reference's id,
pref_and 32 hex characters. Any other id answers 404payment_reference_unknown.
Notes
- Needs a key with the
readscope. - Payment references are for platform accounts, for reads as well as writes: a business (merchant) account's key gets 403
payment_references_platform_only. - Before the payment arrives the reference reads
state: "open", andnexttells you what to ask the payer to send. rulesays how it was settled:exact(the payable amount arrived),cents(the order amount without its tag arrived, so the state isunderpaidoroverpaid, withshortByoroverBy), ormanual(matched by hand).senderStateis the settling payment's Travel Rule state; here the reference's payer was sent as the sender. In the sandbox it readssimulated.- Reading an open reference past its
expiresAtmoves it toexpiredand writes eventpayment_reference.expired. - The example was made with a sandbox key: a sandbox payment of exactly the payable amount, from a wallet SET had not seen, settled it.
- 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_unknown