#patrick-subscription-trial

1 messages · Page 1 of 1 (latest)

vale roostBOT
narrow mirage
#

Though that would create a subscription as well so I am not sure if the UI around that would be confusing for your users

grave marten
#

Ok. I was trying to avoid myself having to schedule this. We have a SaaS service with a subscription. The idea is that we collect the credit card, start the subscription with a 30-day trial, and then charge the setup fee when the sub starts. I suppose I could catch the subscription change event with a webhook and initiate the setup fee charge. That would work, right?

narrow mirage
#

Can you give me a specific example of what a customer paying you through this one time invoice and then a subscription would look like? I think I am not clear on how they are intended to interact here

#

You can definitely have a free trial and an initial setup fee on our subscriptions, can find the docs on that in a moment

grave marten
#

Ok. Our product is an automated referral mgmt service. SaaS. 89/mo. We have to spend a significant amount of time training. So we charge a one time setup fee to cover the training. At the moment, some balk at paying the training fee before seeing the svc work.

#

So we want to delay collection of everything for 30 days. It's easy to do this with the subscription portion. The one-time setup fee not so easy. I suppose we could also just refund the setup fee if unhappy customer.

#

Does that clear things up?

#

I'm learning stripe, which is an amazing product, but there is a LOT.

narrow mirage
#

Yeah definitely a lot to learn up front. I feel you there. So to be clear, do you want to charge your users 178 the first month after a 30 day free trial, and then charge 89/mo after?

grave marten
#

yes

narrow mirage
#

Or are you just looking to charge 89/mo after an initial 30 day tria

#

Gotcha

#

So I think the easiest way to do this would be to create a normal subscription with a trial

grave marten
#

async function startSubscription(stripe, paymentMethodId, customerId, price) {
// We either need to store the stripe subscription id in our db or we need to
// store the camp_id in the stripe subscription metadata.
const subscription = await stripe.subscriptions.create({
currency: 'usd',
description: '(created by Stripe Shell)',
customer: customerId,
default_payment_method: paymentMethodId,
trial_period_days: 30,
items: [
{
price: price,
},
],
})
console.log('subscription:', JSON.stringify(subscription, null, 3))

}

#

So I can just add a one-time item to the items array?

#

And it would bill 30 days later?

vale roostBOT
narrow mirage
#

items is for your recurring subscription items, add_invoice_items would be for your one-off charges on the initial invoice

#

So you would want an 89/mo recurring price in items and a one time 89 price in add_invoice_items

grave marten
#

Trial periods for subscriptions can be combined with one time prices and add_invoice_items. This may happen if you want to charge a one time fee or add on at the same time as starting a trial. Note that doing this will cause an invoice to be cut immediately for the amount of the one time item at the beginning of the trial. -- Looks to me like the setup fee will be billed immediately.

vale roostBOT
narrow mirage
#

My apologies, I forgot about that interaction. In that case, I think you would want to create the subscription without add_invoice_items and then after the subscription is created make a separate API call to add an invoice item to the Customer
https://stripe.com/docs/api/invoiceitems/create

karmic gull
#

patrick-subscription-trial

narrow mirage
#

That would be one time on your next invoice after the trial and would not be immediately billed

grave marten
#

Ok. Thx. I'm trying it.

karmic gull
#

let me know if it doesn't work

grave marten
#

It charged the setup fee immediately.

#

Subscription still has trial period. I'm reading docs to see what I missed.

karmic gull
#
  1. Create the Subscription with a trial
  2. Update the Subscription to add add_invoice_items for the next Invoice.

Alternative: Use SubscriptionSchedules

grave marten
#

oh. ok.

#

I called all at once with add invoice items.

karmic gull
#

yeah you need to do it in 2 steps otherwise the fee is added to the first Invoice for the trial period

grave marten
#

It worked. Thanks. Quick question: What do I need to do to read what emails will be sent and when in test mode? I also need to setup a test clock, right?

covert bane
#

👋 stepping in

#

We don't send emails in test mode really so as not to spam folks with fake emails.

grave marten
#

Ok. I'm using a gmail address with name+key@gmail.com. Doesn't matter, I guess. Would like to see what would be sent.