4
votes

We run an iOS app where we use the credit card input thing that Stripe provides through the Stripe Cocoapod. In the premade Stripe credit card input, Stripe will not even allow you to put in an invalid card number.

But somehow, we do have a few users (very few) who end up making a purchase and then they get an incorrect_number error code from Stripe when we try to make the charge.

My question is: how could a customer have an incorrect_number when it is literally impossible to input an incorrect card number into the Stripe credit card form?

In our app, there is no other way for customers to add a card number besides this Stripe credit card form. I assume it's something where maybe the customer cancelled their card, and then it becomes an invalid_number?

2
It must be on Stripe's end. Have it checked with their customer support, if you get no replies from here. - Glenn Posadas

2 Answers

3
votes

So, to answer my own question, this is what Stripe support said:

"When it comes to validating cards it is a rather complex process, the first thing we do is validate that the card would fit the standard structure, which is that it is 16 digits long and the expiration date is valid. Once this has been done, the first 6 numbers are checked, for example in the example you have provide the BIN number 545431 is the BIN number for a Mastercard credit card Gold level for the bank of 545431 CHINA MINSHENG BANKING CORP.

It is the last numbers that cause the issue, particularly the very last digit, the next 9 digits generally can't repeat sequentially(12345678) or recurring(44444444), the number is then checked against cards that we have seen from the same Bin to check if they fit the format. Finally the very last digit is the one that causes the most trouble when you try to make up a card as it uses the complex algorithm to verify the previous 15 digits, its quiet hard to come up with a random string that will satisfy the algorithm.

Due to this, you are quiet right often when you see an invalid card number error, the most likely cause is that the card was once previously an active number and has been deprecated and no longer active. "

0
votes

It's just another error code, unfortunately they're not terribly useful and you shouldn't read too much into them. The card still matches the checksum requirement, it's just somehow been added to a list to not be honored. Like everything else, the answer is for the customer to call the # on the back of their card and ask what is up.