Prove every payment at month end (SET Close) (UC-A-09)
Status: current as of 2026-11-18.
Who this is for
A finance team that must show, each month, that every payment moved as recorded, and keep the signed-off month as it was. When you finish, the month is matched against your bank's file, every gap is resolved or explained, and the month is locked under a hash you can re-check later.
Before you start
- Account: a SET API platform account on the SET API plan. A SET API business account runs the same calls.
- Keys: one key with
writeto add files, resolve exceptions and prepare; a different key holdingapproveto lock;readfor every GET. Both keys belong to your business, so this is two-key approval, not an independent attestation. - Switch: SET Close is switched on in staging and production; where it is off, every call answers
403 close_off. - What must exist: the month must have ended (UTC), and the month before must be locked before this one can be.
By API
SET Close reads SET's own ledger by itself on SET's schedule: payouts, deposits, Cash-Out payments, Direct Deposit payee cash-outs, wallet withdrawals, executed SET Escrow releases and refunds, and journal entries.
- Add your bank's file as a source.
POST /v1/close/sources·Idempotency-Key``json { "kind": "bank_csv", "label": "…" }`The next step uses:id`.
- Upload the CSV as the body, with
Content-Type: text/csv. One header row, comma-separated, a dot for decimals, at most 1,000 rows and 1,000,000 bytes; required columnsid, date, amount, currency, direction(inorout). Uploading the same file again adds nothing.POST /v1/close/sources/{source}/imports·Idempotency-Key``text id,date,amount,currency,direction …,2026-10-01,250.00,usd,in`The next step uses:matched,exceptions,rejections,unchanged`.
- Read the matches and the gaps for the month.
GET /v1/close/matches?period=2026-10andGET /v1/close/exceptions?period=2026-10The next step uses: each exception'sidandreason.
- Resolve each exception: link it to a record, ignore it with a note, or leave it open with a note.
POST /v1/close/exceptions/{id}/resolve·Idempotency-Key``json { "action": "ignore", "note": "…" }`To link, send{ "action": "link", "record": "cr_…" }`.
- Prepare the month with the
writekey; no body.POST /v1/close/periods/2026-10/prepare·Idempotency-KeyThe next step uses: the period's state,prepared.
- Lock it with a different key holding
approve; no body.POST /v1/close/periods/2026-10/approve·Idempotency-KeyThe answer to check: the period's state,locked.
- Keep the month, and re-check it at any time:
verifyrecomputes the lock's hash and its link to the month before.GET /v1/close/periods/2026-10/package?format=csvandGET /v1/close/periods/2026-10/verify
In SET Console
- Add a source. Console: not available. Use the API call.
- Upload a bank file. Console: not available. Use the API call.
- Read matches and exceptions. Console: not available. Use the API call.
- Resolve an exception. Console: not available. Use the API call.
- Prepare the month. Console: not available. Use the API call.
- Lock the month. Console: not available. Use the API call.
- In Platform View, Reports shows Close periods, with each period's state. Downloading the package and verifying: Console: not available. Use the API call.
Check it worked
GET /v1/close/periods/2026-10: the state islocked, with both hashes.GET /v1/close/periods/2026-10/verifyrecomputes the hash.- In Platform View, Reports, Close periods.
- Webhooks:
close.exception.opened,close.exception.resolved,close.period.prepared,close.period.locked(with itssnapshotHashandpriorHash).
If it fails
403 close_off: SET Close is off for this deployment.400 source_kind_invalid,400 source_label_invalid,409 close_sources_full: adding a source.400 csv_invalid(with therowandreason),413 import_too_large,409 source_not_uploadable,400 id_strategy_invalid,400 filename_invalid: the upload.429 close_budget_reached: the business's daily allowance of writes is used; the whole import is refused.400 note_required,400 action_invalid,400 record_invalid,409 record_in_use,409 match_changed,409 not_an_exception: resolving an exception.409 period_not_ended: the month has not ended (UTC).409 period_locked: the month is already locked.409 period_not_prepared: lock only a prepared month.409 same_approver: the key that prepared the month, or one rotated from or to it, cannot lock it.409 prior_period_open: the month before is not locked; months lock in order.409 period_changed: the month changed after it was prepared.409 period_not_locked:verifyneeds a locked month.401 api_key_invalid,403 scope_missing,429 rate_limited: the key, its scopes, or the rate limit.
All codes: Errors. Retrying a POST safely: Idempotency.
Related
- SET Close: matching and month-end close
- Payment references
- SET Close moves no money and signs nothing: it reads. "Matched" means the records SET holds agree; it is not an audit opinion or an attestation. References and counterparties from your files are kept as a keyed hash and a sealed copy, never as text.
- One year-end tax and audit pack
- All use cases
Changes
- 2026-11-18: Docs, OpenAPI and Postman synced to the wallet at: SET Escrow journal entries and SET Close.
- 2026-11-16: Every use case step by step, by API and in the console.
- 2026-11-16: The modernized API Reference, the sandbox-key form, Direct Deposit without a revenue share.