Close a cardholder's account, sweeping its balance to the funding account

Closes the cardholder's account permanently. This cannot be undone.

  1. The available balance, if any, is unloaded to your funding account.
  2. The account and its card are closed at the processor.

An account can be closed when its account_status (from Get a cardholder by ID) reads active, suspended or fraud. If it holds a balance, that balance must be unloadable first; the close is refused with 422 when account_status, or the cards[].status of an account's only card, reads suspended or fraud, when an active card has expired, or when the card is unassigned.

If the processor close fails, the response is 502 cardholder_closure_failed, the account is normally still open, and any unloaded balance has been reloaded onto the card. If that reload also fails, the response is 500 cardholder_closure_balance_rollback_failed: the account is still open and its balance is in your funding account. Contact Berkeley Payments support.

StatustypeWhen
404cardholder_not_foundNo cardholder with this id in your company
404card_order_item_not_foundThe card has no inventory record
409cardholder_already_closedThe account is already closed
409bulk_update_count_mismatchAnother request changed the card at the same time; check the cardholder before retrying
422cardholder_closure_not_closableaccount_status reads something other than active, suspended or fraud, for example lost, stolen, expired, never activated or delinquent
422cardholder_suspended, cardholder_fraud_blocked, cardholder_expired, cardholder_not_assignedThe account holds a balance that cannot be unloaded in this state
422invalid_status_transitionThe card's inventory record cannot be closed: the card was replaced, or is being transferred between offices
422value_load_*The processor refused the balance unload, for example a velocity or limit check
502cardholder_closure_failedThe processor close failed; the account is open with its balance
500cardholder_closure_balance_rollback_failedThe processor close failed and the balance is in your funding account
502, 504value_load_processor_failure, value_load_processor_timeout, cardholder_processor_balance_failedThe processor failed before the close; check the balance before retrying
500internal_server_errorReading the card's status failed unexpectedly; nothing changed
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int64
required
≥ 1

Cardholder identifier

Body Params
string
length ≤ 255

External tag recorded on the balance unload. When omitted, the cardholder's own external tag is used if it is valid. Letters, digits, spaces and - _ . ! @ # $ % ^ & ( ) + only.

string
required
length between 1 and 255

Reason for closing the account

Headers
string
length ≤ 255

Optional idempotency key. Replaying within 24h returns the cached response; reusing a key with different parameters returns 400 idempotency_params_error.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json