Cancel a card
Cancels the card at its issuer for good. Any card that is not PENDING
or already CANCELED can be canceled. The card’s holder is notified. An
EXTERNAL card stays usable at its bank; canceling it stops importing its
transactions for good.
The change is made at the card issuer first. A card in another status is
refused with INVALID_STATE. Retry with the same Idempotency-Key after a
timeout or a 502.
A card changes one request at a time. While another change to it is in
progress, or its outcome is still being confirmed, the card shows it as
pendingChange and the request is refused with SERVICE_UNAVAILABLE
before anything reaches the card issuer; retry it after the seconds in
Retry-After with the same Idempotency-Key.
Authentication
Access token from POST /access-token. Valid for at most 30 minutes.
Path parameters
Headers
The account holder a platform API key acts on. Platform keys must send it on account holder operations. A company API key acts on its own account holder; it may omit the header or send its own account holder ID.
Your unique key for this operation: 1 to 255 visible ASCII characters, ideally a new UUID v4 for each operation. A value in double quotes is accepted and the quotes are removed. Retrying with the same key and the same request returns the first response with Idempotent-Replayed: true; the same key with a different request is refused with IDEMPOTENCY_KEY_REUSED. A key can be used again 30 days after its operation completes.
Your own correlation ID for this request. It is recorded with the request. The X-Request-Id response header is always generated by the server.
Request
Response headers
Remaining budget for each rate limit policy, for example "burst"; r=57; t=6 (requests remaining and seconds until the window resets).
The rate limit policies applied to this request, for example "burst"; q=60; w=10 (requests allowed per window of seconds).
Sent as true when this response repeats the first response to the same Idempotency-Key. A replay keeps the first response’s status and body, including the requestId of a problem; X-Request-Id is new.
Response
A resource ID. Treat it as an opaque, case-sensitive string.
Always card.
true on a live platform in production, false on a Sandbox platform and outside production.
A resource ID. Treat it as an opaque, case-sensitive string.
A resource ID. Treat it as an opaque, case-sensitive string.
VIRTUAL and PHYSICAL cards are issued on a card program. An EXTERNAL card was added from an account at another bank, which issues it, sets its limits and services it; it changes here only and publishes no events.
PENDING until the card is issued and activated, INACTIVE while a physical card waits for its holder to activate it or after it was turned off as lost or stolen. statusReason tells these apart.
Spending limits in the account holder’s currency, and the card’s other spending controls. Each limit is at least the narrower ones: transaction, daily, weekly, monthly, then total. A control that is not set is absent. Where the card was issued with a limit tolerance, an authorization slightly above a limit may still be approved; the limits read back here are always the ones that were set.
The card program the card is issued on. Absent on an EXTERNAL card.
Why the card is PENDING or INACTIVE; absent in any other status. ISSUING: being issued and activated. DRAFT: added but not issued. AWAITING_ACTIVATION: a physical card waiting for its holder to activate it. DEACTIVATED: turned off, for example as lost or stolen.
When the card first became ACTIVE. Absent until it has.
A resource ID. Treat it as an opaque, case-sensitive string.
A change to the card that is still in progress, or whose outcome is still being confirmed with the card issuer. Present only while it is; until it resolves, every other change to the card is refused with SERVICE_UNAVAILABLE.
Only on GET /cards/{cardId} with extend=cardToken: what the issuer’s card display SDK needs to show the card details in the cardholder’s browser or app. The embedded card viewer takes it unchanged.
Only on GET /cards/{cardId} with extend=cardDetails. Never store or log these values.
The card’s user, with extend=user.
The card’s account holder, with extend=accountHolder.
The card’s program, with extend=cardProgram. Its financial account has the same ID.