Cancel a Card
Use Affirm's Card API cancel request to fully void a virtual card.
How it works
The 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
On capture
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.
Updated about 2 months ago