#dr_goodcall

1 messages ยท Page 1 of 1 (latest)

shy windBOT
worthy vector
#

Hello happy to help but I need a bit more clarification. How are you looking for those dates to show up on your invoice? Do you want an invoice for all three months that groups the items by month? Or somethign else? I don't think we support grouping like that but I can definitely check

spark crescent
#

Sorry there is no grouping involved, each line maps to a new billing cycle invoice

#

For a subscription that only contains monthly usage metered products, I would like invoice dates of the following format :
1st day of month - last day of month

#

๐Ÿ™

worthy vector
#

Ah so the question is about changing the formatting of the dates that we show on the invoice?

spark crescent
#

The values sorry

#

Instead of this, or this

#

I need this

worthy vector
#

Ah, so specifying a custom date range? Unfortunately that is not currently possible as far as I am aware but I can add to the feedback request for it

spark crescent
#

knowing that we are in the context of billing for the past period (metered usage)

#

I'm sorry I'll try to reframe the problem :

In the context of a monthly subscription for a usage metered product (billed at the end of the period), I want each of my subscriptions billing cycles to start at the 1st day of the month and end at the last day.

Eg.

  • 1st invoice : 1 DEC 2023 - 31 DEC 2023 (good)
  • 2nd invoice : 1 JAN 2024 - 31 JAN 2024 (good)
  • 3rd invoice 1 FEB 2024 - 28 FEB 2024 (good)
  • ...

But instead my invoices dates are inconsistent, here is what I got using the time clock simulation, and setting the anchor date to first day of the month :

  • 1 DEC 2023 - 31 DEC 2023 (1st invoice) (good)
  • 31 DEC 2023 - 31 JAN 2024 (2nd invoice) (inconsistent)
  • 31 JAN 2024 - 1 MAR 2024 (3rd invoice) (inconsistent)
  • 1 MAR 2024 - 31 MAR 2024 (4th invoice) (good)

cc @worthy vector

worthy vector
#

Ah gotcha, thank you for clarifying. I am surprised by that, can you send me the ID of the subscription that you saw this for? (sub_1234)

spark crescent
#

sure!
sub_1Nkq0xKGWnKN6uDQYEZzjVEQ

worthy vector
#

Thank you checking in to that ID

#

So I see the billing cycle is anchored at 1701385200 which is 2023-11-30, if you specify a billing cycle anchor that is specifically on the first of the month I think the periods should consistently start on the 1st of the month going forward https://stripe.com/docs/api/subscriptions/create#create_subscription-billing_cycle_anchor

spark crescent
#

doesn't this setting set the anchor date?

worthy vector
#

Good point, checking this in test mode myself...

spark crescent
#

I'm sure I set it to 2023-12-01 using the UI, but maybe this is a timezone offset error?

worthy vector
#

Yep looks like it

#

Still testing to confirm, will get back with what I can see

spark crescent
#

Thanks! I'll try a new simulation as well but creating the sub using the CLI this time

shy windBOT
worthy vector
#

Strangely I'm seeing slightly different behavior from what you are. When I set the billing cycle anchor to the same thing you did (1701385200) I am seeing the invoice periods start and end on the the 29th-30th of each month. When I set the anchor to be on the 1st of the month, the invoice lists the period as the 1st to the 1st. So the change should consistently have your cycles start on the 1st at least.

spark crescent
#

Do you know if there is a way to achieve consistent start - end of month invoice?

upper lotus
#

๐Ÿ‘‹ stepping in here as Pompey needs to step away.

#

The answer is really that you should not do this.

spark crescent
#

Hey @upper lotus , thanks @worthy vector

upper lotus
#

You shouldn't pin your billing anchor to the end of the month

#

Exactly for the reasons you are seeing

#

It will always fluctuate

#

And there is no way without a ton of headache and a lot of custom code to have it always set to the last day of the month

spark crescent
#

At least it's clear ahah

#

So my best bet is to accept the following cycle on my invoices :
1 JAN - 1 FEB
1 FEB - 1 MAR
... ?

upper lotus
#

Yep

spark crescent
#

thank you! at least I can stop trying!

upper lotus
#

Glad to be able to clarify things ๐Ÿ™‚

spark crescent
#

is there a demand from your users for end of month subscription billing?

upper lotus
#

Not really. Most understand that it is much better to pin to the beginning of the month.

#

This is definitely something that has been discussed often though

spark crescent
#

I agree that it feels more natural to pay upfront, but when a subscription has both metered and non metered products, the invoice feels awkward for the customer as each line item on the invoice has a different date range (past period for metered products, upcoming for standard products)

#

not sure what would be the proper UX for the customers ๐Ÿค” one invoice for upcoming, one for past usage?

upper lotus
#

That is mostly up to you. You can either do two different Invoices/Subscriptions, or you can try and be really detailed in the description of the line items so it is clear

spark crescent
#

I'll talk with my team knowing these limitations, and try to come up with something. Thank you so much for clearing things up ๐Ÿ’ช