This reference guide covers the technical implementation of pricing models in API calls. For conceptual information and business use cases, see our Pricing Models Guide.

Supported Pricing Model Types

When creating prices via the API, you must specify the type parameter with one of these values:
TypeDescriptionModel Parameter
unitSimple per-unit pricingunitPricingModel
fixedFixed price regardless of usagefixedPricingModel
tieredPricing tiers based on total usagetieredPricingModel
graduated_tieredDifferent rates for usage in each tiergraduatedTieredPricingModel
prepaid_tieredPre-purchased units with tier pricingprepaidTieredPricingModel
prepaid_fixed_tieredPre-purchased fixed package in a tierprepaidFixedTieredPricingModel
tiered_percentagePercentage rates based on tiertieredPercentagePricingModel
graduated_percentageGraduated percentage rates by tiergraduatedPercentagePricingModel
volume_percentagePercentage of transaction volumevolumePercentagePricingModel
Each pricing type requires its corresponding model parameter to be provided in your API request.

Request Examples

Below are examples of how to structure API requests for various pricing models:

Required and Optional Fields

Each pricing model has its own required and optional fields. The table below summarizes the base fields required for all pricing models:
FieldTypeRequiredDescription
productIdstringYesThe product ID this price applies to
typestringYesThe pricing model type (see table above)
billingIntervalstringYesBilling interval: monthly, quarterly, or yearly
[Model Parameter]objectYesThe specific model parameters (varies by type)

Common Configuration Options

All pricing models support these additional configuration options:

Trial Periods

"trialPeriodDays": 14

Spending Thresholds

"maximumSpend": {
  "amount": "1000.00",
  "period": "month"
}

Discounts

"discount": {
  "discountType": "percentage",
  "amount": "20.00",
  "durationType": "fixed",
  "durationValue": 3,
  "durationUnit": "months"
}

Field Reference

For a complete reference of all available fields for each pricing model type:
productId
string
required
The unique identifier of the product this price is for. Must be a valid product ID in the format prod_XXXXXXXXXXXXXXXXXXXX.
type
string
required
The type of pricing model to use. Possible values:
trialPeriodDays
integer
Optional number of trial days before billing begins for this price
minimumSpend
object
Optional minimum spending threshold for this price
maximumSpend
object
Optional maximum spending threshold for this price
discount
object
Optional discount to apply to this price
billingInterval
string
required
The billing interval for this price. Possible values: monthly, quarterly, yearly
unitPricingModel
object
Required when type is unit
fixedPricingModel
object
Required when type is fixed
tieredPricingModel
object
Required when type is tiered
graduatedTieredPricingModel
object
Required when type is graduated_tiered
prepaidTieredPricingModel
object
Required when type is prepaid_tiered
prepaidFixedTieredPricingModel
object
Required when type is prepaid_fixed_tiered
tieredPercentagePricingModel
object
Required when type is tiered_percentage
graduatedPercentagePricingModel
object
Required when type is graduated_percentage
volumePercentagePricingModel
object
Required when type is volume_percentage
chargeOnContractStart
boolean
Whether to charge this price on the contract start date for one-off prices. If false, the price will be charged on the first billing date. Only applicable for one-off prices in the first subscription version.

Using with Subscription Versions

When creating or updating subscription versions, you’ll include pricing model details in your request body. See the Create Subscription Version and Update Subscription Version endpoints for complete examples.