Delete Cardholder Draft
Deletes a cardholder draft — one whose registration has not completed (registration_status=0). Registered cardholders cannot be deleted.
Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /api/v1/openapi/cardholder/delete |
| Auth | HMAC |
| Idempotency Key | Required via Idempotency-Key header |
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
cardholder_id | string | ✅ | chd_<id> of the draft |
json
{ "cardholder_id": "chd_1025" }Response Fields
| Field | Type | Description |
|---|---|---|
cardholder_id | string | Echoed |
deleted | bool | Always true on success |
json
{
"code": 0,
"message": "Success",
"data": { "cardholder_id": "chd_1025", "deleted": true }
}Common Errors
| HTTP | code | error_key | Description |
|---|---|---|---|
| 200 | 40000 | openapi_invalid_cardholder_id | cardholder_id missing or malformed |
| 404 | 40400 | cardholder_not_found | No such cardholder on your account — also returned when the draft was already deleted |
| 200 | 40000 | cardholder_only_draft_deletable | The cardholder is registered (or its registration just completed) |
| 200 | 40000 | cardholder_busy | Another operation on this cardholder is in progress — retry shortly with a new Idempotency-Key |
| 200 | 50000 | cardholder_provider_unavailable / cardholder_service_not_configured | Temporarily unavailable / not enabled — retry later with a new key; the draft is not deleted |
| 200 | 50000 | openapi_cardholder_failed | Server error |
Plus the shared Idempotency-Key, auth (401) and rate-limit (429) errors.
Notes
- After deletion the draft's
external_idis free again: a later/cardholder/createwith the sameexternal_idcreates a new cardholder. - Files referenced by a deleted draft stay bound to it and cannot be referenced by another cardholder (
cardholder_file_in_use) — upload them again. - Instead of deleting and re-creating, you can usually fix a draft with
/cardholder/update, which retries the registration.