#marcowoldering
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- marcowoldering, 0 minutes ago, 10 messages
- marcowoldering, 4 days ago, 22 messages
woops, sorry about this
haha no problem
so to summarize your question:
when you update your subscription schedule you get some "unused time for xxx", but you don't what that correct?
and this is the Id you shared with that issue: sub_1OMRhTCI7ahsAhgWaVzP7LjW
correct
we sell cat food as a subscription, so if a customer changes his next order date, we wont come to their house to take back the remaining food ๐
Hey! Taking over for my colleague. Let me catch up.
๐
as mentioned in the other thread i use the stripe-php lib and update the subscription schedule like this:
\Stripe\SubscriptionSchedule::update(
$stripeSubscriptionSchedule->id,
[
'phases' => $phases->toArray(),
'proration_behavior' => 'none',
]
);
but the proration toggle is still on
I expect it to be inactive
Thanks for sharing these details! First of all proration_behavior is not a property for the subscription nor a mode
It's applied only when doing an update, it's not something persistant
For example, when doing this request, if the update may result a proration then no proration will be computed.
ok i understand
Ok so we agree that the dashboard proration toggle is expected ?
Do you have the exact request id resulting this ?
checking the subscription in the meanwhile
just did a new request where i change the interval to 4 weeks:
req_sF6H62UPVocM6S
And could you please describe what is the use case exaclty here? and what you want to acheive in a timeline, for example:
- customer subscribe to prodcut A for 1 month
- after 1 day customer update their subscription to product B...
- ...
offcourse
Between what you are doing in this request, it's not a proration behavior. you set explicitly the start and end date of each period/phase
proration is a result of an upgrade/downgrade
The request you are making isn't an upgrade nor a downgrade
- User makes an order for 1 package of cat food every two weeks
- Subscription is made in Stripe
- One week later the food is already gone
- User wants an extra package of cat food and change the next order date to the next day
- User makes the changes in our dashboard which is connected to the API
what happens now is because there is still a week remaining it calculates the remaining costs en removes it from the next phase
User wants an extra package of cat food and change the next order date to the next day
With what request you are doing this change in your test subscription ?
I don't see adding an item so far
\Stripe\SubscriptionSchedule::update(
$stripeSubscriptionSchedule->id,
[
'phases' => $phases->toArray(),
'proration_behavior' => 'none',
]
);
inside the phase
req_sF6H62UPVocM6S
oh in this request i only change the interval
but its the same principal
I don't see additional item
i make one adding a item one moment
If you change the interval there'll be unused time
but there is no item added
Between why not using Stripe metered prices ?
req_SE5aO39SrfSRuq
The first phase you've updated just the period, again there is no upgrade/downgrade so no proration is triggered
a collegue of you instructed that i needed to use the schedules
You've added the items to the second period
Subscription Scheduler is the good option for updating the billing interval
but it seems doesn't cover your usage based use case
if I understand well you are selling goods in a recurring way and not a service by time usage
correct
In your use case why you want to update the billing cycle of your subscription if the user ask for an additional item ?
the user can change the weekly interval
if he wants cat food every 3 weeks instead of 2 he should be able to change this
user can change:
- subscription products
- subscription product amount
- Weekly interval
- Next order date
interval is calculated for all products in the subsctiption, not per item
What you mean by this ?
in stripe you can set the interval of each subscription item seperatly, but we dont allow that for the user, the interval counts for the whole subscription
so i set the same interval for each subscription item
So for each product, you've create a price for each interval: 1 weekly, 2weeks, 3weeks, 4 weeks... ?
no if a user changes the interval, i loop through the exising products and create a new price with the given interval
and put that in the new phase
Yes exactly and you'll end up with multiple prices for each interval
So no this is not a good approach
๐
First thing is proration are triggered only if there is an upgrade/downgrade on a phase not just interval change (which is your case)
as you are selling products (cat food) and not services
I invite you to use metered prices
you can choose one of the usage based pricing model
hmm
Regarding updating the interval based on usages, I don't think it's a good option honestly, because you'll need to make multiple and complex updates to your subscription for each time a user need just an additional item
If the user need an additional cat food, they request an additional item and you record an usage
At the end of each billing period (not usage period) you send them an invoice for their usage
we used to use Recharge, to manage subscriptions but they couldnt handle bancontact payments, they were able to do all this, and they also use stripe
I'm not telling you that you can't achieve what you are trying to do
But another way to design the flow with less managment effort (e.g. creating prices for each possible interval)
I don't know Recharge, but the Subscription interval is called a billing cycle not usage cycle
what you are trying to do is to create a sort of usage cycle which couldn't fit actually
the admin can change the product price of a specific product (like a discount) so i have to make an seperate price anyway
a specific product of a specific subscription
No you should use discounts in that case and not updating the price
Happy to help, feel free to re-open another thread if you have any additional questions!