#nt_api

1 messages ยท Page 1 of 1 (latest)

chrome questBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • nt_api, 1 day ago, 46 messages
median sigil
#

Monthly subscription to prorated upgrade to an annual with discount:

#

Annual subscription to prorated upgrade to an annual subscription with discount:

#

See the difference in the 2 invoices. Both invoices have prorated line items. But when there is a billing cycle change, the discount amount is visible. When the billing cycle (annual->annual) stays the same, no discount amount is seen on the invoice.

#

Based on this doc both count as a proration:

  • Changing to a price with a different base cost
  • Changing to a price with a different billing interval

Use Stripe Billing to manage how your customers are charged for partial use of their subscriptions.

gloomy rapids
#

Hi there ๐Ÿ‘‹ can you share the ID of the two Invoices from your testing?

median sigil
#

Discount not visible: in_1RJYzXD8MRRUQEjfo0gawhMc
Discount visible: in_1RJYwJD8MRRUQEjf1bB2Som6

gloomy rapids
#

Thank you, taking a look.

gloomy rapids
median sigil
#

As you can see on the one invoice the discount amount is 0. That is because the discount is automatically inserted in the prorated line item's price. What is shown is the prorated item price after subtracting the discount. This can be further verified from the fact that the line item's name includes a '(with $1,200.00 off)' message

#

Also when i retrieve the invoices through the API, see the difference:

"description": "1 ร— Standard Recruiting (at $3,144.00 / year)",
          "discount_amounts": [
            {
              "amount": 90085,
              "discount": "di_1RJYwHD8MRRUQEjfWUHdbplM"
            }
          ]
     "description": "Remaining time on Standard Recruiting (with $1,200.00 off) after 01 May 2025",
          "discount_amounts": [
            {
              "amount": 0,
              "discount": "di_1RJYzWD8MRRUQEjfzN3JLdoG"
            }
          ],
lofty kraken
#

Hey there -- helping @gloomy rapids out with this and looking at your examples

#

Which invoice & item is behaving differently than you expect?

median sigil
#

I would expect both invoice items since they are both prorated, on both invoices to behave the same. That is either include the discount to the invoice item's prorated price and don't show a discount amount, or show only the prorated price without subtracting the discount amount and then after the calculation of the subtotal show the discount amount of the invoice. Since both invoices include prorated items, and the discount is applicable to both invoice items why are there 2 different results?
The docs I mentioned state that discount amounts are not shown on invoices with prorated line items. Isn't that the case for both invoices?

lofty kraken
#

Ok, the main difference between these two subscriptions/invoice is that one is dealing with changes between various annual plans only while the other starts as monthly and you change it to annual

median sigil
#

yes but both invoice items are prorations correct?

#

shouldn't they behave the same?

lofty kraken
#

Possibly, but maybe not because of the forced billing cycle reset

#

That's the key difference

#

Although you use always_invoice even on the annual plan switch, this is just invoicing the prorated items, not the renewal

#

For the monthly > annual update, this forces the billing cycle to reset and you're also getting the full renewal happening

#

Based on the changes you're trying to make, are you finding the calculated amount is wrong for one of these sequences? Which one, and what amount(s) do you expect instead?

#

Let's leave aside that the two invoices look slightly different because they follow different flows