Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
Collections Delete saved card

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

DELETEhttps://api.gravv.xyz/v1/collections/cards/{card_id}Try it
Api-Key

Path parameters

NameDescription
card_id:stringRequired
The saved card id. It does not choose the card.

Body parameters

NameDescription
customer_id:stringRequired
The card owner's customer ID
card_token:stringRequired
Token of the card to delete

Response

Returns 200 OK. The card was deleted, or was already deleted

NameDescription
data:object
Show 2 child attributesobject
error:null

Errors

StatusMeaning
200The card was deleted, or was already deleted
400The request failed. A card saved under another customer returns card does not belong to customer: permission denied.
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request DELETE \
--url 'https://api.gravv.xyz/v1/collections/cards/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"customer_id": "f827e428-c497-4b21-8855-99d978909c28",
"card_token": "tokn_80aebb6ea2594a74bc"
}'
Responseapplication/json
200400OK
{
"data": {
"success": true,
"message": "card deleted successfully"
},
"error": null
}