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

Resolve an exception: link a record, ignore it, or leave it open with a note

POST/v1/close/exceptions/{exception}/resolve

Key scope: write · Success: 200

Resolves an exception. link puts a record in the payment's empty slot and matches it only if the amounts then agree; ignore sets the match aside with a note; leave_open keeps it an exception with a note, so it no longer blocks prepare.

Path parameters

exception stringrequired
The match id (cm_…) of an exception, from GET /v1/close/exceptions.

Headers

Idempotency-Key string
Any unique string. What a repeat of this call answers is in the notes. See Idempotency.

Body

action "link" | "ignore" | "leave_open"required
What to do with the exception. Anything else is 400 action_invalid.
record string
For link: the record id (cr_…) to put in the payment's empty slot.
note string
1 to 500 characters. Optional for link; required for ignore and leave_open (400 note_required).

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 write scope. Platform and business keys can both call it.
  • link answers 409 link_disagrees when the payment and the named record do not then agree on the amount.
  • Linking an uploaded line also closes that line's own exception: it becomes ignored with the note "Linked to cm_…" and an empty rail slot.
  • leave_open keeps the match an exception, but one with a note no longer blocks POST /v1/close/periods/{period}/prepare.
  • A match that is no longer an exception answers 409 not_an_exception, including when the same request is sent again.
  • Once the match's period is locked the answer is 409 period_locked.
  • Each resolution writes a close.exception.resolved event.
  • 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
  • 409 not_an_exception
  • 409 period_locked
  • 400 note_required
  • 400 record_invalid
  • 409 record_slot_filled
  • 409 record_in_use
  • 400 note_invalid
  • 400 action_invalid
  • 409 match_changed
  • 409 link_disagrees

All codes: Errors.