#dotan

1 messages ยท Page 1 of 1 (latest)

mint archBOT
tender quail
#

Hi ๐Ÿ‘‹

What do you mean by "metered and scheduled with a future start date baked into the url"?

faint escarp
#

Hey!

#

Thanks for replying so fast!

#

So I'm using Postman to create a checkout session

#

Successfully worked for regular sub.

#

But I'm trying to figure out how can I set it to be a metered subscription

#

(and how to update quantity used)

tender quail
#

You don't set that on the Subscription

#

that is determined by the price

faint escarp
#

And as for schedule - let's say I want to send at the beginning of the month a checkout link, but that the start date will be for only after 2 weeks

faint escarp
tender quail
#

You are talking about doing this in a Checkout session create call, correct?

faint escarp
#

Correct

tender quail
#

If you want to defer the start of the subscription you could use the subscription_data.trial_period_days parameter to create a 2 week free trial period

faint escarp
#

So what would you suggest to do if I want to send a customer a link but not charge them immediately?

#

oh

tender quail
#

Yeah that's the description of this parameter:

Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.

faint escarp
#

Is it visible to customers or it's just a hack?

tender quail
#

I can try to test it out but I think it will be visible in the summary of the charges in the Checkout interface

faint escarp
#

hmmm

#

bummer

#

Cause it's not really a trial

tender quail
#

In that case a Subscription Schedule does fit your use case better but unfortunately that isn't something you can set through the Checkout interface

faint escarp
#

Is there a way to not charge immediately when creating a subscription and send a payment link?

#

Well I see there's sending an email, but can I generate a url via API instead?

tender quail
#

What is the overall goal here?

faint escarp
#

Once customers get an invite to schedule a recurring meeting, to redirect them to complete payment based on the freq. and rate they picked

tender quail
#

Okay but you don't want to charge them right away?

#

Do you want to collect payment information?

faint escarp
#

correct, cause they may subscribe today, but the next opening is only in 2 weeks

#

And yes, we'd need to collect payment info

#

you mean instead of Stripe?

tender quail
#

No, using Stripe

faint escarp
#

Yes

tender quail
#

But the Payment Link or Checkout Session may not be the best solution here. That's what I'm trying to figure out

faint escarp
#

Got it

tender quail
#

But that won't work for you since that approach does not even create the Subscription until the start date

#

So there's no Hosted Invoice Page

faint escarp
#

exactly...

tender quail
#

But you can create a Subscription with a forward dated billing_cycle_anchor

faint escarp
#

And what about the payment page for that?

tender quail
#

That will create an invoice with a hosted invoice URL. I just tested it myself

faint escarp
#

So I can redirect to it instead of using the checkout session then?

tender quail
#

As a means of collecting payment method information, yes

faint escarp
#

ok, sounds great, what's the difference then between this and a checkout session?

tender quail
#

They are different interfaces with different capabilities. This approach requires you to create a Subscription and retrieve the latest_invoice.hosted_invoice_url to redirect your customer to, rather than creating a Checkout Session and only creating a Subscription after they provide their payment information

faint escarp
#

got it, but assuming we're generating both in RT, and I'd use their start date as their first session, in terms of UX it would be the same for them?

#

But it would mean that a subscription will be created regardless of if they complete payment or not...

tender quail
faint escarp
#

ok

#

thanks!

#

How does all of that work with metered pricing?

tender quail
faint escarp
#

Awesome, so sounds like we can achieve everything we need this way?

#

Trying to figure out if I'm missing out on something, devil is in the details...

tender quail
#

I would read the docs carefully in that case.

faint escarp
#

๐Ÿ™‚

#

Will do

#

Thank you so much!!