#juchom-subscriptions-failedpayment
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- .juchom, 3 days ago, 33 messages
Hello
Hello !
So to clarify, you are using payment_behavior: 'pending_if_incomplete when you update a Subscription and you are encountering a failure when 3DS is required, is that correct?
yes this is exactly my use case
Okay and is your customer on-session when you perform this update?
Actually no, I thought session was only possible when we create the subscription.
I mean is your customer actually in your flow or not?
Like are they present to complete 3DS?
when they update the subscription, they are on our website
so yes the user is present
Do you have an example Subscription from a test that you ran that I can look at?
I think you just need to pass off_session: false when you perform your update
And that will move the PaymentIntent into a requires_action where you can then have the customer complete 3DS
This subscription : sub_1OXQqvIadtM5sJMb5rajkABf
This payment intent : pi_3ObOD2IadtM5sJMb23P8ylQq
Yep, can you run a test where you set off_session: false
Where should I set the off_session ?
In my subscription_update_option ?
Here is the (dotnet expcetion message) :
StripeException: When
payment_behavioris set topending_if_incomplete, you can only pass supported params.off_sessionis not supported. See https://stripe.com/docs/billing/subscriptions/pending-updates-reference#supported-attributes for more details.
Yep that's what I was worried about
I think you need to update again but not use pending_if_incomplete if you want to handle this case. Let me double check to ensure I'm not missing anything.
Okay I confirmed.
So the two options here are that when you receive an authentication_required decline on your update then you either re-update the Subscription using payment_behavior: default_incomplete, or you can simulate a pending update by actually creating a new Subscription with the updated Price and have the customer start that Sub, if they do that successfully then you could cancel the old Sub.
Actually I don't receive authentication_required I received requires_payment_method when I try to update the subscription.
The flow I want to do is the following :
Send the update susbcription request to Stripe, but wait for payment completion before applying the changes to the subscription (aka pending_if_incomplete).
What would be the recommended way to handle payment issues, 3DS or expired card, without changing the subscription ?
Hi ๐
I"m stepping in for my colleague who needs to go soo and catching up.
Hello
Okay so have you tested creating a Subscription update with payment_behavior: 'pending_if_incomplete'?
Yes, this is the first part of my workflow and it works well with card 4242 and checking if pending_result is null.
Now, I added the card 0341 (the one that require a 3DS on next payment).
When I do the update and the check pending_result, I have an object, so I know that there is an issue with payment.
If I check latest_invoice.payment_intent_status I have requires_payment_method.
So in my server side code, I am at the point I have to handle payment issue for my user and I don't know how am I supposed to handle this
Can you share the Payment Intent ID with me? I woud like to double check something
Thanks! Taking a look
Oh! The card number you are using is NOT one that triggers 3DS but rather is the one we use to allow you to attach it to a customer but all payments fail
ho ok ๐
Try it out with this number 4000002760003184
I can't add this card to my user on the portal.
But my main issue, is how do I handle payment issues after the update.
I know there is something wrong with the pending_status object.
But I don't know what to do next.
No, you won't be able to use the Customer Portal to add this card. You will need to use the APi to update the Customer's default payment method directly. But it's the only way to test for a 3DS requirement popping up when you attempt to charge off-session.
What object are you referring to when you mention the pending_status?
I refer to the susbcription
sorry, I was thinking of pending_update
Okay, zooming out to look at the Subscription you created for that payment intent
I'm looking at your latest update request https://dashboard.stripe.com/test/logs/req_11tVUP9HmzO8EK and I see the pending_update property is populated.
But the Invoice is in open status because the payment failed
yes
Right and the Payment Intent is in payment_method_required status because the payment method used was declined (not requested 3DS).
yes, everything is as expected (which is good)
Okay, so in that case your integration would want to bring the customer back on-session to provide a new payment method
yes
But what do you mean by bring back on-session ?
Is that the same as Checkout session ?
or do you mean something else ?
on-session just means the customer is interacting with your web interface
So they are present to
- Provide new payment method data
- complete any required authentication
- etc
ho ok
So, if payment_method_required I have to redirect my user to a view to add a credit card.
If action_required I need to present the bank screen to do the validation.
Is this how am I supposed to manage it ?
Yes, that is precisely how we intend you to manage these scenarios
one last question, to not lose the "transaction" of updating my subscription, I have to update my payment intent with the new card and try to replay it ?
Correct. The Payment Intent is still valid to use. The pending_updates will be applied when the Payment Intent, and therefore the Invoice, are paid successfully
Great ๐ Happy to help ๐