#mikhail_subscription-bca

1 messages ยท Page 1 of 1 (latest)

past nightBOT
#

๐Ÿ‘‹ 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/1287800012536807485

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

hollow junco
#

Hello

#

Looking

pure gate
#

hello!

hollow junco
#

Okay yeah this isn't possible, you can't set a billing cycle anchor beyond the interval of the Price you are using as that doesn't make sense on how that period would be calculated. Setting the billing cycle anchor on Sub creation is used to either cut a period short or backdate.

#

Also, I highly recommend doing everything in test mode here before you start doing things in live mode.

#

So let's pause and back up a second.

#

What are you trying to accomplish exactly?

#

You say you want to "allow our customers to split out products from their subscription which creates a new subscription" -- why are you doing that?

pure gate
#

yes it had been tested beforehand but when testing, hadn't gone over this situation as it wasn't in the scope / something that had realized

past nightBOT
drifting flicker
#

mikhail_subscription-bca

pure gate
#

so for example:
a customer could have sub 1 that has products a, b, and c. they have the ability now to break out a product from sub 1 which they can do 3 things of.

  1. reschedule - the customer can pick a date to reschedule this product so for above, if they want to reschedule product a, the code => updates sub 1 and removes product a, creates a new subscription (sub 2) with product a and sets the billing_cycle_anchor with the date they selected (this date cannot be greater atm of sub 1 current_period_end date). this is working but when they try to then break out product b out of sub 1 => sub 3, it gets funky and the date throws if it seems to be out of that natural scope
  2. ship now - this does the same with breaking out a product BUT it bills now, this works fine.
  3. pause - this behaves similar in breaking out a product, but what we do is => update sub 1 and remove say product a, create sub 2 with product a AND set the billing_cycle_anchor to sub 1 next recurrence date (so that they match), and finally we then pause sub 2
#

we are doing this to give our customers some more control over their subscriptions since at the moment we have an internal team doing some of this work through the stripe ui/dashboard and this allows to take quite a bit of lift off

drifting flicker
#

this is working but when they try to then break out product b out of sub 1 => sub 3, it gets funky and the date throws if it seems to be out of that natural scope
can you explain this with a clear example with exact date(s) so we can understand what the problem is?

pure gate
#

sure, lets say:
sub 1 has the next recurrence to charge be 11/11/2024 (our recurring subs are mainly in 3 month intervals), the customer decides they want to break out a product and reschedule it, the max date at the moment is set to sub 1 current_period_end which could be 11/20/2024, they reschedule product a and a new sub 2 is created with the next recurrence date (billing_cycle_anchor) to be 11/18/2024 (they don't get charged right away). they then decide to break out product b and it seems that current_period_end is looking at both sub 1 and 2 (or is the billing cycle relative to the customer?) and if they try to reschedule product b out of sub 1 to some other date ourtide of it, it can throw the error above.

#

ideally the max date for product rescheduling is != current_period_end but instead it is next charge date / recurrence + 90 days to allow them to have some breathing room

drifting flicker
#

I'm sorry you lost me completely ๐Ÿ˜…

#

Each Subscription has their own billing cycle and they are all completely independent of each of them

#

But it's impossible to use billing_cycle_anchor to be further than the current period. So if you have a Price that charges every 3 months, you can't set billing_cycle_anchor to more than current time + Price duration

pure gate
#

haha ope

#

got it, so for rescheduling it would still focus on the current sub okay cool

#

oh ok, I have seen discussion around using trial_end to kind of wait for the next recurrence / next charge date be set, is that something of the right practice here instead?

drifting flicker
#

yes

pure gate
#

understood, so for my issue then should I just use trial end as the date for it to start for the new subscription?

drifting flicker
#

yes

pure gate
#

thank you koopajah