#siwei_unexpected

1 messages ยท Page 1 of 1 (latest)

torpid kettleBOT
#

๐Ÿ‘‹ 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.

ebon tartan
#

Hi! Do you have a subscription ID I can look at?

torpid kettleBOT
rapid pilot
#

Subscription update settings

ebon tartan
#

Do you have the object ID that starts with sub_?

rapid pilot
#

sub_1RGyDfG2ujm1dcNXofrqQcdx

livid birch
#

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

rapid pilot
#

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.

livid birch
#

How are you reporting usage?

rapid pilot
#

Using the dashboard

#

In the actual project, the API is used.

livid birch
#

Looks like the usage is recorded but on a different subscription: sub_1RGyBJG2ujm1dcNXgnY1uG9d

#

That customer has duplicate subscriptions

rapid pilot
#

This customer only has one subscription, sub_1RGyf4G2ujm1dcNX69ipbUlo, and is experiencing the same issue.

livid birch
#

I imagine it's because you're prorating charges, which usage doesn't support

rapid pilot
#

This is a real example from our production development: sub_1REo9pBCfDq2EQxH4XvJm4xO. All requests are made via the API

rapid pilot
livid birch
#

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.

Use Stripe Billing to create your usage-based billing model and then handle related tasks, such as canceling subscriptions, making mid-cycle updates, and backdating subscriptions when you create them.

#

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

rapid pilot
livid birch
#

Seems that way โ€“ not super familiar with this so I'd recommend testing

rapid pilot
#

Okay, thank you for your answer. Do you have any other suggestions on how to minimize the losses?

livid birch
#

You mean keep the usage records? You'd need to reapply them to the meter after the update

torpid kettleBOT
rapid pilot