Price Plans
Create a price plan
APIs
- Authentication
- Customers
- Accounts
- Aliases
- Event Schemas
- Usage Meters
- AddOns
- Licenses
- Feature
- Price Plans
- Settings
- Price Experimentation
- Jobs
- Event Ingestion
- Entitlements
- Event Management
- Metrics
- Credits
- Invoices
- Payments
- Wallet
- InvoiceGroups
- Alerts
- Reports
Price Plans
Create a price plan
This API letβs you create and price plan Learn more about Price Plans
POST
/
price_plans
curl --request POST \
--url https://api.togai.com/price_plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "grantCheck",
"type": "BILLING",
"description": "Starter plan",
"pricePlanDetails": {
"supportedCurrencies": [
"USD"
],
"pricingCycleConfig": {
"interval": "MONTHLY",
"startOffset": {
"dayOffset": "1",
"monthOffset": "NIL"
},
"gracePeriod": 1,
"anniversaryCycle": false
},
"usageRateCards": [
{
"displayName": "rr1",
"usageMeterId": "um.20Ms65CtgMy.nwFP0",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "FLAT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 10,
"slabRateConfig": {}
}
],
"rateConfig": {
"minimumRate": "1",
"maximumRate": "10"
}
}
],
"tag": "1"
}
],
"fixedFeeRateCards": [
{
"id": "addon.20sidL2HJ7o.vvzDT",
"rateValues": [
{
"currency": "USD",
"rate": 50
}
],
"enableProration": false,
"displayName": "normal",
"tag": "1",
"invoiceTiming": "IN_ARREARS",
"type": "RECURRING"
},
{
"id": "addon.20sidQxYRjs.4oBSU",
"rateValues": [
{
"currency": "USD",
"rate": 10
}
],
"enableProration": false,
"displayName": "anotherNormal",
"tag": "2",
"invoiceTiming": "IN_ARREARS",
"type": "RECURRING"
},
{
"id": "addon.20sidzySWoa.Bzrcc",
"rateValues": [
{
"currency": "USD",
"rate": 40
}
],
"enableProration": false,
"displayName": "inadvance",
"tag": "1",
"invoiceTiming": "IN_ADVANCE",
"type": "RECURRING"
}
],
"licenseRateCards": [
{
"id": "addon.20rzlEPp6no.1BYez",
"enableProration": false,
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "FLAT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 15,
"slabRateConfig": {}
}
],
"rateConfig": {
"minimumRate": "1",
"maximumRate": "10"
}
}
],
"displayName": "license",
"tag": "2",
"config": {}
}
],
"billingEntitlementRateCards": [
{
"featureId": "feature.20jxa18BdUW.d4XQw",
"featureConfigs": [
{
"featureCreditLimit": 100,
"effectiveUntil": "P20D"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 1,
"slabRateConfig": {}
}
]
}
],
"displayName": "feature1",
"tag": "tag_acme"
},
{
"featureId": "feature.20uE1xqEudk.MMVH8",
"featureConfigs": [
{
"featureCreditLimit": 200,
"effectiveUntil": "P20D"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 2,
"slabRateConfig": {}
}
]
}
],
"displayName": "feature2",
"tag": "tag_acme"
}
],
"minimumCommitment": {
"displayName": "Minimum Commitment",
"rateValues": [
{
"currency": "USD",
"rate": 0
}
]
},
"creditGrantRateCards": [
{
"id": "addon.20ufMNoJoAC.TUzRi",
"type": "RECURRING",
"displayName": "Credit2",
"rateDetails": {
"pricingModel": "TIERED",
"currencySlabRateDetails": [
{
"currency": "USD",
"creditAmount": 100,
"slabDetails": [
{
"startAfter": 0,
"priceType": "FLAT",
"rate": 10
}
]
}
]
},
"grantDetails": {
"priority": 1,
"expiryType": "PRICING_CYCLE",
"applicableEntityIds": []
},
"invoiceTiming": "IN_ARREARS",
"recurrenceConfig": {
"offset": 0,
"interval": 1
}
},
{
"id": "addon.20ufMNoJoAC.TUzRi",
"type": "RECURRING",
"displayName": "Credit2",
"rateDetails": {
"pricingModel": "TIERED",
"currencySlabRateDetails": [
{
"currency": "USD",
"slabDetails": [
{
"rate": 11,
"priceType": "FLAT",
"startAfter": 0,
"slabConfig": {},
"slabRateConfig": {}
}
],
"creditAmount": 11
},
{
"currency": "INR",
"slabDetails": [
{
"rate": 11,
"priceType": "FLAT",
"startAfter": 0,
"slabConfig": {},
"slabRateConfig": {}
}
],
"creditAmount": 11
}
]
},
"grantDetails": {
"priority": 1,
"expiryType": "PRICING_CYCLE",
"applicableEntityIds": []
},
"invoiceTiming": "IN_ARREARS",
"recurrenceConfig": {
"offset": 0,
"interval": 1
}
}
],
"entitlementOverageRateCards": [
{
"featureId": "feature.20jxa18BdUW.d4XQw",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 1,
"slabRateConfig": {}
}
]
}
],
"displayName": "feature1",
"tag": "tag_acme",
"maxQuantity": 50,
"billingConfig": {
"interval": 1,
"startOffset": 4
}
},
{
"featureId": "feature.20uE1xqEudk.MMVH8",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 2,
"slabRateConfig": {}
}
]
}
],
"displayName": "feature2",
"tag": "tag_acme",
"maxQuantity": 50
}
]
}
}'
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
dry_run
boolean
Body
application/json
Request to create a price plan
name
string
requiredName of the price plan
Maximum length:
50
pricePlanDetails
object
requireddescription
string
Description of price plan
Maximum length:
255
type
enum<string>
Type of price plan
Available options:
BILLING
, PURCHASE
pricingRules
object[]
Response
200 - application/json
Price plan entity
id
string
requiredPrice plan id
name
string
requiredName of the price plan
Maximum length:
50
type
enum<string>
requiredType of price plan
Available options:
BILLING
, PURCHASE
status
enum<string>
requiredStatus of Price plan
Available options:
DRAFT
, ACTIVE
, ARCHIVED
pricingSchedule
object[]
requireddescription
string
Description of price plan
Maximum length:
255
curl --request POST \
--url https://api.togai.com/price_plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "grantCheck",
"type": "BILLING",
"description": "Starter plan",
"pricePlanDetails": {
"supportedCurrencies": [
"USD"
],
"pricingCycleConfig": {
"interval": "MONTHLY",
"startOffset": {
"dayOffset": "1",
"monthOffset": "NIL"
},
"gracePeriod": 1,
"anniversaryCycle": false
},
"usageRateCards": [
{
"displayName": "rr1",
"usageMeterId": "um.20Ms65CtgMy.nwFP0",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "FLAT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 10,
"slabRateConfig": {}
}
],
"rateConfig": {
"minimumRate": "1",
"maximumRate": "10"
}
}
],
"tag": "1"
}
],
"fixedFeeRateCards": [
{
"id": "addon.20sidL2HJ7o.vvzDT",
"rateValues": [
{
"currency": "USD",
"rate": 50
}
],
"enableProration": false,
"displayName": "normal",
"tag": "1",
"invoiceTiming": "IN_ARREARS",
"type": "RECURRING"
},
{
"id": "addon.20sidQxYRjs.4oBSU",
"rateValues": [
{
"currency": "USD",
"rate": 10
}
],
"enableProration": false,
"displayName": "anotherNormal",
"tag": "2",
"invoiceTiming": "IN_ARREARS",
"type": "RECURRING"
},
{
"id": "addon.20sidzySWoa.Bzrcc",
"rateValues": [
{
"currency": "USD",
"rate": 40
}
],
"enableProration": false,
"displayName": "inadvance",
"tag": "1",
"invoiceTiming": "IN_ADVANCE",
"type": "RECURRING"
}
],
"licenseRateCards": [
{
"id": "addon.20rzlEPp6no.1BYez",
"enableProration": false,
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "FLAT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 15,
"slabRateConfig": {}
}
],
"rateConfig": {
"minimumRate": "1",
"maximumRate": "10"
}
}
],
"displayName": "license",
"tag": "2",
"config": {}
}
],
"billingEntitlementRateCards": [
{
"featureId": "feature.20jxa18BdUW.d4XQw",
"featureConfigs": [
{
"featureCreditLimit": 100,
"effectiveUntil": "P20D"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 1,
"slabRateConfig": {}
}
]
}
],
"displayName": "feature1",
"tag": "tag_acme"
},
{
"featureId": "feature.20uE1xqEudk.MMVH8",
"featureConfigs": [
{
"featureCreditLimit": 200,
"effectiveUntil": "P20D"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 2,
"slabRateConfig": {}
}
]
}
],
"displayName": "feature2",
"tag": "tag_acme"
}
],
"minimumCommitment": {
"displayName": "Minimum Commitment",
"rateValues": [
{
"currency": "USD",
"rate": 0
}
]
},
"creditGrantRateCards": [
{
"id": "addon.20ufMNoJoAC.TUzRi",
"type": "RECURRING",
"displayName": "Credit2",
"rateDetails": {
"pricingModel": "TIERED",
"currencySlabRateDetails": [
{
"currency": "USD",
"creditAmount": 100,
"slabDetails": [
{
"startAfter": 0,
"priceType": "FLAT",
"rate": 10
}
]
}
]
},
"grantDetails": {
"priority": 1,
"expiryType": "PRICING_CYCLE",
"applicableEntityIds": []
},
"invoiceTiming": "IN_ARREARS",
"recurrenceConfig": {
"offset": 0,
"interval": 1
}
},
{
"id": "addon.20ufMNoJoAC.TUzRi",
"type": "RECURRING",
"displayName": "Credit2",
"rateDetails": {
"pricingModel": "TIERED",
"currencySlabRateDetails": [
{
"currency": "USD",
"slabDetails": [
{
"rate": 11,
"priceType": "FLAT",
"startAfter": 0,
"slabConfig": {},
"slabRateConfig": {}
}
],
"creditAmount": 11
},
{
"currency": "INR",
"slabDetails": [
{
"rate": 11,
"priceType": "FLAT",
"startAfter": 0,
"slabConfig": {},
"slabRateConfig": {}
}
],
"creditAmount": 11
}
]
},
"grantDetails": {
"priority": 1,
"expiryType": "PRICING_CYCLE",
"applicableEntityIds": []
},
"invoiceTiming": "IN_ARREARS",
"recurrenceConfig": {
"offset": 0,
"interval": 1
}
}
],
"entitlementOverageRateCards": [
{
"featureId": "feature.20jxa18BdUW.d4XQw",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 1,
"slabRateConfig": {}
}
]
}
],
"displayName": "feature1",
"tag": "tag_acme",
"maxQuantity": 50,
"billingConfig": {
"interval": 1,
"startOffset": 4
}
},
{
"featureId": "feature.20uE1xqEudk.MMVH8",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 2,
"slabRateConfig": {}
}
]
}
],
"displayName": "feature2",
"tag": "tag_acme",
"maxQuantity": 50
}
]
}
}'