#ironbeard_unexpected
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/1319352416436621312
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
I think a similar situation happened with this customer: cus_P6Oqfuss8VBqc7 (if you're able to verify that I'd appreciate the sanity check).
Thanks ๐
Hi ๐
Yeah, looking at that request you are both specifying billing_anchor_date: "now" and proration_behavior: "send_invoice" so that's going to generate a new invoice because you are changing the billing cycle
Yeah ๐ mistake on my part
As for the customer.subscription.canceled event. let me double check something
Thanks ๐
I think I found a third: cus_NN071ykkkZt6KR That should be all of them
Okay so the event is customer.subscription.deleted and it should fire when the customer's Sub ends.
The subscription in this request: https://dashboard.stripe.com/logs/req_1kVQoDKoinpv0o is set to cancel at 1764175194 or 11/26/2025
Right. So 11/26/2024 was when they toggled "cancel at period end" which would have been Jan 16th 2025. So that's maybe why it says it'll cancel at 11/26/2025 (one year subscription).
So I have three people who tried to toggle their susbcriptiont to cancel at period end, but instead it generated a new invoice.
So I'm guessing I should just mark those invoices as Void, and set calendar reminders to unsubscribe their accounts on my server for the original date that it should have cancelled on.
Or you could update the cancel_at property yourself on those Subscriptions. https://docs.stripe.com/api/subscriptions/update#update_subscription-cancel_at
That way the Subscriptions will automatically cancel
But I would recommend building this scenario in test mode to test out the behavior.
Oh nice! So two of them actually cancelled before it would auto-renew, and that original date has passed. Any idea if cancel_at can take a value in the past?
No I don't think so.
Here's the def from the API ref
A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using proration_behavior. If set during a future period, this will always cause a proration for that period.
I would feel more comfortable settign that for the one that should expire on Jan 16th if it didn't have an open invoice.
It does feel like I should void those three invoices though, since "This invoice was accidentally finalized or contains a mistake."
Yeah that makes sense. Ultimately that would be up to how feel about communicating with your customers and what makes them whole
Sounds good. Thanks so much!
I think I've got everything the way I need it except for this: sub_1MQupTCoTIfwbn287Q6LlBLu
I sent the cancel date to Jan 16th, 2025, which is what it should be. But I also want to make sure that a new invoice isn't billed to them on that date
Yeah that's where I would recommend coding this scenario in Test mode and validating the behavior you want to see.
Gotcha, I'll have to figure that out
It's something I do as part of my work here so it's an approach I take pretty often.
What I would do is create a Customer (with a test clock) with the same kind of Subscription that is in the same state as your customer's before they made the update.
Then make the update to cancel at period end with the same configuration as the request you shared
I guess I'm a little surprised that the status on that subscription didn't chansge to "cancelled" when I set the cancel date to Jan 16, 2025
Well Jan 16, 2025 is still in the future
So we consider the Sub to be active until that date
Oh, yes gotcha.
Well Jan 16, 2025 is still in the future
Unless it isn't and I've been staring at my screen too long ๐
hahaha, no I realized I had some code on my side that displays a "Cancels on <date>" if my local value of cancel_at_period_end is set to True, but for my local object that's not set.
I know I should test, but should I be concerned about this invoice showing up onthe dashboard?
Okay that Invoice is being created because the new billing cycle goes until Nov 26. So this is crediting the customer for the unused time.
Right. So, when they tried to cancel on Nov26 2024, a new billing cycile from Nov26 2024-Nov26 2025 was created. So even though I've set it to cancel on Jan 16th 2025, the billing cycle still remains until Nov26th.
Does it seem like Stripe would send out that zero dollar invoice via email?
Yes I think we would notify the user of the credit