#jmaat-subscription

1 messages · Page 1 of 1 (latest)

mellow sapphire
desert galleon
#

When pending_setup_intent is obtained, how does the client initiate a subscription?

mellow sapphire
#

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.

desert galleon
#

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

mellow sapphire
#

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.