Skip to main content

Cancel virtual cards

Cancel virtual cards with the API. Consent isn't required to cancel cards.

cancellation 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.

Learn more about virtual card cancellation on the virtual cards homepage.

Guide​

  1. Call the cancelCard mutation.
  2. Add the virtual cardId for the card you're canceling (line 2).
  3. Add the success payload, including any information you'd like to review (line 3).
  4. Add rejections (not shown).

Mutation​

🔎 Open the mutation in API Explorer

mutation 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"
}
}
}
}
}