Skip to main content
A subscription commitment is a resource of its own on a subscription. It covers the usage in a scope (the whole subscription, a price group, a meter, or one price) up to a capacity, bills that usage at a committed rate, and bills usage beyond it at an overage rate. A binding commitment is owed in full whether or not it is used. Flexprice collects it as a true-up on each period’s invoice, or through billing terms such as “$300 upfront, the rest monthly”. Benefits:
  • Pooled scopes: One commitment covers every usage price on a subscription, a price group, or a meter, including prices added later
  • Reserved and on-demand rates: A quantity commitment has its own committed price and overage price, independent of the line item’s price
  • Capacity per hour or per period: Check capacity once per billing period, or in every bucket of a bucketed price, limited to certain times of day if needed
  • Stacking: Several commitments on the same usage fill in priority order, so a base reservation and a daytime burst reservation can sit on one meter
  • Invoice lines per commitment: Usage within the commitment, the true-up and the overage are separate lines, each traced back to its commitment
Commitments configured on a subscription line item (line item commitments) keep working alongside subscription commitments. The two never price the same usage: a price that carries a line item commitment can’t be in a subscription commitment’s scope.

Concepts

Creating a Commitment

Create a commitment with Create commitment. This one reserves 8 GPUs every hour of 2027, at $2.40 per GPU hour, with usage beyond 8 GPUs billed at $3.00:
The meter’s price on the subscription is bucketed by the hour, so value: 8 is the capacity of each hour. The response is the commitment with its commitment_value, and commitment.created is sent.

Commitment Fields

start_date and end_date can fall mid-period. The first and last commitment periods are prorated.

Committed and Overage Prices

committed_price and overage_price are created as prices on the subscription, and the commitment stores their IDs as committed_price_id and overage_price_id.

Creating Commitments With a Subscription

Send the same objects in commitments on Create subscription. Flexprice sets subscription_id, and a subscription scope can leave out entity_id. The commitments are created after the subscription’s line items, and the create response returns them in commitments.

Previewing a Commitment

Preview commitment takes the same body, runs every validation, and returns the commitment with its commitment_value without saving anything. For a commitment with billing terms, it also returns the terms and every instalment they produce.

Scope

A scope is rejected when:
  • It covers no usage prices on the subscription.
  • It is a quantity commitment, or has an overage_price, and the scope covers more than one meter.
  • A price in scope doesn’t bill every subscription period, or already carries a line item commitment.
  • A meter in scope has an active entitlement on the subscription.
  • The subscription has a subscription-level commitment (commitment_amount) or a subscription entitlement grant.

Measurement and Active Windows

With measurement: billing_period, usage is the period’s total quantity (quantity commitments) or its total cost at the line items’ prices (amount commitments), and the capacity is value once per commitment period. With measurement: window, the capacity is value in every bucket of the scope’s bucketed prices. Usage is read per bucket, an empty bucket counts as zero, and unused capacity in one bucket doesn’t carry over to the next. Every price in scope must be bucketed with the same bucket size. Weekly and monthly buckets, and prices bucketed by a group-by property, are rejected. active_windows limits a window commitment to certain times of day. A bucket counts only when its start, in timezone, falls inside a range. Outside the ranges the commitment has no capacity, and the usage is billed at the overage price. Ranges are half-open, may wrap past midnight, and must not overlap. This adds 32 GPUs from 09:00 to 21:00 India time:
Billing periods follow the subscription. active_windows are read in the commitment’s timezone, which defaults to UTC like line item time-of-day buckets.

Stacking

Commitments that overlap in time and share usage fill in priority order, lowest first. Each commitment fills to its capacity before the next one receives anything. What is left after the last commitment is overage, billed at the overage price. Two commitments reserve 10 units each on the same price, C1 with priority: 0 and C2 with priority: 1: Commitments that overlap in time on the same usage must have different priorities, and the same type, measurement, bucket size and overage price.

Commitment Value

Each commitment period has an amount: commitment_value is the sum over every period of the term:
  • $100 a month from 1 Jan 2027 to 1 Jan 2028: 12 periods of $100, a value of $1,200.
  • The same commitment starting 15 Jan: the first period, 15 Jan to 1 Feb, covers 17 of January’s 31 days and is worth $54.84. With 11 full periods of $100, the value is $1,154.84.
  • The GPU reservation above: January has 744 hours, so its period is worth 8 × $2.40 × 744 = $14,284.80.

How Commitments Appear on Invoices

The usage lines in a commitment’s scope are replaced by commitment lines on each period’s invoice: Every commitment line carries commitment_id. Lines within the commitment and true-up lines are titled with the commitment’s invoice_label and carry its invoice_description. Overage lines keep the price’s own name, because overage belongs to all the commitments stacked on that usage. Creating a commitment with a past start_date, or terminating one with a past effective_at, recomputes the subscription’s draft invoices for later periods. Finalized invoices are not changed; recalculate them when needed.

Usage and Utilization

Get subscription usage returns a commitments breakdown for the queried window, one entry per commitment:

Updating a Commitment

Update commitment changes name, invoice_label, invoice_description and metadata. The new label and description apply to invoices generated afterwards. Everything else, including the scope, value, prices, dates, binding and collection method, can’t change. Sending end_date returns changing end_date is not supported yet: terminate the commitment to end it early.

Terminating a Commitment

Terminate commitment ends an active commitment immediately:
  • The commitment’s capacity stops at effective_at. The period holding it bills a floor prorated to that moment, and later periods bill no true-up.
  • The cancellation fee is billed on its own ONE_OFF invoice with billing reason COMMITMENT_TERMINATION, returned as termination_invoice_id. With a fee, effective_at can’t be before the start of the current billing period.
  • Under billing terms, scheduled instalments are cancelled and those already due are billed on the same invoice as the fee. See Terminating a commitment with billing terms.
  • The commitment’s commitment_status becomes terminated, terminated_at is set, and commitment.terminated is sent.
Cancelling the subscription or changing its plan terminates its commitments when the change takes effect.

Webhooks

The payload carries the commitment as the API returns it:

Not Supported Yet

  • Changing end_date on an existing commitment
  • Termination with a future effective_at
  • Percentage cancellation fees
  • Renewal. A follow-on contract is a new commitment

Billing Terms

Line Item Commitments