#Truestamp-Subscription
1 messages · Page 1 of 1 (latest)
Thank you! You saw the other parts of my message right? Including the code for how I am generating a plan products/prices?
Since I add two prices (monthly base, monthly usage) to Checkout Session, no upsell is offered for monthly plans (apparently due to more than one recurring price in Checkout
I think this limitation is due to metered price, per our Doc "All recurring prices that aren’t metered are eligible to use subscription upsells"
Yes, no worry, just created a thread from this message
Yes, I saw the "it must" section here: https://stripe.com/docs/payments/checkout/upsells#create-upsell
Really my MAIN problem right now is how to model the annual plans, so they charge an annual fee once per subscription year, but pass through the usage on a monthly invoice.
Yes I am looking at this. Normally annual Subscription means you only can charge them once per year. It applies the same to any interval (monthly/annual) and that's how our Billing product is built
Right. But would any SaaS biz only charge the usage once a year?
They might charge more.... Usage threshold does sound like a correct approach. The Doc explains the similar usage here: https://stripe.com/docs/billing/subscriptions/examples#thresholds
although it can't completely simulate "monthly" as you wish
Would there be any better way to model what I am trying to achieve? I am pretty new to Stripe Checkout.
I got my idea for the threshold from that doc. 😉 And FYI, that doc says you can use a new 'usage_gte' in addition to 'amount_gte'. But usage_gte is no supported by typescript types, and is not documented in the API docs here: https://stripe.com/docs/api/subscriptions/update.
So I think that is either a bug, or the first doc is releasing some info that is not ready yet.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It's here, in SubscriptionItem API
Hmmm.. what's difference between subscription item and subscription?
I see now over here what I did not notice before. that the examples here differentiate between a sub item and sub: https://stripe.com/docs/billing/subscriptions/examples#thresholds
That is very confusing in that threshold doc. There is nothing really to indicate that those examples are talking about two different entities
Yes sorry about that... I noticed it by looking at the code example
(the docs are generally excellent by the way)
Going back to your question, how to monthly-bill an annual Subscription, I am not aware of a way using Stripe to do such a thing. Apart from the workaround you are doing, I only can think of actually creating Monthly Subscription, then control the usage report API based on your own system tracking the usage from previous month, but that sounds too far away from the original modeling you have already going through (and doing it great)
I think the root of the problem is that the CheckoutSession won't let me add two prices, one that is annual (fee) and one that is monthly (usage). But as far as I understand if the user went through the flow two times, once for each price, they could subscribe to the annual AND the monthly. But that sounds ugly,
bad user experience.
You can create one Checkout for monthly (usage) then additionally bill your customer an annual fee (but yes you will need to communicate with your customer somehow)
Would it be possible for me to subscribe the user to the monthly usage plan behind the scenes? So when they sub to the annual fee plan, I receive webhook and subscribe them to monthly usage plan on their behalf?
Right now I am experimenting with adding the threshold in a similar way. In the customer.subscription.created webhook:
const subscriptionCreateThreshold = await stripe.subscriptions.update(
(object as any)?.id,
{ billing_thresholds: { amount_gte: 500000 } }
);
But with that idea then I'd be managing two different subs for each user which doesn't sound very good.
Yeah I would advise against it. Doesn't look clean
I think the most feasible plan would be creating a Monthly Subscription (via Checkout if you want), and separately bill your customer an annual fee. It can be done by modifying the first Invoice of the Monthly Subscription to add the fee
But, would that fee be recurring? Or I'd have to remember to do that every year on the anniversary of signup?
And free trials would be impossible too right?
(I am planning free trial for start plan, monthly or yearly)
starter
You would need to remember to do that every year, yes. Sorry I don't have a perfect solution for you. Here is how to do it: https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items
That seems perhaps not as good a solution as the threshold approach at first glance.
Trial should work, doesn't it? Because it only specify which date you want the Subscription to start. Instead of a trial annual Subscription, you will create a trial monthly Subscription
Yes but I agree threshold approach is better overall
But the trial would be on the usage sub, not the annual fee.
The Annual fee can be specified to a Subscription. And if that Subscription is in trial mode, it shouldn't be billed
The Annual (additional) Fee only be billed within the next first cycle Invoice, which is after trial ends
An idea. Is there a way (if I had the user subscribed to both annual fee and annual usage subs) to trigger the usage sub to invoice all current usage NOW, while still tracking any other usage throughout the year? So for example I make an API call via cron monthly to trigger invoicing any current usage?
Kind of like the usage threshold, but based on time (when I cron) would be the idea
I believe you can only report the usage, but can not trigger an Invoice for those reported usage. Usage is used to create the Invoice at the time of billing cycle
ok.
Hi @obtuse heron I'll take over from orakaro and continue this thread.
Give me a sec to go through the discussion
You've been super helpful. One last quick question before I let you go. I am currently modeling a single product for each plan, with four prices under that product (annual fee, annual usage, monthly fee, monthly usage). Is it right to have them all under a single product? Or better to be a product with two prices for fee, and a prod with two prices for usage
(Jack you need more than a sec to grasp the context 😄 )
haha
@obtuse heron Sorry I will need to step down. Feel free to ask Jack whatever further question you have
ok, thanks for your help!
Hi @obtuse heron to answer your last question. Yes it's OK to place the four prices under the same product.
👍
ok, well if you have any great ideas about solving my problem I am all ears. (Not really resolved, not sure if it can be with the way Stripe Checkout is built right now)
Do you mind to repeat the problem? sorry it's really a long thread 😆
ha. yeah.
The basic idea is. I want a SaaS subscription for an annual fee (say $100 year), that comes with an amount of free usage of something (say 100 API calls). I want to also subcribe them during Checkout to a 'usage' subscription (metered) but what is NOT good is that with this approach I can't collect any of their usage funds until the end of the year. Which is a problem for many reasons.
The best approach we've come up with so far is to add (after checkout session is complete) a billing threshold to the subscription. So, for example, every $100 over plan limits they would receive an invoice (and auto pay with cc on file)
Checkout won't let me mix annual fee sub, with monthly usage sub... which is a shortcoming.
Thats most of the issue I think.
Right now I plan to add a billing threshold to the users subscription (which has both fee and usage price subs) in the sub created/updated webhook
I see, have you explore payment element? it gives you more flexibilities and customizations compared to Checkout
I don't want to build any UI right now for the checkout flow. I would have to do that right?
Yes, checkout comes with a prebuilt checkout page, and payment element allows you to create a custom payment flow
I've already integrated checkout fully into my app. Its just that I am having trouble modeling what I want my SaaS subscriptions to look like using the primitives (checkout, products, prices) that Stripe provides
Checkout won't let me mix annual fee sub, with monthly usage sub.. -> is this the main problem that you want to resolve?
Do you have any suggestions related to how I might model this better? This is my code for creating one plan right now. https://gist.github.com/grempe/f112599d023dec0ca07f12df291e9155
I think so. I want the user to pay their annual fee in advance, and then each month (on a monthly cycle) be billed for any usage over a certain threshold.
I saw mention of a cross sell beta for checkout. Would this help with any of this?
OK, it is a limitation to mix annual and monthly in one subscription. How about asking the user to subscribe two prices in one checkout? you can pass multiple recurring prices in the line_items array when creating the checkout session
yes, that's what I am doing now. passing two prices in line_items. but they both have to be on the same billing cycle (annual, or monthly)
As it is now, I am forced to submit prices for annual base fee, and annual usage metered plan. But that sucks for the business owner (me) since I would not see any usage fees for a year (it bills in arrears).
That's why we talked about adding a billing threshold.
Hmm, the best advise I can give is
- separate it into two subscriptions. an annual one for the base package, and a monthly one that allow you to collect fees based on the monthly usage.
- use monthly subscription only and include the base fee inside it
So, for option 1 they would have to go through checkout flow twice right?
( poor user experience)
Can you elaborate on option 2?
As I understand, if option 2 was just a metered plan with a base fee for the first tier price that fee would be charged every month
Yup
Maybe you had something else in mind
we have the same idea
But that wouldn't actually work right? It would still be the same thing. If I changed it to monthly, the flat fee (annual fee) would be charged every month
This is the capability I want. I just don't know how I can do it with Checkout as the front end. https://stripe.com/docs/billing/subscriptions/multiple-products#multiple-subscriptions-for-a-customer
You can simultaneously create multiple subscriptions for a single customer. This capability is useful when you want to make it possible for your customers to subscribe to multiple products with separate intervals. Each subscription has its own separate billing cycle, invoice, and charge—even if the underlying prices have the same billing interval.
If I had the user subscribe to an annual fee price through Checkout, could I add a second monthly usage fee sub to that same subscription via the API (in response to the webhook announcing creation of new annual fee sub)
ok, seems we won't make any further progress here. Thanks for trying. Good night.
You cannot add a subscription to another subscription, but you can add two subscriptions to the same customer
and the customer will get both monthly and annual invoices
So I could add the monthly usage subscription to their account behind the scenes (webhook) when the annual sub is created? And it would automatically use the CC on file to pay the invoice each month?
You can use Checkout page to setup a payment method for a customer (mode=setup), and then programmatically add subscriptions to your customers
ok, I'll explore that tomorrow. Thanks for the help. Good night.