Skip to main content

Audience:

Developers

Cancel physical cards using the API

If a physical card is lost, stolen, damaged, or hasn't been delivered, call the cancelPhysicalCard mutation to cancel the card.

Cancelation is irreversible

Canceling a physical card is a permanent action that can't be reversed. When a physical card is canceled, digital cards linked to the physical card are also canceled. Virtual cards aren't affected.

Guide

  1. Call the cancelPhysicalCard mutation.
  2. Add the cardId and the cancelation reason for the physical card you're canceling (line 2).
  3. Add the CancelPhysicalCardSuccessPayload, including any information you'd like to review (line 3).
  4. Add rejections (not shown).

Mutation

Open in API Explorer
mutation CancelPhysicalCard {
cancelPhysicalCard(input: { cardId: "$YOUR_CARD_ID", reason: Lost }) {
... on CancelPhysicalCardSuccessPayload {
__typename
physicalCard {
statusInfo {
... on PhysicalCardCanceledStatusInfo {
__typename
status
reason
}
}
}
}
}
}

Payload

The payload confirms that the physical card is Canceled (line 8) because it was reported as Lost (line 9).

{
"data": {
"cancelPhysicalCard": {
"__typename": "CancelPhysicalCardSuccessPayload",
"physicalCard": {
"statusInfo": {
"__typename": "PhysicalCardCanceledStatusInfo",
"status": "Canceled",
"reason": "Lost"
}
}
}
}
}