#harolold

1 messages · Page 1 of 1 (latest)

solar obsidianBOT
lavish idol
#

If so, what step are you stuck on? What error are you getting?

novel musk
#

yeah I guess so

#

I'm so lost sorry

lavish idol
#

Sounds like your client secret might be null or undefined. I would recommend creating console logs (e.g. console.log()); at each step of the process that uses the clientSecret and client_secret variables to see where it is working and where it isn't.

novel musk
#

so do I have to make a subscription separately for the customer

#

and add their setupintent to the subscription

#

?

lavish idol
#

There are Subscription objects and there are Customer objects. They're separate objects that interact together.

#

Not sure if that answers your question though

#

The Setup Intent is used to setup a Payment Method for recurring payments

novel musk
#

aren't subscriptions recurring payments?

lavish idol
#

Yep. That's why Setup Intents are used with Subscriptions

novel musk
lavish idol
#

It depends. If you follow that guide step by step, you can use a Payment Intent to setup the Payment Method for future usage instead. That requires you to create a Payment within the workflow though. If you wanted to create the Payment Method and set it up for future usage without charging it, then you would use Setup Intents or simply accept the Payment Method credentials without either a Setup Intent or Payment Intent (which is mentioned here:https://stripe.com/docs/payments/accept-a-payment-deferred?type=subscription)

Build an integration where you can render the Payment Element prior to creating a PaymentIntent or SetupIntent.

#

There are a lot of ways to setup subscriptions, so it's worth being specific about exactly how you want the workflow to work

novel musk
#

I want to collect the payment info and not charge them for the first time because of a 14 day free trial

#

what would be best for that

lavish idol
#

Do you want to still collect Payment Method details and set them up for payment? Or do you want to wait until the end of the trial to do that?

novel musk
#

at the beginning

lavish idol
#

In that case, you could follow along with this guide (https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements) and include a trial_end parameter when you create the Subscription during step 4. Here's more on trials that might give you some good context: https://stripe.com/docs/billing/subscriptions/trials

Create and manage subscriptions to accept recurring payments.

Delay payments on active subscriptions using trial periods.