#nick-subscription-period
1 messages · Page 1 of 1 (latest)
Thanks 🙂
Here's another example actually https://dashboard.stripe.com/subscriptions/sub_JTt6cgrrpbRbVe
June 1 billing cycle anchor, but the period is 13 -> 13
yep, I'm looking, will take some time, never seen this before
No worries!
I've never seen before either. I thought I had finally figured out all of the intricacies around billing cycle anchors but I guess not 😛
we found something. Trying to reproduce so will take some time, but does seem unexpected/a bug
Interesting, ok. Let me know what you find!
okay I can reproduce. The problem is that you set cancel_at on the Subscription at some point and that changes the subscription's period end, and then when you "undo" the cancel_at we don't shift the period_end properly
and so it keeps that period "incorrectly
So is this a bug on your end?
Or just bad implementation from my end
And how can I fix the period?
I'd like it to be 1st to 1st for both the linked subscriptions
I'm not sure it's a bug per se, I think it's a side effect of setting cancel_at and then unsetting it
I'm not sure you can easily correct this unfortunately. My trick would be to set cancel_at to the next anchor (next month's 1st day) and then unset it which should work
Every time I've seen this sort of behaviour, the billing cycle anchor seems to always reflect the period correctly (even if the period isn't what I want it to be)
Wouldn't there almost definitely be a bug if the billing cycle anchor doesn't match the period?
Basically, I had written a script to loop through all of our subscriptions and add a trial if their billing_cycle_anchor didn't correspond to the first day of the month. These 2 would have gotten missed by that script, because their billing_cycle_anchor is the first of the month
We are raising something internally about this behavior.
And gotcha, I am just catching up on this issue. And that makes sense. As a workaround would you have been able to catch them if you also checked period_end?
Yeah like I can definitely go back and change the script to look at period start and end, that's no problem
Just wanted to make sure that the behaviour was raised. Do you guys have a public tracker for this sort of thing?
Internally people might want an explanation for what went "wrong" here
we don't have a public tracker
and the reason it's not a bug is because there's proration involved with canceled_at so changing how we charge for the remainder of the month is not easy to choose the right default.
I do find it strange, but it's not as simple as changing the period end, though maybe we should update the `billing_cycle_anchor instead in that case
I think I just expect the period_start to match the billing cycle anchor at all times (at least to the day of the month)
A subscription’s billing date is determined by two factors:
Its billing cycle anchor: This defaults to when the subscription was created—or, if you’re using a trial period, to the trial end. You can also explicitly set it at the subscription’s creation.
The recurring interval of its price or prices.
From the Stripe docs... So if the billing cycle anchor is the first of the month, and the interval on the price is monthly, the billing date should be the first of each month? Like I totally understand what you're saying, but I feel like it contradicts the documentation if the period differs from the 2 factors of billing cycle anchor and price period
I'm not disputing that, I have never seen this edge-case before (and I have worked with Billing for many years now), we'll definitely invesrtigate and clean it up, I just don't know what the right behaviour is
should we change billing_cycle_anchor or should we reset the period after unsetting cancel_at, that's the part I'm not sure what the right decision is, but I do think there's a bug in some way there
Yeah interesting problem for sure. I've noticed some similar behaviour with trials ending:
If a trial ends on a subscription, and that person doesn't have a credit card, it will change the billing_cycle_anchor
If a trial ends on a subscription and that person DOES have a credit card, the billing_cycle_anchor will remain the same
I think I've got enough information that I can work around this, hopefully you guys can figure out the proper behaviour soon.
Thanks a lot for all your help, and sorry if I came off confrontational, that was absolutely not my intent
all good I understand what you're describing and what you were asking, no worries in any way. I'd recommend reaching out to support and mentioning you talked to us on Discord and that we're working with the eng team on investigating
that way support can follow up with you
I will do that. Thanks