#sahinu88_api
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/1344316886518726808
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
The request is from a "Test" mode btw
Hi there ๐ you can set proration_behavior to none when updating the Subscription to disable our proration calculations.
https://docs.stripe.com/api/subscriptions/update#update_subscription-proration_behavior
https://docs.stripe.com/billing/subscriptions/prorations#disable-prorations
Hi Toby,
thanks for the links. I actually did that. It's also in the workbench logs visible
here is a screenshot of my code-snippet
The "(new Subscriptions())" is just an api-wrapper for the stripe-php sdk
I'm taking a closer look at the Subscription related to the request you shared, but there are several update requests using different request structures, so it will take me a bit to step through all of those and see exactly which one could have led to the prorations.
Are you able to reproduce this with a new Subscription, so there aren't as many requests to sift through?
yeah sry, I tried a couple of variants. the code-snippet is the one from the latest request at 3:25:25 PM
Do you need a new Subscription Item for the new Price? Or does it work for your needs to just update the Price that the existing Subscription Item is using?
yeah I have other subscriptions, where the request seems to work as expected. just the new price with no adaptations. like this one for example
I don't actually. I tired both and on both I got for the next invoice the additional "remaining" and "unused" invoice items
But Stripe is calculating "Remaining" and "Unused" time entries for the upcoming invoice.
Where are you seeing these lines? I don't see them on the upcoming Invoice for the Subscription related to the request you shared.
on the dashboard:
if you like, I can make a new request, updating the existing subscription-item-id with the new price?
Can you share the ID of that Subscription?
sub_1QhYBZRoBQM4CK9ArgTkkjwj
Looks like that's because proration_behavior wasn't set to none in this update request, so our default behavior of create_prorations was used:
https://dashboard.stripe.com/test/logs/req_UXug9Exhaolsry
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
yeah that was yesterday. I forgot to add the parameter there
That's why the prorations are there then.
so if there was any request in the past, where the param was not set, setting the param proration_behavior in a current request is ignored or doesn't apply?
It does apply to the new update request using that parameter which is why you don't see even more proration lines, but the prorations were already created by your previous update request that didn't use that parameter.
ah got it.. so in this particular case, I would have to delete the additional lines through the dashboard?
I'm not sure there is a way to delete those proration items once they're created.
I just tried it on the dashboard, that seems to work actually. but if the reason is, that I created the proration items with my faulty request yesterday, than I guess it works as expected.
thank you for your help! I understand it a bit better now
Any time!