question

terryasmith03 avatar image
terryasmith03 asked David Marginian Deactivated answered

In sandbox, are test cards stored when attaching them to the customer for reoccurring payments?

When testing reoccurring payments in the sandbox,

when using -> source: <CustomerID>

response:

{"message":
"402 Payment Required"
"error":{"type":
"card_error"
"code":
"card_on_file_missing"
"message":
"The customer does not have a Card on File."
}} 


when using generated token(iframe generated token) ->source: <token>

response:

{
"message":"400 Bad Request"
"error":{
"type":"invalid_request_error"
"code":"invalid_request"
"message":"Please provide a valid source for the charge."
}
}


Am I missing something. I am storing the card on file cause i can search for the customer and see it

{
"href":"https://sandbox.dev.clover.com/v3/merchants/TJ37EBM2PPQJ1/customers/TYS1FHQ9QXQYE"
"id":"TYS1FHQ9QXQYE"
"firstName":"John"
"lastName":"Smith"
"marketingAllowed":false
"customerSince":1622768124000
"cards":{
"elements":[
{
"id":"TDG9F3KTKJC3J"
"first6":"424242"
"last4":"4242"
"cardType":"VISA"
"modifiedTime":1622768123000
"customer":{
"id":"TYS1FHQ9QXQYE"
}
}
]
}
}


REST APISandbox
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

·
David Marginian avatar image
David Marginian Deactivated answered

The last time I tested it, it worked fine. It isn't clear how you are saving the card. You must follow the instructions here https://docs.clover.com/docs/ecommerce-saving-card.

10 |2000

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

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