With normal payment without subscription update here are the steps I follow :
- Create subscription (server side)
- Check
subscription.latest_invoice.payment_intent.status === "requires_action"
- Send
subscription.latest_invoice.payment_intent.client_secret
to the client - Call
confirmCardPayment
using thepayment_intent_secret
But when updating the subscription I don't want to have the subscription in incomplete
state because it will overwrite the existing subscription because of the subscription.update
call.
But I do need to retrieve the payment_intent from the subscription but without overwriting.
I tried different payment_behavior
values, the error_if_incomplete
does not create the subscription but I cannot retrieve the payment_intent.
The allow_incomplete
do have a payment intent but it overwrite the existing subscription on stripe side.
I'm not sure what's the correct way of updating plan with 3D secure.