Does createPayment requires verificationtoken if card is saved on the developer account

We are using below method to charge the customer:

  1. Create a customer on the developer account.
  2. Create a shared card on the developer account. getCardsApi()->createCard In this step card nonce/token is consumed. Also verification token is consumed. (Javascript call to payments.verifyBuyer)
  3. Then we get the payment method id. Create a customer on the seller account.
  4. Create a payment using the payment method id on the seller account. Here verification token is already used. Does this step need verification token?

We are getting errors now. INVALID_CARD_DATA - “field”: “source_id”
How to solve this?

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Create a Card on File from a Payment ID
Cards API
Charge a Card on File

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

@Square-Dev-AI It does not help.

If you are re-using a verification_token then it will fail. Those tokens are one time use tokens. When charging a stored card on file you’ll either have to declare the payment as a seller_keyed_in payment in the customer_details or generate a new verification_token. :slightly_smiling_face:

@Bryan-Square We just received the same error, can you please look at the reasons for the errors?

  1. Impotence key - 668c07fd08541 , reference id - AXLZJSH313
  2. Impotence key - 668a61da35dd5, reference id - CSGDHISH583
    Please let us know how to fix these errors. Thanks in advance.

@Bryan-Square We are getting a lot of errors, new one came in, please help.

What’s the application ID? :slightly_smiling_face:

@Bryan-Square Yes sir it is sq0idp-y18gddeHNN6xlcJsDTqClw

For any of the failed attempts did you have the customer contact their bank? The error message that’s returned is designed to be vague as to why the card wasn’t able to be stored on file. The customers bank will know more about why the card wasn’t able to be saved on file. :slightly_smiling_face: