#heshiebee-subscription-trial
1 messages · Page 1 of 1 (latest)
A Payment Intent will be created for the next Invoice, so you just have to create their Payment Method and add it to the Subscription at some point before the next Invoice is generated(e.g. before the next billing cycle)
There is no way to attach it at subscription creation?
You can, assuming you mean when the Subscription is first created and the trial is set. If you want to do it at some point after the first Subscription is created (and trialing) then you would have to update the Subscription. And if you set is as the default Payment Method for that Subscription it will carry over to the non-zero Payment Intents that are charged later on.
But if the invoice is $0 it won't allow me to create that intent
Imagine a flow where on the FE I want to show a user a CC form when starting the trial
Why do you need to create a Payment Intent?
For the CC form
Just create the Payment Method and add it to the Customer for the Subscription without creating a Payment Intent
Can you define BE and FE?
👋 stepping in here as two-shoes needed to step away.
So when you create a Subscription with a trial we will provide a pending_setup_intent: https://stripe.com/docs/api/subscriptions/object#subscription_object-pending_setup_intent
You can use this SetupIntent to collect a PaymentMethod using Payment Element or Card Element.
Can u share a link please?
https://stripe.com/docs/payments/save-and-reuse discusses how to use Payment Element with a SetupIntent.
So in that guide you can ignore the steps to create a customer and create a SetupIntent as you will already have done those things.
Then you use the SetupIntent that was created from the Subscription and provide the client_secret to your frontend to render Payment Element
Thx so much