Create a plan with Create plan, then add prices with Create price or Create prices in bulk, with
entity_type set to PLAN and entity_id set to the plan’s ID. Add entitlements with Create entitlement. For step-by-step setup, see Creating a plan and Updating a Plan Price.Packaging prices, entitlements, and credit grants in a plan
A plan holds three kinds of records:
Because a subscription copies prices when you create it, changing a plan’s price doesn’t change what existing subscribers pay. See Changing a price on a plan with live subscriptions.
An addon holds the same three records, but a subscription has exactly one plan. You attach addons when you create the subscription or later with Add addon to subscription. The attach fails unless one of the addon’s prices has the subscription’s currency and a billing period that equals or divides evenly into the subscription’s, or is
ONETIME.
Choosing the type, billing model, and cadence of a price
This Create price body adds a usage charge to a plan, billed in graduated tiers at the end of each month:-
typeUSAGEcharges for a metered feature: setmeter_idto the feature’smeter_id.FIXEDcharges a recurring or one-time fee, such as a platform fee or a per-seat fee, priced for the line item’s quantity. That quantity starts at 1, or atmin_quantitywhen you set one. -
billing_modelFLAT_FEEchargesamountper unit.PACKAGEchargesamountfor each block oftransform_quantity.divide_byunits.TIEREDcharges bytiersandtier_mode. -
currency,billing_period, andbilling_period_countDecide which subscriptions get the price.billing_periodisDAILY,WEEKLY,MONTHLY,QUARTERLY,HALF_YEARLY,ANNUAL, orONETIME.billing_period_counthas no default, so send1unless the price covers several periods. -
invoice_cadenceADVANCEbills a fixed charge at the start of the period it covers, andARREARbills it at the end. Usage is always billed in arrear. -
price_unit_typeFIATby default.CUSTOM, with aprice_unit_config, prices in your own pricing unit, such as credits. Flexprice converts the amount intocurrencyat the unit’sconversion_ratewhen it creates the price.
Price combinations that Flexprice rejects
Creating a price with any of these fails with400 and the message shown:
The first two rules together mean that a
ONETIME price is always FIXED.
Pricing usage with volume and slab tiers
Each tier’sup_to is inclusive: with up_to: 1000, the 1,000th unit is in that tier. tier_mode decides how the tiers combine. For the tiers above and 3,000 units in a period:


- Leave
up_tonull on the last tier. WithSLAB, units above the highestup_toaren’t charged. WithVOLUME, they’re charged at the last tier’s rate. - Check the
VOLUMEboundaries. Crossing a boundary reprices every unit, so 1,000 units cost $100.00 and 1,001 units cost $80.08. UseSLABwhen the bill should never drop as usage grows. - Use
flat_amountfor a fixed fee per tier. It’s added once for the tier the total falls in withVOLUME, and once for each tier that usage reaches withSLAB.
Rounding usage into packages
APACKAGE price charges amount for each block of transform_quantity.divide_by units. transform_quantity.round handles the last, partial block: up, the default, bills it as a full block, and down drops it. With "amount": "10" and "divide_by": 1000:
With
round: down, a customer who stays below one block pays nothing for the price.
Matching plan prices to each subscription by currency and billing period
One plan can hold prices in several currencies and billing periods. When you create a subscription with acurrency and a billing_period, Flexprice attaches each plan price that hasn’t ended and that:
- has the same
currency, ignoring case, and - has the same
billing_period, or isONETIME.


400 and the message “No prices match the subscription criteria”. When the plan has no price with that billing period and no ONETIME price, the message is “The entity must have at least one price to create a subscription”. Add a price for every currency and billing period you sell before you offer them.
Combining entitlements and prices on a metered feature
An entitlement controls what a customer can use, and a price controls what they pay. Subscription charges come from line items, and every line item comes from a price, so an entitlement alone never charges anything. For a metered feature:
With
usage_limit: 1000 and 1,500 units used in a billing period, the usage price bills 500 units, and its tiers apply to those 500. Set a usage_limit only for usage you include for free, and leave it out of a metered entitlement only when you don’t charge for that usage. Features covers what an entitlement sets for each feature type.
Changing a price on a plan with live subscriptions
Update price treats two kinds of fields differently:- Pricing fields:
amount,billing_model,tier_mode,tiers,transform_quantity,bucket_size,price_unit_amount, andprice_unit_tiers. Flexprice ends the price ateffective_from, or now when you leave it out, and creates a new price with a new ID that starts at that moment. The response is the new price. - Other fields:
display_name,description,lookup_key,metadata, andgroup_id. Flexprice edits the price in place.
type, currency, billing period, invoice_cadence, and meter. effective_from needs a pricing field in the same request and can’t be earlier than the price’s start_date.
Existing subscriptions keep billing the old price, because their line items still point to it. Subscriptions you create after effective_from get only the new price. A subscription created before a future effective_from gets line items for both prices, and the old one doesn’t end at effective_from. Unless you stop creating subscriptions on the plan until that date, update the price at the moment the change takes effect instead of scheduling it.
To move existing subscribers to new usage prices, call Synchronize plan prices. It starts a background workflow over the plan’s active, trialing, draft, and incomplete subscriptions that haven’t been synced since its last usage price change, and for each one it:
- adds a line item for each usage price the subscription is missing that matches its currency, billing period, and billing period count, unless you overrode that price on the subscription, and
- ends each line item whose plan price has ended, at that price’s end date.
effective_from, and the new one starts there. Get subscription (V2) returns plan_prices_out_of_sync: true until the sync reaches a subscription.
Plans
What a plan contains and how you manage plans in Flexprice.
Volume Tiered Pricing
How one unit rate applies to all usage, set by the tier the total reaches.
Advance vs Arrear
When a charge is billed relative to the period it covers.
Updating a Plan Price
Change a plan price and sync the change to existing subscriptions.

