#highondefi_sub-schedule
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/1243478120032370739
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
Yes, all items in a single Subscription should have equal intervals. However, there's no issue with a Customer having multiple Subscriptions.
For the year -> monthly case, I suggest adding a one-time item to the Subscription: https://docs.stripe.com/api/subscriptions/create#create_subscription-add_invoice_items
And also adding a 1 year trial period. This way, the customer will pay the flat fee immediately, and then the monthly Subscription will kick off after the trial is over - in a year.
When a customer buys more items, you will just create a new Subscription objects for the same Customer.
But those new Subscription objects will result in separate new invoices correct?
Yes
Since they will be created on different days, depending on when the purchase of new items happened.
Is there a way I can have a single invoice for all those subscriptions?
If, for example, the billing day for the initial Subscription is 1st of a month, and, few months later, the new items were purchased on the 15th, the 2 subscriptions are out of sync. On what day would you like the joint Invoice to be generated?
For the new items, the one time payment should be done immediately. As of the subscription invoice, they should be generated on the first of every month
I guess then it's best to use Subscription Schedules. You would generate a separate one-off Invoice for the initial payment, and then schedule the Subscription to add an extra item in a year.
In subscription schedules, can I have parallel phases running though?
For example:
User buys 10 items (and priced at 100$ each, with subscription of 9$ per month) on May 25, 2024. He's charged 1000$ immediately and a subscription phase is scheduled to start on May 25, 2025 for 10 devices
Now, in November 2024, he buys 5 more items. So he's charged 500$ right away
and the subscription for those should start on Nov 2025
Is this achievable?
This is either 2 separate Subscriptions. Or a Subscription Schedule, where you would add extra phases (first starting on May 1, second starting on Nov 1) as they buy more products. But it's harder to manage than multiple independent Subscriptions.
Can one off items be added to phases?
Also, cancellations would be tricky to manage, I'm guessing>
*?
I would recommend just creating one-off Invoices for that. Basically, as soon as they pay the one-off fee, you update the Schedule, or create an extra Subscription.
Cancellations as in, removing selected items, or cancelling everything?
Removing selected items
With individual Subscriptions it's easy - you just cancel the whole Subscription.
With Schedules, you will have to remove a selected item for all phases.
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
highondefi_sub-schedule
I'm also exploring using meter based billing to achieve the same
Do I need to report the meters used every month? or is there an option to set a default base number of meters that get charged every month?
you can actually set a flat-fee
and basically anything between 0 to x has a unit amount of 0 but flat-fee of Y and then between x+1 -> infinity with a unit amount without a flat fee
something like this https://docs.stripe.com/billing/subscriptions/usage-based/pricing-models#fixed-fee-and-overage-model
I think I did not explain it right, apologies for that!
So I want to report my items as metered units to stripe
Say a user has purchased 10 items, with each item has a subscription of 9$ per month
Do I need to report to stripe every month, that 10 units were consumed? Or can I just set it once?
if it's a fixed qty every month then you create that as a separate price and subtract it from the usage
In a subscription schedule, can a new phase be added which has the start date to be earlier than the end date of a previous phase?
No
For example, can I have the following phases:
25th May -> Forever
14th Nov -> Forever
10th Dec -> Forever
You can't have multiple phases running in parallel
You're thinking about this all wrong
What is it you're trying to do exactly?
I have a use case where I need to start a subscription for a new user with two entities:
a one time fee based on quantity of item they add
a monthly subscription fee that kicks off a year later than (i.e. does not start immediately)
Further, users should have the option to add new items to the same subscription at a later point of time. And the monthly subscription for those specific items should kick off a year later from their purchase.
What have you tried so far?
Still researching
My plan was to use a one off payment for the one time fee
Then creating a subscription schedule for those items
When the user buys a new item sometime later, I append another phase to it
You should be able to get exactly what you need. You just need to clone and add item(s) to the first phase and configure the end date accordingly
But the start date for the items added later would be different
For example, if user buys 10 items on May 2024, the subscription for those needs to start on May 2025
If he buys 10 more items in Nov 2024, the subscription for those needs to start on Nov 2025
And there should be a single invoice for all these
I'd recommend you trying the API out and see how it works
But this would mean for both those orders, the subscription would start on Nov 2025, correct?
Can you provide an extensive example/description of what it is you're doing exactly (with dates, etc). I'm strugglign to understand
Equally, using the API is a lot easier to understand the concepts of how this all works
Sure, give me a moment
I'd recomend trying it out, and if it's not working as you need, at least we have some actual API requests with parameters that I can help debug
I just need one clarification that would help me hugely simplify my understanding
These phases aren't possible, correct?
25th May -> Forever
14th Nov -> Forever
10th Dec -> Forever
Correct:
If there are multiple phases, the end_date of one phase will always equal the start_date of the next phase. Note that past phases can be omitted.
Got it
This means I can't use schedules for my use case
Since there would be a point where I'll need two phases running in parallel
The alternative is to just use the Subscription API directly and schedule the update(s) to add the item(s) yourself
Yup, will try that! Thank you!
One last question
Is there a limit to the number of phases that can be added to one susbcription schedule object?
Also, can one subscription have multiple subscription schedules associated with it?
No limit AFAIK
No, 1:1 relationship
got it!