#Harry_QuickReply

1 messages · Page 1 of 1 (latest)

wise masonBOT
surreal oracle
#

Otherwise, you'll need to bring your user back on-session in order for them to confirm the payment and provide 3DS/auth

#

We do not want to update the subscription, unless we receive the payment.
Sure, that's what payment_behavior: 'pending_if_incomplete' does

cunning hatch
#

user is on-session while performing update. but the above code we have run on server, does running on browser will bring it on session?

surreal oracle
#

Yes, they'll need to be client side to perform the required 3DS

cunning hatch
#

ok. so no need to manually render iframe etc, apart from calling it on client side?

#

and on the security side, how do we run it securely on client without passing secret key

surreal oracle
surreal oracle
cunning hatch
#

ok thanks

#

and using publishable key its allowed update subscription?

surreal oracle
#

No. What do you need to update on the subscription?

cunning hatch
#

suppose a customer wants to upgrade to higher plan. that is our use case

#

we want customer to be able to upgrade successfully. and if for that 3D authentication is needed, that should be taken as well

surreal oracle
#

But you've already performed the subscription update call (as shown in your original message). Payment failed, so now you need the customer to perform 3DS and confirm the payment, no?

cunning hatch
#

yes

#

and I was not sure how to let customer perform 3DS

surreal oracle
#

Then continue to do that. If/when payment fails, you need to inform your customer (listen for invoice.payment_failed events), bring them back on-session and confirm the Payment Intent on the invoice generated by the subscription update – that can be done client-side with Stripe.js and your publishable key

cunning hatch
#

ok thanks a lot this looks very helpful