Quick reference
The
tiers field is polymorphic — its structure depends on the pricing model. For tiered it is a JSON array; for package and overage it is a JSON object. The Go SDK accepts json.RawMessage; the JavaScript SDK accepts PriceTier[] | PackageConfig | OverageConfig.Prerequisites
All examples assume you have already created a metric and a customer. See Metering and the Quickstart for how to create these.1. Flat / Per-unit pricing
Every unit costs the same fixed amount regardless of how many units are consumed. Model value:flat_unit (use PricingModel.Flat / monigo.PricingModelFlat in the SDKs)
Example: ₦2.00 per API call.
2. Tiered pricing (graduated)
Usage is divided into bands. Each unit is charged at the rate of the tier it falls into. As volume grows, units in higher tiers get cheaper — but earlier units still cost their tier’s rate. Model value:tiered
tiers field: A JSON array of { up_to, unit_amount } objects. The last tier must have up_to: null (infinity).
Example: ₦5 for the first 1 000 calls, ₦3 for the next 9 000, ₦1 beyond that.
3. Package pricing
Usage is sold in fixed-size bundles. Partial bundles are always rounded up to the next whole bundle. Model value:package
tiers field: A PackageConfig object (not an array).
Example: ₦500 per bundle of 1 000 SMS. Sending 1 500 SMS → 2 bundles → ₦1 000.
4. Overage pricing
A flatbase_price covers up to included_units. Every unit above that quota is charged at overage_price.
Model value: overage
tiers field: An OverageConfig object (not an array).
Charge formula:
5. Cap pricing
A flatbase_price covers up to included_units. Usage above the cap is not charged — the customer’s invoice shows only the base price regardless of how far over the limit they go. A subscription.usage_cap_reached webhook is fired the first time a customer crosses the cap within a billing period.
Model value: cap
tiers field: A CapConfig object (not an array).
Example: ₦10 000 flat for up to 5 000 API calls per month. The customer pays ₦10 000 whether they make 1 call or 5 000 calls — and nothing extra if they exceed 5 000.
Choosing a model
Combining multiple prices on one plan
A plan can carry multiple prices — one per metric. Each price is calculated independently and totals are summed on the invoice.Complete runnable examples
The Monigo SDKs ship with apricing-models example that creates all four plan types, subscribes a customer to each, and prints a summary.

