#Matty-subs-prorated-charge
1 messages · Page 1 of 1 (latest)
Hi there!
Yes this is likely based on using cancel_at versus cancel_at_period_end
Can you provide an example that I can look at?
Hey @rare fractal. Sure. The sub is sub_1KbIATBBamLIIR3Zi5WRTd6U
Thanks, give me a moment to look
Yep okay so you are correct with why this is happening.
The cancel_at you are using is a few hours off of the billing period
So there are two ways to fix this really
OK.
You could update the Sub with cancel_at after it is created so that you know the exact billing period timing
Or, you can use the Subscriptions Schedules API: https://stripe.com/docs/billing/subscriptions/subscription-schedules
This would allow you to cancel after a certain amount of billing periods
Ex: I would create the sub... get the current period start and then set the cancel at for X number of months away?
Is there a way to show what invoices would be created for a subscription to test and see what the last invoice would be or show that on current live subscriptions?
You'd want to use test clocks to test this out: https://stripe.com/docs/billing/testing/test-clocks
OK. I'll try that out. Thank you for the help. Have a great day.