#siwei_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/1364509022136565791
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! Do you have a subscription ID I can look at?
Subscription update settings
Do you have the object ID that starts with sub_?
sub_1RGyDfG2ujm1dcNXofrqQcdx
Taking a look
To confirm, you're querying why there's no meter usage on the new invoice created from the update?
This invoice: in_1RGyGgG2ujm1dcNXe41UtE38
My concern is that the upcoming invoice does not include the meter usage that has already been uploaded.
Of course, it would be acceptable if the new invoice created from the update includes the meter usage, but it's not the ideal outcome.
How are you reporting usage?
Looks like the usage is recorded but on a different subscription: sub_1RGyBJG2ujm1dcNXgnY1uG9d
That customer has duplicate subscriptions
This customer only has one subscription, sub_1RGyf4G2ujm1dcNX69ipbUlo, and is experiencing the same issue.
Seems like the Dashboard request to update the sub clears usage: https://dashboard.stripe.com/test/logs/req_FhAxz8uu8V90L7
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I imagine it's because you're prorating charges, which usage doesn't support
This is a real example from our production development: sub_1REo9pBCfDq2EQxH4XvJm4xO. All requests are made via the API
Do you have any suggestions for this situation?
Yes, and you're still prorating changes via always_invoice: https://dashboard.stripe.com/test/logs/req_beHeW0tkkELCOe
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Explained here:
Similar restrictions apply if you add a new subscription item with a billing meter price in the middle of the subscription cycle. For example, say you add a new subscription item with price C on 16 January. At the end of the month, the invoice includes usage from 16 January to 31 January at price C for that subscription item.
Any usage prior to the update is not accounted for and essentially discarded
On future invoices, we reflect only usage that occurs after the update
Regardless of whether I use always_invoice or not?
Seems that way โ not super familiar with this so I'd recommend testing
Okay, thank you for your answer. Do you have any other suggestions on how to minimize the losses?
You mean keep the usage records? You'd need to reapply them to the meter after the update
I understand, thank you for your answer.