user image

Eslam Zedan
Published in : 2022-02-28

strip error The card number is not a valid credit card number.


I am using stripe payment with laravel it was working fine in the test mode.

after changing it to live mode any card I use for test strip returns 

The card number is not a valid credit card number.

the card is real and working fine any help

here is the response of stripe


{ "error": { "code": "invalid_number", "doc_url": "//", "message": "The card number is not a valid credit card number.", "param": "number", "type": "card_error" }}


Rakshit Date : 2022-03-01

Best answers


Best answers


This error generally occurred when Your card is real, but it uses the test API keys.

First, make sure, did you replace your test publishable and secret API keys before going live?

If yes, then check if online net banking (or International transaction if you are using a different currency) is allowed with your card. You can check by login into your bank account, or contact your bank customer care to enable the transactions.

Eslam Zedan Date : 2022-03-01

I double-checked that I am using live keys not test mode

Rakshit Date : 2022-03-01

Can you try with another card, if possible? I doubt with currency.

The issue can be from different card types other than, Mastercard, visa, discover, or Amex. Your location and currency also matter according to your government rules, so please revise them.

If you are facing the same issue, you can contact customer care / chat support for stripe directly. They can rectify the issue.

Shilpa Date : 2022-03-01

Best answers


Best answers


It means, The card number is no longer valid by Stripe and their APIs, so Stripe is declining the transaction.  Visit here on official stripe documents or ask stripe support that why was your transaction declined?


Which card are you using?

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

Undefined Variable problem on Laravel 9.x
Publish date: 2022-03-06 | Comments: 3
How to pass valiables to 404 error page in laravel?
Publish date: 2022-02-21 | Comments: 2
Laravel redirect to the last location after login
Publish date: 2022-02-21 | Comments: 1