Skip to main content
DELETE
/
api
/
v1
/
cards
/
{id}
curl -X DELETE https://api.agentcard.sh/api/v1/cards/cm3abc123 \
  -H "Authorization: Bearer sk_test_..."
{
  "id": "cm3abc123",
  "status": "CLOSED"
}
Closes a card, revoking it at the card provider. The card can no longer be used for purchases. If the card has a held PaymentIntent that has not been captured, the hold is cancelled to release the funds back to the cardholder’s payment method. Closing an already-closed card is a no-op and returns the current card state.
Call DELETE /cards/:id whenever a checkout fails or is abandoned to release the payment hold immediately. While unused shortcut cards are automatically cleaned up after 2 hours as a safety net, closing them promptly avoids unnecessary holds on the cardholder’s payment method.

Path parameters

id
string
required
The card ID.

Response

id
string
Unique card identifier.
status
string
Card status. Will be CLOSED after a successful close.
curl -X DELETE https://api.agentcard.sh/api/v1/cards/cm3abc123 \
  -H "Authorization: Bearer sk_test_..."
{
  "id": "cm3abc123",
  "status": "CLOSED"
}