#kylewhittington-subs

1 messages · Page 1 of 1 (latest)

orchid cairn
#

@tough anchor the trial period on Prices doesn't actually get used by default

#

you have to pass trial_from_plan to opt in

tough anchor
#

Woah.. that will be it!

#

Thanks so much.

tough anchor
#

Follow up to this is that we need the clientSecret to be able to then add their card payment details. But this is null when we are specifying this free trial.

#

So the LatestInvoice.PaymentIntent.ClientSecret is what we used to get when the subscription was created, which we then passed down to Elements to then add the payment method (and take payment). But for these ones with Free Trials, that PaymentIntent object is null, so we don't have a client secret to then pass down to Elements to set the payment method. We are keen on capturing the payment details even on a free trial, so we can charge later.

orchid cairn
#

you can pass pending_setup_intent.client_secret instead and call confirmCardSetup with the CardElements etc