#marcowoldering

1 messages ยท Page 1 of 1 (latest)

tawny quiverBOT
#

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.

unborn plaza
#

woops, sorry about this

hidden grove
#

haha no problem

unborn plaza
#

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

hidden grove
#

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 ๐Ÿ˜‚

civic rose
#

Hey! Taking over for my colleague. Let me catch up.

hidden grove
#

๐Ÿ‘

#

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

civic rose
#

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

civic rose
hidden grove
#

ok i understand

civic rose
#

For each update you need to specify to have proration or not

#

Happy to help!

hidden grove
#

im doing that

#

as you can see in the code snippet

civic rose
#

Ok so we agree that the dashboard proration toggle is expected ?

hidden grove
#

yes, but it still calclutates the unused price

civic rose
#

Do you have the exact request id resulting this ?

#

checking the subscription in the meanwhile

hidden grove
#

just did a new request where i change the interval to 4 weeks:
req_sF6H62UPVocM6S

civic rose
#

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...
  • ...
hidden grove
#

offcourse

civic rose
#

proration is a result of an upgrade/downgrade

#

The request you are making isn't an upgrade nor a downgrade

hidden grove
#
  • 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

tawny quiverBOT
civic rose
#

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

hidden grove
#
\Stripe\SubscriptionSchedule::update(
    $stripeSubscriptionSchedule->id,
    [
        'phases' => $phases->toArray(),
        'proration_behavior' => 'none',
    ]
);
#

inside the phase

civic rose
#

I want a request id

#

where you are adding an additional item

hidden grove
#

req_sF6H62UPVocM6S

#

oh in this request i only change the interval

#

but its the same principal

civic rose
#

I don't see additional item

hidden grove
#

i make one adding a item one moment

civic rose
#

If you change the interval there'll be unused time

#

but there is no item added

#

Between why not using Stripe metered prices ?

hidden grove
#

req_SE5aO39SrfSRuq

civic rose
#

The first phase you've updated just the period, again there is no upgrade/downgrade so no proration is triggered

hidden grove
#

a collegue of you instructed that i needed to use the schedules

civic rose
#

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

hidden grove
#

correct

civic rose
#

In your use case why you want to update the billing cycle of your subscription if the user ask for an additional item ?

hidden grove
#

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

hidden grove
#

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

civic rose
#

So for each product, you've create a price for each interval: 1 weekly, 2weeks, 3weeks, 4 weeks... ?

hidden grove
#

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

civic rose
#

Yes exactly and you'll end up with multiple prices for each interval

#

So no this is not a good approach

hidden grove
#

๐Ÿ˜…

civic rose
#

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

hidden grove
#

hmm

civic rose
#

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

hidden grove
#

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

civic rose
#

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

hidden grove
#

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

civic rose
hidden grove
#

oke fair

#

i will do some research about the pricing-models

civic rose
#

Happy to help, feel free to re-open another thread if you have any additional questions!