#mckeemi

1 messages · Page 1 of 1 (latest)

gusty ospreyBOT
kindred plaza
#

Why are you using a setupintent prior to creating the subscription?

#

Generally that's an unnecessary step

#

You could just create the subscription first and accept payment on that

visual carbon
#

Because some some subscriptions do not take the payment straight away but are on trial and the payment is taken in the future

#

If I create a subscription using paymentintents will the first payment be taken straight away or will it wait till TrialEndDate?

kindred plaza
#

Then just use that setupintent to collect payment info

visual carbon
#

Sorry I'm not sure what you mean, the user chooses to buy a subscription/payment plan enters the card details and creates a setup intent, when we get the setupintent succeeded webhook we then create the subscription using the setup intent payment method etc ... Is this not the correct flow?

kindred plaza
#

Yeah that's not the correct flow

#

You'd want to create the subscription object, then collect payment

#

And if you have a trial, use the pending_setup_intent instead of the invoice.payment_intent client secret to initialize elements

visual carbon
#

Thank you so much I will re-arrange the flow and see if that works, appreciate the help thanks