Skip to content

Delete the stored card

Request

Deletes the card a verified tokenization request stored. The path takes the tokenization request's token, as GET /cards/{token} does. Afterwards the card token can no longer be charged, and GET /cards/{token} returns 404. Sends card_request.card_deleted.

Returns 400 when the card cannot be deleted:

  • the tokenization request was never verified;
  • a subscription that is not cancelled or complete still bills the card. Cancel the subscription first;
  • the card is also your payment method for Dime's own billing.

This cannot be undone. To charge the customer again, open a new tokenization request.

Security
ClientKey and SecretKey
Path
tokenstringrequired

The tokenization request's token, not the card token.

Example:crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM
curl -i -X DELETE \
  https://docs.dimepay.net/_mock/apis/v2/dime-v2/cards/crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'X-Dime-Client: YOUR_API_KEY_HERE'

Responses

The card was deleted.

Bodyapplication/json
tokenstringrequired

The deleted card's token.

Example:"crd_AknWM2rI_mCnLkMCZ_x49WVYRv_tvlpSc7"
objectstringrequired
Example:"card"
Value:"card"
deletedbooleanrequired
Example:true
Value:true
Response
{ "token": "crd_AknWM2rI_mCnLkMCZ_x49WVYRv_tvlpSc7", "object": "card", "deleted": true }