user image

Eslam Zedan
Published in : 2022-02-28

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

Laravel

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": "https://stripe.com/docs/error-codes/invalid-number",
    "message": "The card number is not a valid credit card number.",
    "param": "number",
    "type": "card_error"
  }
}

Comments

Rakshit Date : 2022-03-01

Best answers

34

Best answers

34

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

10

Best answers

10

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

tymon/jwt-auth 0.5.12 requires illuminate/support ~5.0
Publish date: 2022-02-18 | Comments: 2
[solved] All assets in laravel storage returns 404
Publish date: 2021-12-14 | Comments: 2
How can I use arabic words, paragraphs in the faker?
Publish date: 2022-03-06 | Comments: 1
I want to make multiple foreign keys in Laravel, can I?
Publish date: 2022-01-27 | Comments: 5
How can i pass data from blade template to vue component?
Publish date: 2022-02-11 | Comments: 1
How to pass valiables to 404 error page in laravel?
Publish date: 2022-02-21 | Comments: 2