---
updatedAt: 2025-11-13T14:35:25.000Z
agentTools:
  siteIndex: https://docs.affirm.com/llms.txt
  projectIndex: https://docs.affirm.com/developers/v1.0-Global-Integration/llms.txt
---

# Cancel a Card

Use Affirm's Card API cancel request to fully void a virtual card.

## How it works

The [Cancel Card](https://docs.affirm.com/developers/v1.0-Global-Integration/reference/cancel_card) API allows merchants to immediately void and/or cancel the Affirm virtual card (and loan) by using the `checkout_id`. Please use this tool carefully. We normally see the usage of this API request for a business model where:

* A large quantity of price changes occur (flights, goods, auctioning, etc.)
* If you have many order failures

> 📘
>
> If you are unsure if the specifications listed above apply to your business, please contact us via the support widget.

## Timelines

Review the references below to understand the timelines of Affirm's authorization and capture processes.

### On authorization

![](https://files.readme.io/208ca46-f8a8036-Screen_Shot_2020-02-24_at_3.36.02_PM.png)

### On capture

![](https://files.readme.io/bb59d4e-2445049-Screen_Shot_2020-02-24_at_3.36.27_PM.png)

> 👍 Successful response
>
> Once a confirmation response is received, the customer's loan will be voided or fully refunded. This cancel action will also remove the loan from the customer's Affirm user portal.
>
> * If the card is expired, canceled, or auth\_expired, nothing happens as the card is already canceled.
> * If the card is in a confirmed state, Affirm expires the card, and cancels the charge.
> * If the card is in an authorized state, Affirm will auth-expire the card and void the charge.
> * If the card is in a captured state, Affirm will auth-expire the card and fully refund the charge.

> ❗ Bad request
>
> * The merchant is not a Platforms vcn merchant.
> * There is no checkout token associated with that `checkout_token`.
> * There is no card associated with the `checkout_token`.
> * The current agent does not have update permission on the charge (wrong merchant).
> * The charge is being disputed.
> * The card state is not being handled (should never happen unless we add a new `CardState`).

> ❗
>
> **These bad requests are only reproducible in a production environment, as real card details are not generated in sandbox.**

# Sibling pages

* [Read Card Details](https://docs.affirm.com/developers/v1.0-Global-Integration/docs/read-card-details.md)
* [Finalize a Card](https://docs.affirm.com/developers/v1.0-Global-Integration/docs/finalize-a-card.md)