Pricing Models
Pricing Models are a way to define how your customers will be charged for your products. The Price
entity has a pricing_model
field that defines the pricing model to be used. It can be one of the following:
per_unit
tiered_volume
tiered_cumulative
tiered_flatfee
These models can be unit based or flat-fee based as shown in the following image:
Unit Based | Flat-fee Based | |
---|---|---|
Standard | ✅ | ✅ |
Tiered Pricing | ||
Volume | ✅ | |
Cumulative | ✅ | |
Flat-fee | ✅ |
Each model is specified in detail below.
Standard​
It's the most common pricing model. It's used when you want to charge your customers for each unit of your product. If variable_price=true
, the amount to be paid by the customer will be calculated based the user input, ex: consumption.
Example:
{
"name": "Standard",
"pricing_model": "per_unit",
"variable_price": true,
"unit_amount_decimal": "0.055",
"unit_amount": 6,
"unit_amount_currency": "EUR"
}
Consumption = 2000 kWh
Amount to pay = 2000 kWh * €0.055/kWh = 110 €
Tiered Volume​
It's used when you want to charge your customers for a product based on the amount of units they consume. It's necessary to define the price tiers on the Price
entity. The amount to be paid by the customer will consider the unit price of the tier according to the quantity consumed and the same unit price is applied for all the consumed units.
Example:
{
"name": "Tiered Volume",
"pricing_model": "tiered_volume",
"variable_price": true,
"unit_amount_currency": "EUR",
"tiers": [
{
"unit_amount_decimal": "0.055",
"unit_amount": 6,
"up_to": 1000
},
{
"unit_amount_decimal": "0.054",
"unit_amount": 5,
"up_to": 2000
},
{
"unit_amount_decimal": "0.053",
"unit_amount": 5,
"up_to": 3000
},
{
"unit_amount_decimal": "0.05",
"unit_amount": 5
}
]
}
Consumption = 2000 kWh
Amount to pay = 2000 kWh * €0.054/kWh = 108 €
Tiered Cumulative​
It's used when you want to charge your customers for a product based on the amount of units they consume. It's necessary to define the price tiers on the Price
entity. While similar to volume pricing, cumulative pricing charges for the usage in each tier instead of applying a single price to the tier in which the user lands on.
Example:
{
"name": "Tiered Cumulative",
"pricing_model": "tiered_cumulative",
"variable_price": true,
"unit_amount_currency": "EUR",
"tiers": [
{
"unit_amount_decimal": "0.055",
"unit_amount": 6,
"up_to": 1000
},
{
"unit_amount_decimal": "0.054",
"unit_amount": 5,
"up_to": 2000
},
{
"unit_amount_decimal": "0.053",
"unit_amount": 5,
"up_to": 3000
},
{
"unit_amount_decimal": "0.05",
"unit_amount": 5
}
]
}
Consumption = 2000 kWh
Amount to pay = 1000 kWh * €0.055/kWh + 1000 kWh * €0.054/kWh = 109 €
Tiered Flat Fee​
It's used when you want to charge your customers for a product based on a flat-fee applicable to a given amount of units consumed. It's necessary to define the price tiers on the Price
entity. While similar to tiered volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
Example:
{
"name": "Tiered Flat Fee",
"pricing_model": "tiered_flatfee",
"variable_price": true,
"unit_amount_currency": "EUR",
"tiers": [
{
"flat_fee_amount_decimal": "50.00",
"flat_fee_amount": 5000,
"up_to": 5
},
{
"flat_fee_amount_decimal": "100.00",
"flat_fee_amount": 10000,
"up_to": 7
},
{
"flat_fee_amount_decimal": "150.00",
"flat_fee_amount": 15000,
"up_to": 3000
},
{
"flat_fee_amount_decimal": "200.00",
"flat_fee_amount": 20000
}
]
}
Max peak power = 7 kW
Amount to pay = 100 €
Tier based pricing models caveats​
The tier that will be used to calculate the amount to be paid by the customer is the one that the customer lands on. The tiers ranges are defined by the up_to
field.
For example, if the customer consumes 2000 kWh, the tier that will be used is the one that goes up to 2000 kWh, or when the tier is graduated, all the ones until the landed tier.
That consumption can either be requested via a mapping input or via a quantity input. Since both could be used at the same time, the following rules apply:
- If the mapping input is used, the consumption will be the value of the mapping input.
- If the quantity input is used, the consumption will be the value of the quantity input.
- If both inputs are used, the consumption will be the value of the mapping input, ignoring the quantity input.
- If none of the inputs are used, the consumption will be assumed as 1.
The mapping input can be requested on a Journey via a NumberInputBlock mapped to the price or on an Order via the mapping input.
The quantity input can be requested on a Journey via a quantity input on a ProductSelectBlock/ShoppingCart or on an Order via the quantity input.