Large number of declines & invalid card number

We’ve just rolled our product out to production, we have 80 successful transactions yesterday which show’s it is working in some case but we also received 105 declines.

We’ve correctly setup createVerificationDetails using STORE, countryCode, familyName, givenName & email. The tokenization works fine on all test cards, and a variety of live cards.

On the back-end we trigger two API’s createCard and createPayment, majority seem to be failing on the initial createCard.

These are the error codes & number of occurences. Why are we seeing such a large number of invalid_card_data, these have been pulled from our API logs. The front-end is built using the react web SDK.

  • INVALID_CARD_DATA: 61 occurrences
  • GENERIC_DECLINE: 36 occurrences

How can we lower the decline rate / invalid card, on our previous payment processor Stripe this was a non-existent issue.

: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

Cards API Overview
Handling Errors
Cards API Overview

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.

The error codes you’re encountering, INVALID_CARD_DATA and GENERIC_DECLINE, are typically related to the card information provided by the customer.

INVALID_CARD_DATA error occurs when the card information provided by the customer is incorrect. This could be due to an incorrect card number, CVV, or expiration date. It’s important to ensure that your application’s card input fields are correctly capturing and transmitting this data.

GENERIC_DECLINE error is usually returned when the card issuing bank declines the payment. The reasons for this can vary and might include insufficient funds, a closed account, or other reasons determined by the bank. In this case, the customer should contact their bank for more information.

To lower the decline rate, you could implement additional user prompts or error messages in your application to guide customers in entering their card information correctly. For example, you could add real-time validation for card input fields to check that the card number and CVV are the correct length, and that the expiration date is in the future.

Remember, the error codes are there to help protect both you and the customer from fraudulent transactions or mistakes. While it can be frustrating to see declines, these safeguards are important for maintaining the integrity of the payment process.

This answer was reviewed by @Bryan-Square.