#Aarti MusicHub

1 messages · Page 1 of 1 (latest)

inner anvilBOT
torpid orbit
#

Hi there

#

When you say the "confirm payment" email you mean the emails that are sent when 3DS is required?

serene hedge
#

yes

torpid orbit
#

So that email setting is only meant for recurring payments when your Customer is off-session. They won't send on Subscription creation as it is understood that your Customer would be on-session to create the Subscription and thus can handle 3DS in your flow.

serene hedge
#

this is for updating the existing subscription

torpid orbit
#

Ah I think the same thing applies in that case

serene hedge
#

so how do we handle the update with 3DS?

torpid orbit
#

Since it would also make sense for your Customer to be on-session to update the Subscription

#

You use stripe.confirmCardPayment() client-side

#

And that will then trigger 3DS to be completed

#

So you update the Sub --> new Invoice is generated and attempted --> if the PaymentIntent moves to requires_action you confirm client-side using stripe.confirmCardPayment()

serene hedge
#

we need the secret for confirming

#

where do we get that from?

torpid orbit
#

The Subscription's latest_invoice.payment_intent

#

Mostly depends on how exactly you are handling the update... the client_secret is from the PaymentIntent associated with the new Invoice.

#

You can get there either from the Subscription or the Invoice itself.

#

Most likely the easiest route is what I mentioned above (subscription.latest_invoice.payment_intent.client_secret)

#

You will need to use expansion to access the client_secret if you go that route.

serene hedge
#

cool, thanks! trying it now