Error payment_methods
See original GitHub issueHello,
I am migrating from the charges API to the payment intent API for 3D Secure. I am using Stripe API 6.36.0 and node 8.4
Initial request from the Stripe Dashboard: POST Request /v1/payment_methods
{
"type": "card",
"card": {
"number": "424242******4242",
"cvc": "***",
"exp_month": "12",
"exp_year": "19"
},
"billing_details": {
"address": {
"postal_code": "75002"
}
},
"guid": "ed4e8e7e-bd47-4926-808d-1bf0813f4907",
"muid": "858fa8f7-c76d-441b-b62c-c848d12a825f",
"sid": "d9ddbd87-0747-49fb-ae61-30a5606983aa",
"pasted_fields": "number",
"payment_user_agent": "stripe.js/74d012ca; stripe-js-v3/74d012ca",
"key": "pk_test_********************n2re"
}
Response body:
{
"id": "pm_1EgTq0EqCinWwzYxBu1Za5g2",
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": "75002",
"state": null
},
"email": null,
"name": null,
"phone": null
},
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": "unchecked",
"cvc_check": "unchecked"
},
"country": "US",
"exp_month": 12,
"exp_year": 2019,
"funding": "credit",
"generated_from": null,
"last4": "4242",
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1559382560,
"customer": null,
"livemode": false,
"metadata": {
},
"type": "card"
}
Followed by POST request /v1/payment_intents
{
"amount": "1900",
"currency": "eur",
"payment_method": "pm_1EgTq0EqCinWwzYxBu1Za5g2",
}
And 400 Response:
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such payment_method: pm_1EgTq0EqCinWwzYxBu1Za5g2",
"param": "payment_method",
"type": "invalid_request_error"
}
}
Can’t understand why the payment method is being denied since it’s confirmed just above. I am following your guide here: https://stripe.com/docs/payments/payment-intents/quickstart#manual-confirmation-flow
Thanks so much for your help
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Fix payment issues on your account - Android - Google Support
Fix errors with other payment methods (direct carrier billing, online banking, Google Play Balance, Gift Cards, and more) · Go to the payments...
Read more >If your payment method is declined in the App Store or iTunes ...
On your iPhone or iPad, open the Settings app. Tap your name. Tap Payment & Shipping. Add a different payment method and remove...
Read more >Common reasons for payment error and how to resolve it
What steps should I try? 1.) Please double-check that the name, card number, expiration date, and CVV (3 or 4 digit code) entered...
Read more >Payment Error Codes - ISN
CODE TEXT DESCIPTION
I00001 Successful. The request was processed successfu...
I00002 The subscription has already been canceled. The subscription has already been ca...
I00003 The record...
Read more >Why am I receiving an error message when I try to pay?
If you're still unable to pay with your card, please contact your financial institution. In the meantime, we recommend using a different payment...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tdamant this type of error is usually caused by accidentally using API keys from a different account, or if you’re using Connect, not authenticating as the relevant account. I’d suggest double- and triple-checking that you are using the same API keys from https://dashboard.stripe.com/test/apikeys across your frontend and backend. Sometimes if you copy an example from Stripe’s docs, they have dummy keys that don’t belong to your account and that can cause issues so it’s best to check everywhere you’re using an API key that it’s from the right account.
If you’re facing trouble, you can contact Stripe’s support team at https://support.stripe.com/email with a request ID from the failed request and as many other details at possible, and they’d be glad to help!
I don’t understand why exactly, but reading this: https://stripe.com/docs/payments/payment-intents/use-cases#connected-accounts
and trying with the second option (
on_behalf_of
andtransfer_data
) instead of passing{ stripe_account: '{{CONNECTED_ACCOUNT_ID}}' }
,just works!