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
- Mock serverhttps://docs.dimepay.net/_mock/apis/v2/dime-v2/cards/{token}
- Sandbox. A separate environment with its own data; no real money
moves. Use a client key created in sandbox.
https://sandbox.api.dimepay.app/dapi/v2/cards/{token}
- Production. Real payments. Use a client key created in production.
https://api.dimepay.app/dapi/v2/cards/{token}
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'Response
{ "token": "crd_AknWM2rI_mCnLkMCZ_x49WVYRv_tvlpSc7", "object": "card", "deleted": true }