#jmaat-subscription
1 messages · Page 1 of 1 (latest)
Hi! If you have a trial period, then there's nothing to pay, so there's no PaymentIntent and no associated client_secret.
But you can solve that by looking at the pending_setup_intent of the subscription that also has a client_secret https://stripe.com/docs/api/subscriptions/object#subscription_object-pending_setup_intent
When pending_setup_intent is obtained, how does the client initiate a subscription?
What do you mean exactly? You use the client secret on the frontend to collect the payment information, and then confirm the setup intent.
I guess my first question should have been: why aren't you using Checkout Session to create the subscription? That would be much simpler.
Because our business needs, we need to directly fill in the card information to pay. So JS V3 is used.
Documentation on JS doesn't seem to be complete
I'm not sure I understand what you are trying to do. If you create a subscription with a trial, then there's no PaymentIntent. So if you use pending_setup_intent, then you get a SetupIntent (not a PaymentIntent).
On the frontend you pass the pending_setup_intent.client_secret to the Payment Element in order to collect the payment information. And then you confirm the SetupIntent.
This way, when the trial ends, the customer will have a payment method set and will be able to pay.