Audience:
Developers
Cancel virtual cards using the API
Cancel virtual cards with the cancelCard mutation.
Cancelation is irreversible
Canceling a virtual card is an irreversible action that immediately and permanently invalidates the card. All physical and digital cards associated to the virtual card are also canceled. Consent isn't required to cancel cards.
Guide
- Call the
cancelCardmutation. - Add the virtual
cardIdfor the card you're canceling (line 2). - Add the success payload, including any information you'd like to review (line 3).
- Add rejections (not shown).
Mutation
Open in API Explorermutation CancelVirtualCard {
cancelCard(input: { cardId: "$YOUR_CARD_ID" }) {
... on CancelCardSuccessPayload {
__typename
card {
statusInfo {
status
}
}
}
}
}
Payload
The payload confirms that the virtual card is Canceled.
{
"data": {
"cancelCard": {
"__typename": "CancelCardSuccessPayload",
"card": {
"statusInfo": {
"status": "Canceled"
}
}
}
}
}
Also available
Cancel virtual cardsFrom the Dashboard