#incredible_panda_56720

1 messages · Page 1 of 1 (latest)

hybrid sandalBOT
random fractal
hybrid sandalBOT
random fractal
#

Since Sep doesn't have the 31st, it will be set to the last day of Sep which is 30th.

idle pecan
#

yeah that's correct ... not an issue, the problem I am facing is with this Month ...

#

term end should have been 31st Oct and not 30th Oct right ?

#

for the second customer (cus_OXZX5roGZqoZ4p), its correctly set to 31st Oct, but for the first customer(cus_Od5a67Fozs13gm), it got set to 30th Oct and it got renewed already .

dusky nymph
idle pecan
#

no its not 30th Oct, 1696118399 - this evaluates to 30th Sep .

dusky nymph
#

ah, sorry, my bad, 30th sep then

#

regardless, it's expected behaviour that subsequently, that customer is charged on 30th oct

idle pecan
#

but then for the second customer, which got created in Aug, why it was 31st for Aug , then 30th for sep and 31st for Oct . - This is the behaviour that I want .

dusky nymph
#

Essentially, what you want is always to charge on the last day of the month. That's not possible unless you implement certain custom logic in your own application.

For context, If a month doesn’t have the anchor day, the subscription will be billed on the last day of the month. For example, a subscription starting on January 31 bills on February 28 (or February 29 in a leap year), then March 31, April 30, and so on. - https://stripe.com/docs/billing/subscriptions/billing-cycle

Learn how to set the billing date for subscriptions.

idle pecan
#

ok, but then I'm failing to understand, the expected behaviour is happening in case of the second customer - cus_OXZX5roGZqoZ4p. How is it happening then ?

dusky nymph
#

what do you mean?

idle pecan
#

this customer - cus_OXZX5roGZqoZ4p, the billing cycle anchor was set to 31Aug 23.59.59, when it got renewed, its next renwal date got set to 30thSep 23.59.59 and again when it got renewed, its next renewal date got set to 31st Oct 23.59.59 .
This behaviour (of charing at the last day of month) is happening for this customer without any custom logic . why is this happening ?

dusky nymph
#

you set the billing cycle anchor to 31 that's why it'll charge on the end of every month.

#

you need to set the billing cycle anchor to the 31 of the month. The problem is that not every customer will start in a month that has 31 days

#

so if you really want to always charge at the end of the month, then you'll need to always update the billing cycle anchor every month till you get a month with 31 days

idle pecan
#

ok, now I understood alex, is there an api to update the billing cycle anchor of an existing subscription ?

dusky nymph