Test card returning INVALID_CARD_DATA Jquery\Php

Hey everyone.

 

After spending several hours developing a backend that is connected to sqaureup payment API, I started to get errors out of nowhere. It was working, then just randomly stopped.

 

I have jquery on the front end submitting the card data and getting a token back.

 

I then send this token to my internal API to attach the card to a customer's profile (which i've confirmed exists). Again this was working, and randomly now it's not.

 

My internal API is now sending back "error":[{"category":"INVALID_REQUEST_ERROR","code":"INVALID_CARD_DATA","detail":"Invalid card data.","field":"source_id"}]

 

I have been using the test card in sandbox mode: 4111 1111 1111 1111 with expiration 11/22, ccv 111 postal code 11111

 

I have also tried the other test cards provided in the documentation and get the same results.

 

I have confirmed that my internal api is getting the proper token from the front end.

 

Any suggestions on how I can get this test card to start working again would be great.

 

Thanks.

846 Views
Message 1 of 2
Report
1 REPLY 1
Square Community Moderator

Welcome to the Community, @jjonesdesign -

 

Thank you for reaching out about this. 

 

I am going to recommend reaching out to our API Team to get some more insight on this. They can provide a plan for you or get a ticket filed with our engineers. 

 

 

 

 

 

 

 

Kassi
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
767 Views
Message 2 of 2
Report