If you are using the Subscriptions service and wondering why your customer was charged on the 1st day of the month for their 2nd cycle—while the 1st cycle charged them between the 29th and 31st of the previous month—this may be an expected behavior due to how the system handles anchor dates.
Reason for the 1st Day Charge:
When creating a subscription plan with an immediate charge between the 29th and 31st of a month, and without specifying an anchor date, the system will automatically set the anchor date as the 1st day of each month.
This means:
- The initial charge (1st cycle) occurs immediately, based on the plan's creation date (e.g., between the 29th and 31st).
- Ideally, by default the subsequent charge (2nd cycle) aligns with the anchor date, but since not all month have 29, 30, or 31 days, we make it the default to the 1st day of the following month.
How to Avoid Charges on the 1st Day of the Month:
If you prefer not to charge your customers on the 1st day of the month, you need to specify an anchor date when setting up the subscription plan. The anchor date determines the recurring billing schedule, ensuring it aligns with your preferred cycle.
For example:
- Setting an anchor date to match the subscription's start date (e.g., the 27th) will result in charges occurring on the 27th of every month
- However, please do not input the anchor date as 29, 31, or 31, because we will return an error as not all month have those dates
By adjusting the anchor date, you have greater control over when customers are charged in subsequent billing cycles.
---
You can always refer to our documentations below:
- Xendit Docs: https://docs.xendit.co/recurring/fixed-amount-subscription#video-streaming-service-example
- API Reference: https://developers.xendit.co/api-reference/?bash#plan-create