Error submitting credit card in test mode: "There was an error adding this card"

Highlighted
New Member
1 0 0

With Shopify Payments test mode enabled, I am using the Storefront API to direct users to a checkout at https://pay.shopify.com/transactions/new/token/{token} but when I enter in the fake credit card information (found here) to the checkout form, I see a message reading: "There was an error adding this card":

Screen Shot 2020-07-28 at 5.40.07 PM.png

The id I get back when I send a request to https://deposit.us.shopifycs.com/sessions is 

 

 

{"id":"east-a2e7e79259c2333e73f436b9ed21cb34"}

 

 

However, in the request to https://pay.shopify.com/credit_cards, I see this response:

 

 

{"errors":{"credit_card":{"api_error":["failed to verify credit card"]}}}

 

 

this response also comes with a 422 error code, which is an "Unprocessable Entity".

I'm pretty sure I have to set up a checkoutCompleteWithCreditCardV2 mutation and insert the id as a parameter but since the id is being returned to a URL outside of my app, I don't see how I could access the id and throw it into that mutation. Any help is appreciated!

0 Likes