Creating Price Plans

This article talks about what a price plan is and how to create on using Togai APIs

Updated over a week ago

Price plans are plans for your revenue model

While the definition is self explanatory and simple, this where the flexibility of Togai really comes into play.

Here's the API to create a price plan. And, here's what a sample request payload would look like :

curl --request POST \
--url https://api.togai.com/price_plans \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"pricePlanDetails": {
"pricingCycleConfig": {
"interval": "MONTHLY",
"startOffset": {
"dayOffset": "4",
"monthOffset": "1"
},
"gracePeriod": 3
},
"supportedCurrencies": [
"USD"
],
"usageRateCards": [
{
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"priceType": "FLAT",
"order": 1,
"startAfter": 0
}
]
},
"rateValues": [
{
"slabRates": [
{
"rate": 40,
"order": 1
}
],
"currency": "USD"
}
],
"displayName": "Local Rides",
"usageMeterId": "um.1zYnCiM9Bpg.1zYn"
}
],
"rateDetails": {
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"priceType": "FLAT"
}
]
}
}
},
"name": "Rides - Pro plan",
"description": "Price Plan"
}
'

You can add any of the billable items (fixed fee, licenses, usage based fee, feature limits etc) into a price plan.
โ€‹
Do not forget to activate the price plan using this API. Here's what a sample request payload would look like :

curl --request POST \
--url https://api.togai.com/price_plans/price_plan_id/activate \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"currencies": [
"USD",
"INR"
]
}
'

Now that we've configured the price plans and are ready to start monetising, let's take a look at how you can ingest test data

Did this answer your question?