Billing Schedules Overview
Automate recurring billing with flexible scheduling and automatic invoice generation
Billing schedules automate recurring invoice generation for subscriptions, contracts, and periodic billing. Set up schedules with flexible frequencies from daily to annually, configure autopay for automatic payment collection, and define line items that appear on every invoice. Billing schedules eliminate manual invoice creation, ensure consistent billing cycles, and provide customers with predictable payment schedules.
Billing schedules automatically generate invoices based on the recurring_schedule
configuration. Each schedule contains items (billing items) that define what charges appear
on each invoice. Invoices are created on the specified billing days and include all active
items. The schedule tracks totals including recurring amount, total billed, paid, and
balance due across all generated invoices.
Common Use Cases
- Subscription Services - Monthly SaaS, annual licenses, tiered memberships, usage-based billing
- Contracts and Agreements - Quarterly maintenance, annual service agreements, retainer billing
- Recurring Services - Weekly/biweekly charges, monthly rentals, daily equipment rentals
- Membership and Clubs - Gym memberships, annual club dues, quarterly fees, weekly classes
Prerequisites
Before creating billing schedules, ensure you have:
Create schedules
Set up recurring billing schedules with flexible frequencies and billing items.
Update schedules
Manage existing schedules, change frequencies, and modify billing items.
Set up autopay
Enable automatic payment collection when invoices are generated from schedules.
Understanding Billing Schedules
Billing schedules define when and how often to automatically generate invoices.
Recurring Schedule
Defines billing frequency including daily, weekly, biweekly, bimonthly, monthly, quarterly, and annually. Each frequency specifies exact billing days or months based on the schedule type, controlling when automatic invoice generation occurs for predictable billing cycles.
Billing Items
Line items that appear on every generated invoice with value, quantity, and description. Items can have start and end dates for time-limited charges, and can be grouped for better invoice organization and structured billing presentation.
Schedule Dates
The start_date defines when billing begins and the first invoice is generated, while
end_date optionally specifies when billing stops (leave empty for indefinite billing). Items
can have independent start and end dates within the schedule for flexible charge timing.
Autopay Settings
The autopay_settings.allowed field controls automatic payment and defaults to true. When
enabled, invoices are automatically charged on their due date, requiring the payer to have a
payment method configured for seamless payment collection.
Financial Tracking
Track schedule performance with totals.recurring_amount showing the amount charged each
billing cycle, totals.total for lifetime total across all generated invoices, totals.paid
for total amount successfully paid, and totals.balance_due for outstanding unpaid balance.
Invoice Generation: Invoices are generated automatically on the scheduled billing dates.
Each invoice includes all active billing items (those within their start/end date range).
Generated invoices appear in the invoices array on the billing schedule object.
Billing Frequencies
| Frequency | Billing Cycle | Configuration | Example |
|---|---|---|---|
| Daily | Every day | No additional configuration required | Daily rental or usage-based billing |
| Weekly | Every 7 days | Bills on same day of week as start_date | Monday start_date bills every Monday |
| Biweekly | Every 14 days | Bills every two weeks on same day as start_date | Payroll-aligned billing |
| Bimonthly | Twice per month | Requires first_billing_day and second_billing_day (1-31) | 1st and 15th of each month |
| Monthly | Once per month | Requires billing_day (1-31) OR billing_weekday + billing_week | 1st of month or first Monday of month |
| Quarterly | Once per quarter | Requires config for all quarters (q1-q4) with billing_month/day | March 31, June 30, Sept 30, Dec 31 |
| Annually | Once per year | Requires billing_month (1-12) and billing_day (1-31) | January 1st or December 31st each year |
Edge Cases: When billing day exceeds days in a month (e.g., 31st in February), the invoice is generated on the last day of that month. In leap years, February 29th is used when billing day is 29-31.
Billing Items
Billing items define the charges that appear on each generated invoice.
Billing Item Types
Basic line item with fixed price and quantity.
{
type: "line_item",
description: "Pro Plan Subscription",
line_item: {
value: 49.99,
qty: 1
}
}When to use:
- Fixed monthly or annual subscription fees
- One-time service charges
- Standard recurring fees
Line item with per-unit pricing and variable quantity.
{
type: "line_item",
description: "User Licenses",
line_item: {
value: 10.00, // Per user
qty: 5 // 5 users = $50.00 total
}
}When to use:
- Per-seat or per-user pricing
- Volume-based charges
- Usage-based billing with unit pricing
Line item calculated as a percentage of other charges.
{
type: "line_item",
description: "Processing Fee",
line_item: {
value: 2.5, // 2.5%
value_units: "percentage",
qty: 1
}
}When to use:
- Processing or service fees
- Tax calculations
- Variable charges based on invoice total
Line item that only appears on invoices during specific date ranges.
{
type: "line_item",
description: "Holiday Promotion Discount",
start_date: "2024-12-01",
end_date: "2024-12-31",
line_item: {
value: -10.00, // Negative for discount
qty: 1
}
}When to use:
- Promotional discounts with expiration dates
- Seasonal charges or temporary fees
- Trial period pricing
- Limited-time add-ons
Container for organizing multiple line items on invoices.
{
type: "item_group",
description: "Base Services",
item_group: {
items: [
{
type: "line_item",
description: "Platform Access",
line_item: { value: 29.99, qty: 1 }
},
{
type: "line_item",
description: "Support",
line_item: { value: 10.00, qty: 1 }
}
]
}
}When to use:
- Grouping related charges together
- Creating invoice sections
- Organizing complex billing structures
- Improving invoice readability
Managing Billing Items
Add a new billing item to an existing schedule.
item = pl.BillingItem.create(
billing_schedule_id="bscd_abc123",
type="line_item",
description="Additional Feature",
start_date="2024-03-01", # Starts in future
line_item={
"value": 15.0,
"qty": 1
}
)When to add items:
- Adding new features or services to existing subscription
- Introducing upsells or add-ons
- Creating time-limited promotional charges
- Expanding service offerings mid-contract
Update pricing or configuration for an existing billing item.
item = pl.BillingItem.get("bcrg_abc123")
item.update(
line_item={
"value": 59.99, # New price
"qty": 1
}
)When to update items:
- Changing subscription pricing
- Adjusting quantity for per-seat billing
- Modifying item descriptions
- Updating date ranges for time-limited items
Remove a billing item from future invoices by setting an end date or deleting immediately.
# Set end_date to stop including in future invoices
item = pl.BillingItem.get("bcrg_abc123")
item.update(
end_date="2024-12-31"
)
# Or delete immediately
item_to_delete = pl.BillingItem.get("bcrg_abc123")
item_to_delete.delete()When to remove items:
- Cancelling add-on services
- Ending promotional pricing
- Removing deprecated features
- Customer downgrades or plan changes
Item Date Ranges: Use start_date and end_date on billing items to control when they
appear on invoices. This is useful for promotional pricing, seasonal charges, trial periods,
or temporary fees without modifying the main schedule.
How Billing Schedules Work
Understand the complete workflow of billing schedules.
Invoice Generation Process
Schedule Creation
Define billing frequency and schedule configuration, add billing items (line items that appear on each invoice), set start_date and optional end_date, and configure autopay settings for automatic payment collection.
Automatic Invoice Generation
First invoice is created on or after start_date according to the configured schedule. Subsequent invoices are generated automatically on billing days, with each invoice including all active billing items (those within their date ranges). Invoice due_date is calculated based on biller settings.
Payment Collection
If autopay is enabled, payment is automatically processed on the invoice due_date. If autopay is disabled, customers pay invoices manually via payment links or API. Payment allocations update schedule totals automatically as payments are received.
Schedule Tracking
Monitor schedule performance with totals.recurring_amount showing per-cycle charge,
totals.total tracking lifetime billing across all invoices, totals.paid tracking total
payments received, and totals.balance_due showing outstanding unpaid amount.
Schedule Termination
Setting an end_date stops future invoice generation while existing invoices remain and must be paid separately. The schedule maintains a complete history of all generated invoices for reporting and reconciliation.
Invoice Timing: The first invoice is generated on the first occurrence of the configured billing day/schedule on or after the start_date. For example, if start_date is January 15th and monthly billing is configured for the 1st, the first invoice generates on February 1st.
Schema Reference
Fields relevant to billing schedule configuration:
BillingSchedule Fields
id^bscd_[A-Za-z0-9]+$descriptionstart_dateend_daterecurring_scheduleannuallybilling_day1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31billing_month1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12bimonthlyfirst_billing_day1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31second_billing_day1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31monthlybilling_day1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31billing_weekfirst, lastbilling_weekday0, 1, 2, 3, 4, 5, 6quarterlyq1billing_day1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31billing_month1, 2, 3q2billing_day1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31billing_month4, 5, 6q3billing_day1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31billing_month7, 8, 9q4billing_day1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31billing_month10, 11, 12typedaily, weekly, biweekly, bimonthly, monthly, quarterly, annuallyautopay_settingsalloweddefault_tax_ratetotalsbalance_duepaidrecurring_amounttotalpayeraccountAccountaccount_id ID of Account^acct_[A-Za-z0-9]+$payer[account]=nullmethodPaymentMethodmethod_id ID of PaymentMethod^pm_[A-Za-z0-9]+$billeraccountAccountaccount_id ID of Account^acct_[A-Za-z0-9]+$biller[account]=nullmethodPaymentMethodmethod_id ID of PaymentMethod^pm_[A-Za-z0-9]+$BillingItem Fields
id^bcrg_[A-Za-z0-9]+$billing_schedule_id ID of BillingSchedule^bscd_[A-Za-z0-9]+$typeline_item, item_groupdescriptionstart_dateend_dateline_itemtype=line_itemqtytotalvaluevalue_unitspercentage, numberitem_grouptype=item_groupitemsBillingItemNext Steps
Enhance your recurring billing with automated schedules and payment workflows
Set Up Billing Schedules
Create and manage recurring billing with Create Billing Schedules to set up new recurring billing with flexible frequencies, modify existing schedules with Update Billing Schedules to change frequencies and billing items, and understand invoice generation with Creating Invoices for generated invoice structure and configuration.
Configure Payment Collection
Enable automatic payments with Automatic Payments to charge customers on invoice due dates, process manual payments with Payment API for programmatic invoice payment processing, and send payment requests with Payment Requests to share payment links via email or SMS.
Track Schedule Performance
Monitor invoice lifecycle with Invoice Statuses to track generated invoice payment status, automate post-invoice workflows with Webhook Events for real-time billing notifications, and analyze revenue metrics with Reporting Overview to track MRR, ARR, and churn.
Related articles
- Create Billing Schedules - Set up recurring billing schedules
- Update Billing Schedules - Manage schedule lifecycle
- Automatic Payments - Configure autopay settings
- Creating Invoices - Understand invoice structure
- Invoice Statuses - Track generated invoice lifecycle
- Billing Schedules API Reference - Complete API documentation