question

chrispetchey avatar image
chrispetchey asked parquet76 edited

Revoke existing card on card on file

In implementing Card On File

https://docs.clover.com/docs/ecommerce-saving-card#what-is-card-on-file-cof

"Save a new card for an existing customer" requires that the existing card be revoked using
'https://scl-sandbox.dev.clover.com/v1/customers/{customerId}/sources/{cardId}'

What "cardId" do I use?
I created the customer with the https://scl-sandbox.dev.clover.com/v1/customers endpoint passing in the card token so the only thing I have is the customerid

e-commerce api
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
parquet76 avatar image
parquet76 answered parquet76 edited

The API says it's the source is, https://docs.clover.com/reference/revoke-a-payment-source which should be the customer you'd

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

chrispetchey avatar image chrispetchey commented ·

I actually found the answer. By doing a "getcustomer" with parameter "expand=cards" I got a list of cards for that customer. The card has an "id" and thats what you use

0 Likes 0 ·
parquet76 avatar image parquet76 chrispetchey commented ·

Yeah, you can do that too. My guess is that if you use the API that I linked to you can use the customer uuid directly.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community