Creating Price Plans
Learn how to model customer usage as business revenue.
General Usage: Portal
A price plan is a collection of the base price and metered components that describe what is included in the plan and how to calculate a customer's bill.
Creating price plans via the portal
Plans can be created through the Octane portal as shown below:

Enter a plan name and the period for the plan (i.e., the time span with which the plan renews). Add simple and metered components as desired.
Alternatively, you can use the Price Plan API/SDKs to create price plans.
Usage
You can subscribe a customer to a price plan. Through subscriptions you can customize a customer's billing cycle, price plan components, discounts, etc.
Definition
Field | Description | Type | Required |
---|---|---|---|
name | The plan identifier. Must be unique. Should be a dev-friendly string. NOTE: This is shown as 'ID' in the portal | String | Required |
display_name | User-friendly name shown in the Octane portal. NOTE: This is shown as 'Name' in the portal | String | Optional |
period | The time period of a full plan cycle. In the browser, Quarterly, Annual and Monthly are currently supported. In the API we additionally support Biannual billing periods. | Enum | Required |
description | Free-text description of the plan. | String | Optional |
metered_components | The set of usage-based components for this plan. | [MeteredComponent] | Optional |
base_price | Fixed charge amount per period cycle. | Float | Optional |
features | Plan metadata (features) not associated with any charge. | [Feature] | Optional |
add_ons | (Priced) additive features that customers can add to their plan. | [FeatureAddon] | Optional |
limits | Plan metadata (limits) not associated with any charge. | [FeatureLimit] | Optional |
tags | Mutable set of tags to facilitate processes such as rollouts, deployments. | [Tag] | Optional |
discount | Recurring percentage or dollar-based discount which is applied to all subscriptions by default and does not have an expiration. (Can only specify either coupon name or discount) | Discount | Optional |
Creating price plans programmatically
Currency Units
All currency fields in Octane are stored in the lowest possible denomination. For example, USD values are stored in cents, not dollars.
import octane
octane.api_key = "<YOUR_API_KEY>"
octane.PricePlan.create(
name="basic_plan",
display_name="Basic Plan",
period="month",
# This translates to $10
base_price="1000",
# Metered component to charge by the GB/hour.
metered_components=[{
# 'name' of the meter (this is the meter id/codename NOT display_name)
"meter_name": "storage",
"price_scheme": {
"unit_name": "gigabyte",
"time_unit_name": "hour",
"scheme_type": "VOLUME",
"prices": [
{"cap": 1000, "price": 0.05},
{"cap": 5000, "price": 0.03},
{"price": 0.01},
],
}
}],
# 20% discount
discount={
"discount_type": "PERCENT",
"amount": 20
}
)
import Octane from "octane-node";
const octane = new Octane("<YOUR_API_KEY>");
octane.pricePlans.create({
name: "basic_plan",
displayName: "Basic Plan",
period: "month",
// This translates to $10
basePrice: 1000,
// Metered component to charge by the GB/hour.
meteredComponent: {
// 'name' of the meter (NOT display_name)
meterName: "storage",
priceScheme: {
unitName: "gigabyte",
timeUnitName: "hour",
schemeType: "VOLUME",
prices: [
{cap: 1000, price: 0.05},
{cap: 5000, price: 0.03},
{price: 0.01},
]
}
},
// 20% discount
discount: {
discountType: "PERCENT",
amount: 20
}
});
package main
import "github.com/getoctane/octane-go"
func main() {
client := octane.NewClient("<YOUR_API_KEY>")
args := octane.CreatePricePlanArgs{
Name: "basic_plan",
DisplayName: "Basic Plan",
Period: "month",
// This translates to $10
BasePrice: 1000,
// Metered component to charge by the GB/hour.
MeteredComponents: []octane.MeteredComponentInputArgs{
{
MeterName: "storage",
PriceScheme: &octane.PriceSchemeInputArgs{
UnitName: "gigabyte",
TimeUnitName: "hour",
SchemeType: "VOLUME",
Prices: []octane.PriceInputArgs{
{
Cap: float64(1000),
Price: float64(0.05),
},
{
Cap: float64(5000),
Price: float64(0.03),
},
{
Price: float64(0.01),
},
},
},
},
},
// 20% discount
Discount: &octane.DiscountInputArgs{
DiscountType: "PERCENT",
Amount: float64(20),
},
}
_, _, err := client.PricePlans.Create(args)
if err != nil {
panic(err)
}
}
Updated about 1 year ago