Replace a cardholder's card with an in-inventory card, moving its balance

Moves the cardholder onto a new card from your inventory, named by its proxy in destination_proxy. Use it when a card is lost, damaged or otherwise needs replacing.

  1. The source card's available balance is unloaded to your funding account.
  2. The destination card is assigned to the person on the source card, with the same profile and external reference, and the external_tag you send or, if you omit it, the source's.
  3. The balance is loaded onto the destination card, and the program's replacement fee, if it has one, is charged to it.
  4. The source account is closed.

Whether the destination card is activated, and when, depends on the program's settings.

A source that holds a balance is refused with 422 when that balance cannot be unloaded: when its account_status (from Get a cardholder by ID), or the cards[].status of its only card, reads suspended or fraud, or when an active card has expired. A source with a negative balance is refused with 422. A source whose account is closed is refused with 409.

After a replacement the person's card is the destination cardholder; use its id for later calls. To find it, call Search cardholders with prn set to the destination_proxy you sent. That filter is a prefix match, so take the result whose primary_processor_reference equals it exactly.

If a step up to and including the assignment fails, the request fails and the unloaded balance is reloaded onto the source card. That reload is best-effort, and its failure is not reported in the response. It always fails for a source marked lost or stolen, or whose every card is closed; its balance then stays in your funding account. After any error, check both cardholders and the source balance before retrying.

StatustypeWhen
404cardholder_not_foundNo cardholder with this id, or no card with this proxy, in your company
404card_order_item_not_foundThe destination card is not in inventory, for example not yet received or damaged
409cardholder_already_assignedThe destination card is already assigned, or is the source card
409cardholder_already_closedThe source account is closed
409bulk_update_count_mismatchAnother request changed the source or destination card at the same time; check both before retrying
422cardholder_not_assignedThe source card is in inventory, or was already replaced
422cardholder_no_cardsThe source account has no card
422cardholder_cards_closedEvery card on the destination cardholder is closed at the processor, for example invalidated by a failed card order
422cardholder_suspended, cardholder_fraud_blocked, cardholder_expiredThe source holds a balance that cannot be unloaded in this state, or (for cardholder_expired) the destination card has expired
422card_expires_soonThe destination card expires within the program's minimum validity window
422cardholder_replacement_currency_mismatchThe destination card's program uses a different currency
422instant_issuance_replacement_fee_insufficient_fundsThe source balance cannot cover the replacement fee
422cardholder_replacement_source_overdrawnThe source card has a negative balance; settle it before replacing the card
422cardholder_replacement_ship_to_name_requiredThe source card's shipping address has no recipient name, and the profile has none to fall back on
422cardholder_not_assignable, cardholder_program_not_supportedThe destination card cannot be assigned, for example it is not ready yet, or the processor refused the copied profile (errors may name the profile field). The destination program may also require an email or phone the source lacks, which returns a 422 without type naming body.email or body.phone
422value_load_*The processor refused the balance unload, for example a velocity or limit check
502, 504value_load_processor_failure, value_load_processor_timeout, cardholder_processor_balance_failed, cardholder_processor_profile_failedA processor call failed before the assignment; check the source balance before retrying
500internal_server_errorReading a card's status, or a processor call during the assignment, failed unexpectedly; check both cardholders and the source balance before retrying

200 with warnings

Once the destination card is assigned, the replacement cannot be undone, so a later step that fails does not fail the request. The response is still 200, message is Card replaced with warnings, and warnings lists each failed step by type.

Do not retry the replacement: the source card is no longer assigned, so a retry returns 422 cardholder_not_assigned. Contact Berkeley Payments support with both cardholder ids and the warning types.

Warning typeWhat it means
cardholder_replacement_balance_transfer_failedThe balance was unloaded from the source card but not loaded onto the new card. The funds are in your funding account, not lost. The fee warning below usually appears with it.
instant_issuance_replacement_fee_charge_failedThe replacement fee may not have been charged. The new card is usable.
cardholder_replacement_activation_failedThe new card is assigned but not activated, so it may not transact yet.
cardholder_replacement_source_close_failedThe old account is still open at the processor, with a zero balance. It cannot be closed through this API.
cardholder_replacement_contact_move_failedContact details held by Berkeley Payments, which are used for notifications, were not carried over to the new cardholder.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int64
required
≥ 1

Identifier of the cardholder whose card is being replaced

Body Params
string
required
length between 1 and 64

Proxy printed on the replacement card, an unassigned card from inventory. Same value as the primary_processor_reference returned by Get a cardholder by ID and Search cardholders; must match exactly, with no prefix matching.

string
length ≤ 255

External tag recorded on the balance moves and set on the destination cardholder. When omitted, the source cardholder's external tag is used; if that tag contains other characters the request fails with 422, so send a valid one. Letters, digits, spaces and - _ . ! @ # $ % ^ & ( ) + only.

string
length ≤ 255

Note recorded with the campaign allocation carried over to the balance moves. Dropped when no campaign allocation can be carried over or there is no balance to move.

string
required
length between 1 and 255

Reason for the replacement

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