SET API · SET Close
Records: each side's view of a payment, with gross, fee and net
GET/v1/close/records
Lists records: each source's view of one payment, with gross, fee, net and the amount the bank leg settled. A record comes from SET's own ledger, an uploaded bank or provider file, SET's chain read or a connected accounting ledger. Newest first, paged by createdBefore.
Query parameters
kind"provider" | "rail" | "chain" | "book"- Only records of this kind:
provider(what the payment provider reported),rail(the bank's side),chain(the transfer on chain),book(the business's connected ledger). Anything else is 400kind_invalid. sourcestring- A source id (
src_…): only records from that source. periodstringYYYY-MM: only records in this month. An impossible month is 400period_invalid.customerstring- A customer id (
cus_…): only that customer's records. unmatched"true" | "false"true: only records that no match names.createdBeforestring- The last answer's
nextCreatedBefore, passed back unchanged, or an ISO 8601 time: records created strictly before it. limitinteger- 1 to 100; 50 by default.
Notes
- SET Close is switched on per deployment; when it is off, every
/v1/closecall answers 403close_offafter the key is checked.GET /v1/capabilitiesshows it asfeatures.close. - Needs a key with the
readscope. Platform and business keys can both call it. - A record is one side's view of one payment.
gross,feeandnetare{amount, currency}, the amount a decimal string in the currency's own decimals (USDC has 6, USD has 2).settledis what the bank leg paid.chainis{txHash, chain, check}when a record carries a transaction hash;checkis SET's own reading of it. It is null otherwise.trustisproviderfor a record SET's ledger built from the provider's report, andassertedfor an uploaded row, which is never proof on its own.hasReferenceandhasCounterpartysay only that one is on file. The text is not returned here; only the period's package shows it.- Records from SET's own ledger appear after SET's scheduled pass, which runs every 10 minutes. Uploaded rows appear when the file is uploaded.
- The example was made with a sandbox key (
sandbox: true); its two payments were dated last month so the month could be closed. - 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 close_off400 created_before_invalid400 kind_invalid400 source_invalid400 period_invalid400 customer_invalid