Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-21 · wallet release 7d8a79fb
Browse: SET API

SET API · SET Close

The period's package: every match, its records, compared amounts and reconciling items

GET/v1/close/periods/{period}/package

Key scope: read · Success: 200

Returns the period's package: every match with its records, the amounts each pair was compared on, the reconciling items and the bank and provider lines. A draft until the period is locked. JSON by default, or a CSV file with format=csv.

Path parameters

period stringrequired
The month as YYYY-MM (UTC).

Query parameters

format "json" | "csv"
json (the default) or csv. Anything else is 400 format_invalid.
customer string
A customer id (cus_…): cuts the package to that customer's lines. Uploaded lines that belong to no payment have no customer.

Notes

  • SET Close is switched on per deployment; when it is off, every /v1/close call answers 403 close_off after the key is checked. GET /v1/capabilities shows it as features.close.
  • Needs a key with the read scope. Platform and business keys can both call it.
  • final is true only for a locked period; before the lock the same call is a draft, with final false and the hashes null.
  • Each line gives the match, its records, amount (signed: money in positive, money out negative) and fee from the provider record, and compared: what each pair was compared on (chain on gross, rail on the settled amount), with expected and seen.
  • bankLine and providerLine show the reference and counterparty of an uploaded row. This is the only call that returns that text.
  • ledgerPosting is null without a connected accounting ledger (QuickBooks Online or Xero); with one it lists the journal entries not posted yet.
  • resolvedBy is the id of the key that resolved the exception.
  • With format=csv the answer is text/csv; charset=utf-8 with CRLF line ends, sent as an attachment named set-close-YYYY-MM.csv, one row per match, with the headers close-period-state and close-snapshot-hash.
  • The example was made with a sandbox key (sandbox: true).
  • 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_off
  • 404 not_found
  • 400 format_invalid
  • 400 customer_invalid

All codes: Errors.