Revoke a card

North America—United States and Canada

Removes a payment source, such as card or ACH token, from the customer profile. Use Create a card token or Create an ACH token to create a payment source.

Prerequisites

Before you remove a payment source from a customer profile, complete the following:

  1. Set up a sandbox developer account.
  2. Create an app in the sandbox. See also Ecommerce app permissions.
  3. Create a card-on-file customer to generate the customerId and sourceId.

Steps

  1. Send a DELETE request to the /v1/customers/{customerId}/sources/{sourceId} endpoint.
  2. Enter values in the following required parameters:
    1. customerId
    2. sourceId

Request example

curl --request DELETE \
     --url https://scl-sandbox.dev.clover.com/v1/customers/customerId/sources/cardId \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer abcdef56-48f3-b3bd-8c45-d415e9867833'

Response example

{
  "deleted": true,
  "id": "ND2EFTHF8HM34",
  "object": "deletedcard"
}