#lenss_unexpected

1 messages · Page 1 of 1 (latest)

torn condorBOT
#

👋 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/1366711104004427857

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

cyan prawn
#

In sandbox mode, I see the invoice for the usage has been created.
In live mode - the usage just disappears.
Can you share a requestId for each case ?

torn condorBOT
junior marten
#

hi! I'm taking over this thread. can you share a request ID (req_xxx)?

restive patrol
#

Sure. give me 5 minutes to replicate this. It was a couple of days ago.

#

req_rvROpEc8dWIfZi

junior marten
#

can you explain what's the issue with this request exactly?

restive patrol
#

Better example here: req_h0lCFOjmlHRoFR
The first I sent, I couldn't repro.

First attempt:
Initial subscription ID: sub_1RGFYrPXW1iiGoAw0FKJ3MCA
Initial subscription priceID: price_1REoPqPXW1iiGoAw5iVlrzol (Amount per item after 100: $0.001)

Upgraded Subscription PriceID: price_1REoPpPXW1iiGoAwTsPSKYsM (Amount per item after 100: $0.0004)
Reported usage 150 items:

After the req: req_h0lCFOjmlHRoFR
The usage was dropped, but the invoice shows amount due $0.05 (see the picture related)

#

So the question here is: why does Stripe include amount due from reported usage when I update the price for subscription item into the upcoming invoice, but not the usage itself?

According to the docs, the usage whould be reset and customer will not be billed. This is what I see on live env, but sandbox is different.

Maybe I'm wrong 🙏

junior marten
#

give me a few minutes to look into this.

restive patrol
#

Sure

#

Thanks a lot

junior marten
#

This is what I see on live env, but sandbox is different.
the behaviour should be the same, assuming you use the same API version

#

can you share the subscriptions ID in live mode and sandbox, so I can try to compare the two?

torn condorBOT
restive patrol
#

I need more time to share live subscription id. Since this is Stripe Connect subscription

#

But why there is amount due for the subscription with no usage?

#

In the example I sent. I assume it’d be reset

unique needle
#

i.e. they owe you $0.05 for something that has yet to be invoiced, so we add it to this invoice

restive patrol
#

Yes. But this debit usage is from the events reported to meter. It was supposed to be reset when I updated price

#

At least that’s what the docs say

unique needle
restive patrol
unique needle
restive patrol
#
For example, say you have a monthly subscription that you switch from price A to price B on January 16. At the end of the month, the invoice includes usage from January 16 to January 31 at price B. Usage from January 1 to January 16 isn’t billed.
#

This is the subscription id from live that had price id updated for subscription item and usage was reset without invoice created as in example above: sub_1RAwa7H5Z0csJjYcpyZVgdsr

#

But still, if I understand the documentation correctly, updating the price must reset the usage and already reported usage should not be included in the invoice.

The subscription that got $0.05 in the invoice had nothing except metered usage reported; therefore I'd assume the invoice should be $0.00

unique needle
#

Hmm, sub_1RAwa7H5Z0csJjYcpyZVgdsrisn't a like-for-like reproduction so that's why the behaviour differs. Your updates (example) didn't generate a new invoice

in_1RAwa7H5Z0csJjYcTPshhuql is the only invoice for that subscription, generated on creation. So there's no 'reset' of the meter/usage there

restive patrol
#

I mean, yes, it's not 100% the same, but we still updated prices for metered usage and the usage was reset without invoice being created. This is what we expect.
But I'm confused with sandbox. Shouldn't it be the same (according to the docs)

#

it looks like docs are right for live. But maybe I'm missing something

unique needle
#

but we still updated prices for metered usage and the usage was reset without invoice being created. This is what we expect.
But invoices were created in the other examples you shared following your updates. This is why I said they're not like-for-like

#

I too don't know what is expected, but the two comparisons you provided aren't the same so that's likely why the behaviour differs rather than it being a live/test/sandbox thing

restive patrol
#

I see. Let me have another live example that's equal to the sandbox one. I'll get back to you.
Does that sound ok?

unique needle
#

Sure

restive patrol
#

Live subscription id: sub_1RJD4nKXBu5X0vu8gv3eNHz3

#

reported 10 events for prev price meter, then update price id for subscriprion item, my new invoice is $0.00

cyan prawn
#

Hi again,
This issue will require an in-depth investigation from our team in order to figure out the root cause. Can we ask that you write in to us via https://support.stripe.com/contact, providing as much detail and context as possible (you can also reference this thread).