Replace a card
POST/v1/cards/:card_id/replace
Issues a new card against the same cardholder and account, then closes
this one. Returns the new card. The new card has a new id, number and
expiry, and keeps the original's reference.
The new card follows the usual issuing flow: active straight away, or
pending and then active with card.issued on a program that issues
asynchronously. The original is closed and emits card.closed.
The new card is issued before the original is closed, so a failure never
leaves the cardholder without a card. If the close fails, the response
is an error naming both cards and the original stays active: close it
with POST /v1/cards/{card_id}/close and do not repeat the replacement,
which would issue another card.
A closed card cannot be replaced.
Request
Responses
- 201
- 422
The replacement card.
Well-formed but fails a business rule.