#mick23_code
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1237497754989887489
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
SaaS is a per-seat model
Previously how I've worked with Stripe Subscriptions was much simpler, i.e. 1x subscription = access to everything. So trying thnigs a bit more advanced this time round on a per-seat model.
Ultimately I want one billing cycle per month, and 1x customer invoice.
So let's say Day 1 = 1x SaaS Licence Purchased (aka. Stripe Subscribed to 1x Price). Then Day 2, I add 4x more licences so I have 5. Then realise on Day 15, that I only need 3x Licences. So I remove 2.
I'm not particularly bothered right now for pro-rata pricing for the days used, it's simply 1x full or partial month.
From what I can tell, this is where Subscription Schedules come in opposed to standard Subscriptions. Am I on the right lines here?
Yup, you can either make an update directly to the subscription using Update subscriptions API or use Subscription Schedules API to schedule these changes
So what is the actual difference between a Subscription and a Subscription Schedule then? It's not jumping out to me reading the docs.
A subscription schedule allows you to schedule updates/automate changes to a subscription.
Subscriptions API creates/updates/deletes/interacts with sub_xxx (Subscription) object
Subscription Schedules API interacts with sub_sched_xxx (Subscription Schedule object) which in turn updates sub_xx (Subscription object)
Ah right ok, so sounds like I don't need to bother with the Subscriptions Schedule stuff given that. Just the standard Subscriptions stuff.
So how does Invoicing work in this context as the Quantity on the Subscription changes throughout the month?
i.e. to keep the math simple in my previous example, let's say it's £10 / licence.
When I say Invoicing here, I'm probably more talking about actually charging the card at present (I need to discuss formal invoicing a bit later down the line in a few weeks)
I'm assuming the Card is Charged when the Quantity increases?
It depends on the proration behavior you select when you make the update
https://docs.stripe.com/billing/subscriptions/upgrade-downgrade#proration
I've already got this meta data for the Payment Method ID stored against the Customer;
invoice_settings.default_payment_method
Based on if you set proration_behavior: always_invoice then it should charge the payment method associated to the subscription (assuming you're setting collection_method: charge_automatically when you create the subscription)
Ok, I've just done a bit more reading on this. So to summarise...
always_invoice, basically creates the Invoice automatically on change of quantity and charges the card
Whereas create_prorations basically calculates the old/new quantities and ultimately what will go onto the Invoice, at the point in time when the Invoice is created, then the card will be charged at that point in time
I think I've got that right?
Yup
And thinking this through, the create_prorations is going to be the best option as without that if a Customer Subscribes to £10/month licence on Day 1, then on Day 2 Upgrades to £1000/month licence, then they are essentially getting that upgraded package for free for the first month.
Yeah, also you mentioned
#1237497754989887489 message
Ultimately I want one billing cycle per month, and 1x customer invoice.
Yeah that's right
Longer term, I envisage a fairly adaptable licencing model that changes throughout the month as new users are added and old ones removed, and B2B stuff just needs simple invoicing, not 50x separate invoices.
Right, I think I have enough to go on for the next step. Just basic Subscription stuff to get setup now.