#ali-raza_cancel-subscription-proration
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/1292828204318457866
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi @trim wyvern sub_1P0lp9Hswjr8bdMVlmNxFpoc
with this subscription can you check why they charge less amount in last invoice
thanks! give me a few minutes to look into this.
please
anyone looking?
Hi there ๐ jumping in as my teammate needed to step away. The last Invoice was prorated because the Subscription was scheduled to cancel before the end of it's billing period. Since the Subscription ended early the amount charged for the last billing period was prorated to account for that.
That's still a difference
You need to be second-precise with when you set cancel_at if you want to avoid prorations
$keys=env('STRIPE_SECRET');
$stripe = new \Stripe\StripeClient($this->DecKeys());
$subscription=$stripe->subscriptions->update(
$payment->subscription_id,
['cancel_at' => $stop_at]
);
this is my API that i am using
what is second-precise?
The timestamp you provide for the cancel_at parameter needs to be the same as the end time of the billing period, and those need to match down to the second (not to the day).
Are you scheduling these Subscriptions to cancel while they're in their final billing period?
ali-raza_cancel-subscription-proration
we have use case
for example if today i am going to cancel subscription so we are adding 1 month notice
so this full month and next full month cancel date according to today is 30 November 2024
What time on Nov 30th you set it to cancel is important
You're providing a second-precise timestamp, not just a date.
so we need to prive date + time
Yes. You're already providing a timestamp, you just need to better align it to when the billing period will naturally end.
so if subscription star time is 1st October 2024 : 13:50 then end date shoud 1st November 2024 : 13:50
Correct, but you need to go down to the second, those times seem to only go down to the minute.