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

One match per payment: its records, rule and state

GET/v1/close/matches

Key scope: read · Success: 200

Lists matches: one per payment, naming the record in each slot (rail, provider, chain, book), the rule that paired them and the state. An uploaded line that belongs to no payment SET can name is its own match. Newest first, paged by createdBefore.

Query parameters

period string
YYYY-MM: only matches in this month.
state "pending" | "matched" | "exception" | "ignored"
Only matches in this state. Anything else is 400 state_invalid.
rule "linked" | "hash" | "reference" | "amount_date"
Only matches paired by this rule.
reason string
An exception reason (missing_rail, missing_provider, missing_chain, missing_book, amount_mismatch, ambiguous, chain_unconfirmed, duplicate, prior_period) or an ignored reason (before_start, not_moved). Anything else is 400 reason_invalid.
customer string
A customer id (cus_…): only that customer's matches.
inTransit "true" | "false"
Only matches that are (or are not) in transit. Anything else is 400 in_transit_invalid.
createdBefore string
The last answer's nextCreatedBefore, passed back unchanged, or an ISO 8601 time: matches created strictly before it.
limit integer
1 to 100; 50 by default.

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.
  • An uploaded line that belongs to no payment SET can name has paymentType external and payment null.
  • state: pending (not final yet), matched, exception, ignored.
  • rule: linked (SET's own ledger tied the records), hash, reference, amount_date (equal amount and direction within 3 calendar days, and the only candidate).
  • A returned payment is matched, not ignored; returned is not a reason.
  • variance is {amount, currency} when two sides disagree on an amount.
  • In the example, the 98.50 bank line of the 4th matched the payment settled on the 3rd by amount_date. The 247.50 line of the 15th is more than 3 days from its payment of the 8th, so the payment is missing_rail and the line is its own missing_provider exception. The 12.00 bank fee belongs to no payment.
  • Payments made through SET also become matches, usually matched by rule linked, after SET's scheduled pass, which runs every 10 minutes.
  • 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
  • 400 created_before_invalid
  • 400 period_invalid
  • 400 customer_invalid
  • 400 state_invalid
  • 400 reason_invalid
  • 400 in_transit_invalid

All codes: Errors.