SETSimple Easy Transactions
SET DocsAPI reference and complianceUpdated 2026-11-09
Browse: SET Merchant API

SET Merchant API · Customers

Close a customer

POST/v1/customers/{id}/close

Key scope: write

Offboards a customer in one call: each active virtual account is deactivated, then its Cash-Out Addresses are retired, its recipients disabled and the customer marked closed. A closed customer opens nothing new. Repeating the call after it closed changes nothing.

Path parameters

id stringrequired
The customer's id.

Headers

Idempotency-Key string
Optional. The same key and body run once; a replay answers with Idempotent-Replayed: true. Kept 24 hours.

Notes

  • Events virtual_account.deactivated, cash_out_address.retired, recipient.disabled, then customer.closed. GET /v1/customers/{id} shows closedAt.
  • If the provider refuses a deactivation the customer stays open (502) and the call can be repeated.
  • What closing does not do, as the answer's notes say: a Cash-Out Address cannot be deactivated at the provider, so it is retired in SET only and a payment still sent to it is paid to the bank and recorded. Custodial wallets are not touched; their balance stays the customer's. Payments and payouts under way run their course. Data held by the provider stays under its own retention.
  • Afterwards every create that names the customer, and /reactivate on its virtual accounts, answers 409 customer_closed.

Errors

  • 404 customer_unknown
  • 502 bridge_unavailable
  • 401 api_key_required
  • 401 api_key_invalid
  • 401 api_key_wrong_mode
  • 403 scope_missing
  • 429 rate_limited

All codes: Errors.