How does Orb handle billing cycle dates for monthly subscriptions?

Last updated: September 13, 2024

Orb's billing cycle system is designed to maintain consistency while accommodating the varying number of days in different months. Here's how it works:

General Rule

The billing cycle day (BCD) determines the anchor for the subscription's billing cycles, determining when invoices will be generated. For example, a subscription with a BCD of 5 would have billing cycles from the 5th to the following 5th of the month.

Specific Scenarios

Standard Dates (1st-28th)

For BCDs from the 1st to the 28th of the month, Orb will consistently use that date each month as these dates exist in all months.

29th, 30th, and 31st

For BCDs on the 29th, 30th, or 31st, Orb follows these rules:

  • If the selected date exists in the month, it will be used.

  • If the selected date doesn't exist (e.g., 31st in a 30-day month), Orb will use the last day of that month.

February and Leap Years

February presents a special case due to leap years:

  • For a BCD of 29: In leap years, February 29th will be used. In non-leap years, February 28th will be used.

  • For a BCD of 30 or 31: The last day of February (28th or 29th) will always be used.

Example

If a subscription starts on February 29th in a leap year:

  • Subsequent billings will occur on the 29th of each month when possible.

  • In months with fewer than 29 days (i.e., February in non-leap years), billing will occur on the last day of the month (February 28th).

Note: This behavior is specific to monthly billing cycles. Different logic may apply for other billing frequencies.