#kipo.maniac
1 messages ยท Page 1 of 1 (latest)
Hi ๐ can you help me understand where you're seeing the error you're referring to being surfaced?
Hi Toby! Yes - we're seeing the 402 error in the dashboard in the Logs section.
I can share a screenshot of the error if you'd like. It's generic and contains no customer information whatsoever.
The request path is something like: POST /v1/customers/<customer-id>/sources
(Also the API version we're on is 2020-03-02, if that matters)
If it's a request to our API, then the request ID would be the most beneficial to me, but we can start with a screenshot and see what that shows.
I can also share the request ID if you'd like. My main goal here is to recreate the issue locally if I can.
Hm, I'm not exactly sure, but I suspect that is being thrown due to 3DS/SCA authentication needing to be completed. The test cards in this section are the best cards to use to test those flows:
https://stripe.com/docs/testing#authentication-and-setup
The second one listed there is a good option if you need to test triggering a 3DS challenge.
The "Always authenticate" one? I tried that but it worked without challenging me for auth ๐ค
Crap. When I said "these cards" in my first message, I meant to link to that page. Apologies!
All good. Can you elaborate on what the flow you're testing does? Can you share examples that returned the above error as well as ones that did not encounter an error when using our test cards?
Sure, so the situation I'm testing is with a customer who has a valid, working credit card already entered into the system. They've already made multiple successful payments using that credit card.
(We have a subscription-based system, so these are off-session, monthly recurring payments)
Now the customer wants to change their credit card. when they go to enter in a new credit card for their subscription through our form, they're seeing this error.
I'm following that same process in our test environment, though I'm using the test cards instead.
How are you collecting the new payment method details?
Through a form using StripeJS I believe, one moment ๐
Yup, it's a form created via Stripe Elements.
Hm, that should handle the 3DS challenge then.
I can't even get the 3DS challenge to appear in my tests. Using those test cards, I'm able to enter in the credit card numbers, the expiry date, and security code. It saves without challenging me.
What functions are you using from stripe.js? Are you confirming a Setup Intent?
This is an old form, so I don't think it's even using the "new" SetupIntents API ๐ฌ .
Then it's probably not doing the authentication challenge, which for recurring payments could lead to them failing during renewal since the Payment Method wasn't set up for future off-session payments.
I would suggest taking a look through our recommended flow for saving payment method details when you intend to charge them off-session in the future:
https://stripe.com/docs/payments/save-and-reuse?platform=web
Hmm, OK, that makes sense. Any ideas why I can't see the same error my customer is seeing through the same form? Why is it working for me and not for them? Is it possible I'm using the wrong test card? I can keep going down the list of cards, but I think one of the cards in "Authentication and Setup" would work.
I don't know offhand and don't have enough details to make a good guess. My naive guess is that the flows are different.
Do you have examples from where your customer encountered an error, as well as your tests that didn't see the same behavior?
Not that I can really share, sorry. But I can tell you it's the same form. The only differences are:
- The environment (production-like test instance and production itself)
- The credit card details (the customer is using their new credit card, and I'm using the test cards linked above)
We do have a new form in development that follows the recommended flow. It's not available to customers yet though. I'll try that and see if I can at least get the SCA challenge happening. If it does then I'm more certain that it's just something up with our old, old form ๐.
I think we're good here @radiant reef - thanks so much for your help!! I'll follow up if I figure anything out or if I come up with a new question to ask.
Sounds good, best of luck!