#DeputyCheese-subscription-flow

1 messages ยท Page 1 of 1 (latest)

sage cipher
#

Hello ๐Ÿ‘‹
The subscription that you create should have a latest_invoice property where you'll find a PaymentIntent that you can confirm (unless you offer a trial)

#

The PaymentIntent should then reflect requires_action status in case 3DS is required.

#

An alternative flow would be to

Create a customer > Create a subscription > Use subscription.latest_invoice.payment_intent.client_secret to render Elements, get payment method details and confirm the PaymentIntent > Subscription is now active

sturdy totem
#

Thanks, but I'm already getting an exception when I'm using $stripe->subscriptions->create(...), it also says "Payment for this subscription requires additional user action before it can be completed successfully. Payment can be completed using the PaymentIntent associated with subscription.latest_invoice." but I cannot use the response I get from the subscription creation because of this exception

#

So I cannot create the subscription

sage cipher
sturdy totem
#

Ah wait I think my mistake is using error_if_incomplete

sage cipher
#

yup, I was just going to suggest changing that ๐Ÿ™‚

sturdy totem
#

So I should use allow_incomplete instead, right?

sage cipher
#

yup