#samuel-_invoice-prorations-full-price

1 messages · Page 1 of 1 (latest)

jagged novaBOT
#

đź‘‹ 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/1507062793768276049

📝 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.

magic olive
#

is proration always time-based?

Yes, proration is based on the number of seconds

#

It generates prorations based on the following fraction: number of seconds in the modified period / number of seconds in the full billing period

#

So if you use proration_behavior: always_invoice, we calculate the amount the Customer owes based on the new number of seats for the fraction of the billing period it applies to and generate an Invoice for that amount

proration_behavior: none means we do not calculate or charge any prorations during the billing period in which the change was made. The customer will start paying for the extra seats at the next billing period

proration_behavior: create_prorations will calculate the fraction of the full price the customer owes but only attempt to collect it as part of the next billing cycle's Invoice

civic cypress
#

Just to confirm one more point: if the only way to charge the full amount immediately is to disable proration and create a separate invoice/invoice item, does that invoice count as an extra invoice for the subscription/customer in terms of Stripe billing or fees?

magic olive
#

Unfortunately I cannot speak to how Stripe billing fees are assessed. But if you create a new Invoice for a Customer, that is a new Invoice regardless of why you created.

#

Do you have an example Subscription ID? I just want to check something

jagged novaBOT
#

samuel-_invoice-prorations-full-price

civic cypress
#

yep, 1 min

#

sub_1TYtFcKOUHVhfNMnkFFy7TAS

If you check the last 3 invoices, they were generated while I was trying to add one more user to the subscription, but the amounts ended up being prorated/partial instead of the full price.

magic olive
#

just so I get this clear, let me spell out ao scenario and you can tell me if I am describing what you want:

  • User subscribes to Price A with a quantity of 5 - pays Invoice for the full billing period
  • Mid-way through the billing period, User updates to a quantity of 8
  • Generate an Invoice that charges for Price A with a quantity of 3 for the entire billing period (just new seats, no proration)
#

Is that correct?

civic cypress
#

yes, it is correct

jagged novaBOT
velvet forge
#

Hi there - taking over for Snufkin here

#

just trying to see if there's a way to achieve what you want

#

Do you have a test already set up for this? If yes, I can give you the parameter that I think might get you what you want when provided on the Subscription update that adds the extra seats, but if not I'll get something going

civic cypress
#

Do you mean a test subscription where I can add a new seat/update the quantity? If yes, I can update it here and test the parameter you suggest.

velvet forge
#

I started a test scenario but what I want to try is proration_date set to the current period's start

civic cypress
#

Got it, I’ll test it here too.

Just to confirm: setting proration_date to the current period start won’t change the subscription’s billing cycle/renewal date, right?

My concern is mainly the user experience. If a customer adds new seats, I don’t want the whole subscription to move to a new billing cycle. I only want to charge the full amount for the new seats while keeping the existing subscription cycle unchanged.

velvet forge
#

Right - if you reset the billing cycle you'd get an Invoice for all 8 seats for a full month

#

We're trying to avoid that

#

yep, that should work. I created a Subscription on the 1st with 5 seats at $100/seat, advanced my test clock to the 15th, and then updated the Subscription's only item to a quantity of 8 and passed the timestamp of the current period's start to proration_date

#

so that generates an Invoice for $300

civic cypress
#

but I'll try with a new one

#

just to confirm

velvet forge
#

the options on the update request look like this:

  items: [{
    id: si_123,
    quantity: 8,
  }],
  proration_date: <timestamp_current_period_end>,
  proration_behavior: 'always_invoice'
}```
#

For your next attempt can you share the Subscripion or Invoice or just the update request id instead of a screenshot of the PDF? The breakdowns there are hard to reason about

civic cypress
#

ok

#

id - sub_1TZX3kKOUHVhfNMnES1YHOa2

#

It seems to work, but I’m not fully sure yet.

I’ll test it using the test clock and advance it to tomorrow, similar to your test scenario. Testing on the same day is not enough because it was already almost working before. The issue usually appears after one day, when Stripe starts reducing the amount based on the remaining time in the billing period.

velvet forge
civic cypress
#

id - sub_1TZX3kKOUHVhfNMnES1YHOa2

I advanced the test clock by 3 days and tried adding one more seat to the same plan. It seems to have worked the amount stayed as the full amount.

I think I misunderstood my previous test. Before, I had passed today’s date as the proration_date, instead of the subscription current period end date.

Sorry, my browser forced Portuguese/Brazilian language fin screenshot

velvet forge
#

No worries - so you have the behavior you're looking for

civic cypress
#

yeah, thanks a lot for your help!