question

sunceenjoy avatar image
sunceenjoy asked parquet76 commented

how to add card-on-file token by using the api /v3/merchants/xxx/customers/xxx/cards

I was able to add a card to a customer by the v3/merchants/xxx/customers/xxx/cards. However, I only can use the token once and I got the error if I used it multiple times. Why It was considered as non-card-on-file token if it was already added into the customer

1708726493017.png

I had no issues using the token multiple times if the token was added into customer by the /v1/customers/xxx api.

But my customer have more than one cards, how can I add a card-on-file correctly by using the api /v3/merchants/13TNY3KNHZ0F1/customers/xxx/cards

This is my post, but the token can still be used once

1708726771686.png

Payments
1708726493017.png (33.1 KiB)
1708726771686.png (256.7 KiB)
10 |2000

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

bryanvargas avatar image
bryanvargas answered bryanvargas commented

Our guide shows step by step how to save a card and revoke a card. A customer can only have one card on file at a time:
https://docs.clover.com/docs/ecommerce-saving-card

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.

sunceenjoy avatar image sunceenjoy commented ·

@bryanvargas

I was able to create card-on-file (COF) through the link you attached.

But in our application, we allow customer to add up to 5 credit cards (each card will generate a payment token), then they can select a card(token) to make purchase later. Basically we want all these token to be "COF" card, so they can be used many time.

Does it means this implementations is impossible vis Clover API?

If yes, can you instruct me how to implement it?




0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ sunceenjoy commented ·

My previous post: "A customer can only have one card on file at a time:" so you will have to revoke the exisiting card to use a new card. This is also highlighted in the docs

0 Likes 0 ·
submatic avatar image
submatic answered parquet76 commented

Why does it say in the docs "If you are saving multiple cards per customer, use the multi-pay token for that customer in subsequent payments." if multiple card on file is not supported?

That information is displayed here https://docs.clover.com/docs/ecommerce-saving-card#use-a-multi-pay-card-token in the "Note".

1 comment
10 |2000

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

parquet76 avatar image parquet76 commented ·

I don't think it is true that a customer can only have one card on file - https://community.clover.com/questions/28318/how-to-select-one-of-multiple-saved-cards.html. if a customer has more than one card on file you just need to retrieve the tokens for the customer's cards and pass the token as the source, instead of the customer uuid. I tried this years ago and it worked, I bet it still does now.

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