#joshglazebrook_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/1233475681112035509
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
This is reproducable via the API and the dashboard.
Existing sub, has $0.00/month price, adding usage based price, invoice preview doesn't reflect:
Existing sub, non-$0.00/month price, adding usage based price, invoice reflects the added price:
The only thing that really looks different is, when the existing price in the subscription is $0.00, the invoice preview is showing that free price for period now - end of current period. But when the price is non free, its showing the added usage based price for the period now - end of current period, but the existing price (essentials) is showing for the period after?
Thank you for that reproduction
And you say you see the same thing with similar API requests?
If you use the upcoming invoice API? https://docs.stripe.com/api/invoices/upcoming
Yes, the same thing is reflected there
That's where I noticed this first, as I was expecting these added items to show up in the "preview" of these changes but they were not, but only in the case where the subscription has an existing item that is $0.00/month.
Can you provide some request IDs for the API requests you made that returned these results?
I'm looping in a colleague to help troubleshoot this
Yeah, one moment
Let me know if these work? I did these via the workbench.
case 1 (free plan, adding usage prices): req_HyXvY2cJlV18T5
case 2 (non fre eplan, adding usage prices): req_b2VavWC7sVL10f
The first one only gives me one line item (the free plan), it doesn't show the added usage based price at all.
The second one gives me back both line items as expected (the essentials plan which isn't free) and the added usage based price.
Okay! thank you for looking into this
Okay I wanted to update you with what we have found, digging into this.
The different behaviors have to do with the billing cycle anchor getting reset when the metered price is added to the subscription. We aren't generating a 0 quantity invoice line item for the newly added metered price.
If you reset the billing cycle anchor on your non-zero price you would see the same behavior.
We will file this internally. Just to clarify, at this point we are only not rendering a $0 line item.
Okay. So is the billing cycle anchor getting reset expected?
Or should that be respecting the option for that?
In the case of the $0 price, yes that is expected. We document that here: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade#handling-zero-amount-prices-and-quantities