Skip to content
Cipay
Esc
navigateopen⌘Jpreview

Deactivate Customer

POST/v2/customers/{id}/deactivate
Authorization
AuthorizationBearer token · headerrequired
Merchant API key scoped to one merchant and environment. Read operations require api:read, normal write operations require api:write, and broadcast mutations also require explicit broadcasts:write.
Path parameters
idstring<uuid>required
Header parameters
idempotency-keystringrequired
Required for write endpoints that create records and need deterministic retry behavior.
min length 1 · max length 255
if-matchstringrequired
Strong entity revision ETag returned by the latest read or write.
matches ^\"[0-9]+\"$
x-request-idstring
Optional caller-provided request correlation ID.
min length 1
Responses
200OK
customerobjectrequired
Show properties
idstring<uuid>required
merchantIdstring<uuid>required
environmentstringrequired
Allowed:sandboxproduction
namestring | anyrequired
Show properties
Any of:
string
string
any
any
emailstring<email>required
max length 320
mobilestring | anyrequired
Show properties
Any of:
string
string
any
any
billingAddressobject | anyrequired
Show properties
Any of:
object
line1stringrequired
min length 1 · max length 200
line2string
min length 1 · max length 200
citystringrequired
min length 1 · max length 120
regionstringrequired
min length 1 · max length 120
postalCodestringrequired
min length 1 · max length 20
countryCodeany
default: "SA"
any
any
localestringrequired
Allowed:enar
externalIdstring | anyrequired
Show properties
Any of:
string
string
any
any
emailTruststringrequired
Allowed:legacy_merchant_assertedverified
emailVerifiedAtstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
statusstring
Allowed:activedeactivated
revisionintegerrequired
min -9007199254740991 · max 9007199254740991
metadataobjectrequired
createdAtstring<date-time>required
updatedAtstring<date-time>required
scheduledSubscriptionIdsstring<uuid>[]required
400Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
401Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
403Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
404Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
409Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
422Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
429Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
500Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
Request
curl -X POST "https://api.cipay.net/v2/customers/%3Cuuid%3E/deactivate" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "idempotency-key: string" \
  -H "if-match: string"
Response
{
  "customer": {
    "id": "<uuid>",
    "merchantId": "<uuid>",
    "environment": "sandbox",
    "name": "string",
    "email": "<email>",
    "mobile": "string",
    "billingAddress": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "region": "string",
      "postalCode": "string",
      "countryCode": "SA"
    },
    "locale": "en",
    "externalId": "string",
    "emailTrust": "legacy_merchant_asserted",
    "emailVerifiedAt": "2024-01-01T00:00:00Z",
    "status": "active",
    "revision": 0,
    "metadata": {},
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z"
  },
  "scheduledSubscriptionIds": [
    "<uuid>"
  ]
}