API Reference
Delete saved card
Removes a saved card. Send the owner's customer_id and the card_token in the body. Gravv deletes the card that card_token names, not the one in the path. A request without a body fails with EOF. A token that matches no active card returns card already deleted.
Path Parameters
The saved card id. It does not choose the card.
Request Body
The card owner's customer ID
Token of the card to delete
Request Examples
{
"customer_id": "f827e428-c497-4b21-8855-99d978909c28",
"card_token": "tokn_80aebb6ea2594a74bc"
}
Responses
| Status | Description |
|---|---|
200 |
The card was deleted, or was already deleted |
400 |
The request failed. A card saved under another customer returns card does not belong to customer: permission denied. |
200 response
Possible values: card deleted successfully, card already deleted
{
"data": {
"success": true,
"message": "card deleted successfully"
},
"error": null
}
400 response
{
"data": null,
"error": "card_token is required: invalid input"
}
Authorization
- ApiKeyAuth
Was this page helpful?