#launvdw-billing
1 messages ยท Page 1 of 1 (latest)
Hi Alex, thank you for your response.
Let me send you a screenshot of what is happening for context
I have a product with 3 prices
1 price is a flat fee of say $29
with 2 metered prices that will be determined by usage records
When a user subscribes on the 7th of a month I set the billing anchor to be the 1st of the next month,
so the user will be prorated up until then. (This is working)
but what is also happening is that the user's first invoice appears to contain the flat fee price twice
April 7 - April 30 (prorated)
Remaining time on the Plan
April 30 - May 31 (full price)
I want the first invoice that a user will receive to only include the first prorated flat fee + usage records that incurred within this period
Here is the desired outcome
If I sign up on the 7th April;
- on the 1st of May I should receive an invoice for (prorated flat fee + usage records on metered prices)
- on the 1st of June I should receive an invoice for (full flat fee + usage records on metered prices)
- and so on...
gimme a while to wrap my head around this
100% thank you Alex
hmmm, can you also share the subscription id for that screenshot which you showed me? It'd look like sub_123
sub_id sub_1KlwvWIhnflvQVbic8yS0wme
can you share why you updated the subscription after first creating it?
certainly,
The subscription is created with $0 (free) based prices as the first plan is a free plan
When the user upgrades, it is then updated by removing the free price items and replacing them with the billable price items.
During the subscription.update, I also use billing_cycle_anchor: 'unchanged' to keep the original anchor that the subscription was created with (and to prevent from the subscription.update to trigger an immediate charge)
if you require any more information, or want to know any specific details, please feel free to ask ๐
it's going to take me a while, let me discuss with someone else and then get back to you, will let you know if i need more details too ๐
Sure thing, thank you for looking into this Alex, much appreciated!
@plain sorrel from what i understand, your main concern here is that the user's first invoice appears to contain the flat fee price twice. Looking at your current subscription : You actually have 4 Prices (not 3) in your Subscription when updating : https://dashboard.stripe.com/test/logs/iar_q1L8A2fN5lDnpa
That's why you have an additional flat fee
does this help?
Only one of those prices is the billable flat fee
From the four prices,
1 is the $29 flat fee
2 are metered prices
1 is a $0 flat fee to simply indicate an inclusive feature
but on the first invoice the user receives, it is as if it contains the $29 flat fee twice
1 for the prorated amount leading up to the invoice and then again it is being added for the next month (as if it is charging in advance)
I think to perhaps guide the question,
On the screenshot I attached above, why is both
7 April - 30 April and
30 April - 31 May
appearing on the same invoice
The desired outcome would be to have the invoice only include
a prorated flat fee for 7 April - 30 April + possible usage records for metered prices.
Then the billing cycle 30 April - 31 May would be received as the next invoice for the full flat fee of $29 + possible usage records for metered prices that occurred within this cycle
I believe what could solve this,
- Setting the billing anchor to the end of the month instead of the first of the next month (but this is not supported by Stripe)
or
- Charge for fixed price items in arrears as opposed to upfront (is this possible?)
okay, i think i get it - for per-seat subscription i.e. your flat fee pricing each month, it will always be charged up front.
The pro-rated amount from 7 April -30 April is included into the following invoice. The $29 is charged up front for 30 April - 31 May.
have you considered adding the flat fee to the Price model instead? Something like this?
Mmmh, so for the "flat fee" of $29
instead of it being a Standard pricing,
To rather make it a Volume pricing?
So from this
To this
weren't your other 2 prices metered pricing?
and then we create a usage record of 1 for this?
hmmm
i was thinking of adding the flat fee to your other two Prices
but i guess you could consider doing it your way instead
Ooooh, I see
BUT i do want to highlight one point
metered pricing doesn't have proration
so if you're looking to prorate the flat fee, this method isn't going to work
you would need to go back to the per-seat pricing
most merchants would typically want their user to pay the flat fee upfront though, and not at the end of the month
there really isn't a great solution here i guess
there're multiple workarounds, but most would require you to build additional custom logic
For broader context perhaps, hat we are trying to achieve is
Subscribe to this plan
which has a base fee of $29 / month
this includes 10 units of X and 10 units of Y
any additional units would be charged on a per unit bases
So the unit pricing is what is metered and the flat fee is what we added as a standard price
would you want the flat fee to be prorated?
Yes, this would be to accomodate a user signing up in the middle of the month
then you would still need to do whatever you're doing now
but a workaround could be that we do not anchor billing to a specific date and therefor we would not need to prorate and therefor we could add the flat fee as a usage base pricing
mmmh
the trade offs of building things ๐
there're multiple workarounds, but most do require some kind of custom logic. For example, you could create a one off invoice item to be added to the invoice at the end of the month. But like you said, there are trade offs : you would have to manually handle creating the invoice item and then calculate prorations yourself
I see, well this has been most useful! I really appreciate you taking the time to work through this and really understand our use case to provide constructive feedback!
Top notch support! ๐ ๐ฏ
glad to have been able to help and sorry that it took me so long to wrap my head around your use case ๐