Skip to main content

Billing & subscriptions

Recurring, usage-based, and entitlement-aware billing built into the platform.

Raytio Billing manages subscriptions, plan changes, usage-based charges, and the plan capabilities a subscription grants. A subscription does two jobs at once - it produces charges, and it determines which features and limits are available to a tenant or customer. Those billing-derived capabilities are enforced alongside normal user permissions, so access and billing stay in step.

Capabilities

Subscriptions with lifecycle control

Agreements move through pending, billable, changed, payment-pending and closed states. Lines can only be edited while pending, protecting active agreements from unexpected changes to what is invoiced.

Fixed and metered lines on one model

Each line references a price with either a fixed recurring amount or a usage-aggregation rule. All lines on a subscription share a currency and billing interval.

Usage ingestion and aggregation

Raw usage events are matched and summed per billing period. Seven aggregation functions are supported: SUM, COUNT, COUNT_UNIQUE, FIRST, LAST, MAX and MIN. Aggregation rules are immutable and versioned, so historical invoices always reflect the rule that actually applied.

Structured cancellation

A cancellation records an effective date, a reason, and a final-invoice action. The final invoice can run to the end of the cycle, be prorated, or be issued immediately, so end-of-term billing behaves predictably.

Entitlements resolved in three layers

Three layers resolve together: a platform ceiling, tenant capabilities, and per-customer capabilities. Every applicable layer must allow an operation, and numeric limits take the lower value.

Quota enforcement with clear failure

Usage is counted per scope and compared before creation. Exceeding a limit returns a clear error naming the quota. Downgrades never delete existing resources - they only prevent new ones.

Overrides and trials

Administrators grant or restrict a capability with an optional end date and recorded reason. A trial is simply an override with an end date; expired overrides revert automatically.

Auditable invoice linkage

Each billing event links to exactly one invoice line for a specific period - a clean trail from subscription activity to invoice.

Notable details

Timezone-aware cycles

Each subscription stores its UTC offset so cycle boundaries are computed in the customer's local time.

Combining subscriptions

Multiple active subscriptions combine before overrides and the platform ceiling apply. Boolean capabilities OR together, and numeric limits sum.

Async invoice generation

When a subscription reaches the billable state, invoice generation is queued as a background job rather than run inline.

Part of Operate · Read the documentation →

Verified customers, protected data, and agents you can hold to account.