Hello, I am a software developer using Square’s Web Payments SDK to accept online orders on a NextJS application for a client. Right now, I have the payment form set up by following this tutorial.
Recently, customers have been running into issues where they are prompted with the “Enter a valid card number” message, despite their card info being correct.
I have tried my own card and was able to successfully make an order, but I tried my client’s card and it said the card wasn’t valid? Is there any reason for why a valid card number would be declined? This has happened to my client’s card as well as multiple customers.
Has the customer been able to use the card with Square previously? If so do you have an example
For the first question, I’m not particularly sure but I can ask. However, with the client’s card in question, I believe it has been able to be used with Square as it should be linked with their Square business account.
For the second question, no
payment_id was able to be generated because the card is marked as invalid when using the payment form on the frontend before any API call made to Square’s Web Payments SDK.
Hmm, that is odd. The Web Payments SDK just does a light check to make sure it’s a valid card format. Is there anything that is different with the card?
Hi! Sorry for the late reply, I appreciate the responsiveness.
The card that worked for me was a VISA debit card, the other was a VISA credit card. Both are issued by Bank of America.
Has the card been used with Square previously? A Visa card should work without issue unless it’s a special issued card with explicit parameters on how it can be used.
Is there any way I can test if the card works with other services that use Square? I’m not sure if this issue is specific to the card itself, or something else.
For what it’s worth, multiple customers including my client are unable to use their cards on the site and they reside in Seattle, whereas I am based in California.
The only way you’d be able to test the card with other Square services is if you found another Square merchant to test the card with.
Your location wouldn’t make a difference. However this error is pretty specific to the card number. Are you sure the customer entered the correct card number?