Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-18
Browse: SET API

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 write to add files, resolve exceptions and prepare; a different key holding approve to lock; read for 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.

  1. Add your bank's file as a source. POST /v1/close/sources · Idempotency-Key ``json { "kind": "bank_csv", "label": "…" } ` The next step uses: id`.
  1. 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 columns id, date, amount, currency, direction (in or out). 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`.
  1. Read the matches and the gaps for the month. GET /v1/close/matches?period=2026-10 and GET /v1/close/exceptions?period=2026-10 The next step uses: each exception's id and reason.
  1. 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_…" }`.
  1. Prepare the month with the write key; no body. POST /v1/close/periods/2026-10/prepare · Idempotency-Key The next step uses: the period's state, prepared.
  1. Lock it with a different key holding approve; no body. POST /v1/close/periods/2026-10/approve · Idempotency-Key The answer to check: the period's state, locked.
  1. Keep the month, and re-check it at any time: verify recomputes the lock's hash and its link to the month before. GET /v1/close/periods/2026-10/package?format=csv and GET /v1/close/periods/2026-10/verify

In SET Console

  1. Add a source. Console: not available. Use the API call.
  2. Upload a bank file. Console: not available. Use the API call.
  3. Read matches and exceptions. Console: not available. Use the API call.
  4. Resolve an exception. Console: not available. Use the API call.
  5. Prepare the month. Console: not available. Use the API call.
  6. Lock the month. Console: not available. Use the API call.
  7. 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

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 the row and reason), 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: verify needs 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.

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.