#Red Ranger
1 messages · Page 1 of 1 (latest)
Hey! Bit of a broad question! Is there a specific use case you're trying to account for?
Could you please share that invoiceId and what is it for ?
it's a subscription, ideally we want it to begin at the 1st of each month. something like dec 1 to dec 31
it's just a test invoice sub_1MEVZEJ3C3e7uJ9CkYnAxZ2W
When creating the Subscription you need to set the billing_cycle_anchor to the first day of the next month:
https://stripe.com/docs/api/subscriptions/create#create_subscription-billing_cycle_anchor
i know that but wouldn't it become dec 1 to jan 1? we want it to be dec 1 to dec 31
Yeah if the price billing period is monthly. If you want to achieve this you'll need to use Subscription Schedule for that:
https://stripe.com/docs/billing/subscriptions/subscription-schedules
Where you can specify the billing period you want by providing exact starting and ending dates.
it says here that "The end_date of one phase has to be the start_date for the next phase."
does that mean that it's not applicable for us?
we want it to be like this for the succeeding invoices
dec 1 - dec 31
jan 1 - jan 31
feb 1 - feb 29
can you at least explain the rationale behind "The end_date of one phase has to be the start_date for the next phase."? Stripe seems to be only doing it this way
Ok I see what you want. The billing period are Timestamps. So the interval is seconds based not days. It'll have a shared day always between periods in the invoice otherwise it will be Gapes. So you can't achieve what you want to do, neither using Subscription or Subscription Schedule