OnLink
API reference

Close a customer

Closes the customer and sends customer.updated. A soft close: the record is kept and stays readable with status closed, but it can no longer be changed. The body is optional; send a reason (up to 500 characters) to record why. Returns the closed customer, not 204. A customer is closed together with its accounts, and only when they are empty: while an account holds money, a deposit is still arriving or is under review, a transfer, payout, conversion or fee of the customer is still in flight, an account is frozen or dormant, or an account is still being opened, the close is refused (409 CUSTOMER_HAS_BALANCE, CUSTOMER_DEPOSITS_IN_FLIGHT, CUSTOMER_HAS_MOVEMENTS_IN_FLIGHT, CUSTOMER_HAS_HELD_DEPOSITS, CUSTOMER_ACCOUNT_FROZEN or CUSTOMER_ACCOUNT_OPENING) and the customer is not closed. A balance that cannot be read is never taken as empty (503 CUSTOMER_BALANCE_UNAVAILABLE). The customer’s US bank details are switched off before the customer is closed and that cannot be undone with the close, so a refusal that comes AFTER the switch-off (a deposit arrived, or switching off a second account failed) leaves the customer open with its US bank details possibly already off: repeating the close is safe and finishes the job.

DELETE
/v1/customers/{id}

Authorization

partner-key
X-OnLink-Key<token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/customers/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "5f0c1a3e-2d4b-4c6a-8e9f-0a1b2c3d4e5f",  "type": "individual",  "status": "pending_kyc",  "externalRef": "acme-cust-0042",  "displayName": "Amina Wanjiru",  "email": "amina@example.com",  "phone": "+447700900123",  "countryOfResidence": "GB",  "legalName": null,  "createdAt": "2026-11-17T09:30:00.000Z",  "updatedAt": "2026-11-17T09:30:00.000Z",  "closedAt": null}