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
- Call the
cancelPhysicalCardmutation. - Add the
cardIdand the cancelation reason for the physical card you're canceling (line 2). - Add the
CancelPhysicalCardSuccessPayload, including any information you'd like to review (line 3). - Add rejections (not shown).
Mutation
Open in API Explorermutation 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"
}
}
}
}
}
Also available
Cancel physical cardsFrom the Dashboard