APIs
- Authentication
- Customers
- Accounts
- Aliases
- Event Schemas
- Usage Meters
- AddOns
- Licenses
- Feature
- (Deprecated) Price Plans
- Price Plan V2
- Settings
- Price Experimentation
- Jobs
- Event Ingestion
- Entitlements
- Event Management
- Metrics
- Credits
- Invoices
- Payments
- Wallet
- InvoiceGroups
- Alerts
- Reports
(DEPRECATED) Create a price plan
This API letβs you create and price plan Learn more about 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
}
]
}
}'
Deprecated: This API is deprecated and will be removed in a future release. Please use the Create a price plan V2 API instead for updated functionality.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Body
Request to create a price plan
Name of the price plan
50
List of currencies supported by the price plan
Represents configurations related to pricing cycle
Interval field allow you to define the billing interval you would like to set
WEEKLY
, MONTHLY
, QUARTERLY
, HALF_YEARLY
, ANNUALLY
Togai allows you to ingest past dated events that will be processed by a pricing cycle till the end grace period. For example: Pricing cycle is Monthly from 1st to 30th and gracePeriod is 5 days which next month 1 to 5th date, you can ingest past dated events during this grace period.
Represents the start of pricing cycle in terms of
- dayOffset - number of days from beginning of week / month and
- monthOffset - number of months from beginning of interval (quarter, half-year or year) Note: If a day with offset doesn't exist for a month, closest previous day is considered Examples: WEEKLY -
- {dayOffset: 1, monthOffset: NIL} - First day of every week (Monday)
- {dayOffset: 3, monthOffset: NIL} - 3rd day of every week (Wednesday)
- {dayOffset: LAST, monthOffset: NIL} - Last day of every week (Sunday) MONTHLY -
- {dayOffset: 1, monthOffset: NIL} - First day of every month
- {dayOffset: 12, monthOffset: NIL} - 12th of every month
- {dayOffset: 28, monthOffset: NIL} - 28th of every month. i.e, 28th of Jan, 28th of Feb, ...
- {dayOffset: 30, monthOffset: NIL} - 30th of every month. i.e, 28th of Jan, 28th of Feb, ...
- {dayOffset: LAST, monthOffset: NIL} - Last day of every month. i.e, 31st of Jan, 28th of Feb, ... QUARTERLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan, 15th Apr, 15th Jul and 15th Oct
- {dayOffset: 15, monthOffset: 2} - 15th Feb, 15th May, 15th Aug and 15th Nov
- {dayOffset: 15, monthOffset: LAST} - 15th Mar, 15th Jun, 15th Sep and 15th Dec
- {dayOffset: LAST, monthOffset: FIRST} - 31st Jan, 30th Apr, 30th Jul and 31th Oct HALF_YEARLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan and 15th Jul
- {dayOffset: 15, monthOffset: 4} - 15th Apr and 15th Oct
- {dayOffset: 15, monthOffset: LAST} - 15th Jun and 15th Dec ANNUALLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan
- {dayOffset: 15, monthOffset: 1} - 15th Jan
- {dayOffset: LAST, monthOffset: 2} - 29th Feb on Leap year, 28th otherwise
- {dayOffset: 15, monthOffset: 8} - 15th Aug
- {dayOffset: 15, monthOffset: LAST} - 15th Dec
If interval is WEEKLY, min: "1" and max: "7" as strings. Spl. string allowed: LAST Otherwise, min: "1" and max: "31" as strings. Spl. string allowed: LAST
min: "1" and max: "12". Spl. string allowed: FIRST / LAST. For QUARTERLY only 1 - 3 is allowed and for HALF_YEARLY 1 - 6. This being an optional field, shouldn't be passed for MONTHLY.
Togai calculates the startOffsets based on the date of association instead of requiring from the user and these offsets will be applied as an override if this flag is enabled. Examples: WEEKLY -
- 23/10/2023 (Monday) - {dayOffset: 1, monthOffset: NIL}
- 25/10/2023 (Wednesday) - {dayOffset: 3, monthOffset: NIL}
- 29/10/2023 (Sunday) - {dayOffset: 7, monthOffset: NIL} MONTHLY -
- 1st Oct - {dayOffset: 1, monthOffset: NIL}
- 12th Oct - {dayOffset: 12, monthOffset: NIL}
- 28th Oct - {dayOffset: 28, monthOffset: NIL}
- 30th Oct - {dayOffset: 30, monthOffset: NIL}
- 31th Oct - {dayOffset: LAST, monthOffset: NIL} QUARTERLY
- 15th Jan, 15th Apr, 15th Jul and 15th Oct - {dayOffset: 15, monthOffset: 1}
- 15th Feb, 15th May, 15th Aug and 15th Nov - {dayOffset: 15, monthOffset: 2}
- 15th Mar, 15th Jun, 15th Sep and 15th Dec - {dayOffset: 15, monthOffset: 3} HALF_YEARLY
- 15th Jan and 15th Jul - {dayOffset: 15, monthOffset: 1}
- 15th Apr and 15th Oct - {dayOffset: 15, monthOffset: 4}
- 15th Jun and 15th Dec - {dayOffset: 15, monthOffset: 6} ANNUALLY
- 15th Jan - {dayOffset: 15, monthOffset: 1}
- 29th Feb on Leap year - {dayOffset: LAST, monthOffset: 2}
- 28th Feb - {dayOffset: LAST, monthOffset: 2}
- 15th Aug - {dayOffset: 15, monthOffset: 8}
- 15th Dec - {dayOffset: 15, monthOffset: 12}
List of usage rate cards
Name your rate card, this will be displayed in the Togai App
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group usageRateCards
Contains all rate related configurations
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
Rate cards can have single or multiple slab up to 100.
1 < x < 10
FLAT
, PER_UNIT
, PACKAGE
Unique Identifier of the attached AddOn
50
Name of the attached AddOn
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group fixedFeeRateCards
If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle. If IN_ARREARS, the rate card will be invoiced in the current billing cycle. If PREPAID, credits/entitlements will be granted only after invoice is paid
IN_ADVANCE
, IN_ARREARS
, PREPAID
Fixed fee applies either for a one-time occurrence or for each cycle.
ONE_TIME
, RECURRING
Represents the number of pricing cycles after which the rate card will be charged
Represents the offset for pricing cycles after which the rate card will be charged
Unique Identifier of the attached AddOn
50
LICENSE: Addon can be used in license rate cards FIXED_FEE: Addon can be used in fixed fee rate cards CREDIT_GRANT: Addon can be used in credit grant rate cards NAMED_LICENSE: Addon can be used in license rate cards
LICENSE
, FIXED_FEE
, CREDIT_GRANT
, NAMED_LICENSE
Name of the attached AddOn
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group licenseRateCards
If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle. If IN_ARREARS, the rate card will be invoiced in the current billing cycle. If PREPAID, credits/entitlements will be granted only after invoice is paid
IN_ADVANCE
, IN_ARREARS
, PREPAID
UsageCycleInterval field allows you to treat the billing interval as many smaller windows. Revenue is calculated for each of the windows (usage cycles) and their sum is considered as the billing interval revenue. Example: 1 Named License being used across entire billing interval. Rate Value: $1/license CASE 1: Without usage cycle. $1 is charged for the entire billing cycle. CASE 2: Usage cycle is configure to be WEEKLY and the billing interval has 4 weeks. In this case $1 is charged for each week totalling to $4 across for the billing interval
WEEKLY
, MONTHLY
, QUARTERLY
, HALF_YEARLY
, ANNUALLY
Max allowed quantity for a particular license in a price plan
Action to be taken when the license maxQuantity is breached:
DO_NOTHING
: Refrain from granting any new licenses.
DO_NOTHING
Contains all rate related configurations
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
Rate cards can have single or multiple slab up to 100.
1 < x < 10
FLAT
, PER_UNIT
, PACKAGE
NONE
, CREDITS
, PAYMENT
, WALLET
A tag string to group rate cards
If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle. If IN_ARREARS, the rate card will be invoiced in the current billing cycle. If PREPAID, credits/entitlements will be granted only after invoice is paid
IN_ADVANCE
, IN_ARREARS
, PREPAID
Name your rate card, this will be used in invoice
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
Contains all rate related configurations
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
Rate cards can have single or multiple slab up to 100.
1 < x < 10
FLAT
, PER_UNIT
, PACKAGE
Represents the number of pricing cycles after which the rate card will be charged
Represents the offset for pricing cycles after which the rate card will be charged
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group creditGrantRateCard
Grant details of Credit Grant Rate Card
x > 0
Expiry type of grant
PRICING_CYCLE
, NO_EXPIRY
, CUSTOM
Amount to be credited
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
The amount of credit that needs to be credited
x > 0
If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle. If IN_ARREARS, the rate card will be invoiced in the current billing cycle. If PREPAID, credits/entitlements will be granted only after invoice is paid
IN_ADVANCE
, IN_ARREARS
, PREPAID
Credit grant applies either for a one-time occurrence or for each cycle.
ONE_TIME
, RECURRING
Represents the number of pricing cycles after which the rate card will be charged
Represents the offset for pricing cycles after which the rate card will be charged
Unique Identifier of the attached Feature
50
Name to be displayed during invoice
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group rate cards
Maximum quantity allowed for the feature, if not specified, unlimited quantity is allowed
Contains all rate related configurations
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
Rate cards can have single or multiple slab up to 100.
1 < x < 10
FLAT
, PER_UNIT
, PACKAGE
Represents the billing config of the entitlement overage rate card. If not specified interval:1 and startOffset:0 is taken as default value
Represents the number of pricing cycles after which the rate card will be billed
Represents the offset for pricing cycles after which the rate card will be billed
This option can be enabled while creating a price plan to opt for deferred revenue finalization. i.e, Togai will assume that the price plan may change any time during the pricing cycle and thereby does not compute the revenue in near-real time. This gives the flexibility of editing rate cards in price plan from beginning of the pricing cycle. Enabling this mode comes with the following limitations.
- Following rate cards are not supported under a
deferredRevenue
plan- creditGrantRateCards,
- billingEntitlementRateCards,
- entitlementOverageRateCards,
- IN_ADVANCE fixedFeeRateCards,
- IN_ADVANCE licenseRateCards
- Metrics API return revenue metrics only after the grace period of the account's pricing cycle (i.e, only once the invoice becomes DUE)
Allow changes to price plan from the beginning of the ongoing cycle.
Description of price plan
255
Type of price plan
BILLING
, PURCHASE
Name of the pricing rule
Order of the pricing rule
If IN_ADVANCE, the rule will be applied on rate cards with invoice timing IN_ADVANCE . If IN_ARREARS, the rule will be applied on rate cards with invoice timing IN_ARREARS .
IN_ADVANCE
, IN_ARREARS
JSON logic condition deciding whether to compute this pricing rule or not
JSON logic to be computed
Response
Price plan entity
Price plan id
Name of the price plan
50
Type of price plan
BILLING
, PURCHASE
Status of Price plan
DRAFT
, ACTIVE
, ARCHIVED
Represents configurations related to pricing cycle
Interval field allow you to define the billing interval you would like to set
WEEKLY
, MONTHLY
, QUARTERLY
, HALF_YEARLY
, ANNUALLY
Togai allows you to ingest past dated events that will be processed by a pricing cycle till the end grace period. For example: Pricing cycle is Monthly from 1st to 30th and gracePeriod is 5 days which next month 1 to 5th date, you can ingest past dated events during this grace period.
Represents the start of pricing cycle in terms of
- dayOffset - number of days from beginning of week / month and
- monthOffset - number of months from beginning of interval (quarter, half-year or year) Note: If a day with offset doesn't exist for a month, closest previous day is considered Examples: WEEKLY -
- {dayOffset: 1, monthOffset: NIL} - First day of every week (Monday)
- {dayOffset: 3, monthOffset: NIL} - 3rd day of every week (Wednesday)
- {dayOffset: LAST, monthOffset: NIL} - Last day of every week (Sunday) MONTHLY -
- {dayOffset: 1, monthOffset: NIL} - First day of every month
- {dayOffset: 12, monthOffset: NIL} - 12th of every month
- {dayOffset: 28, monthOffset: NIL} - 28th of every month. i.e, 28th of Jan, 28th of Feb, ...
- {dayOffset: 30, monthOffset: NIL} - 30th of every month. i.e, 28th of Jan, 28th of Feb, ...
- {dayOffset: LAST, monthOffset: NIL} - Last day of every month. i.e, 31st of Jan, 28th of Feb, ... QUARTERLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan, 15th Apr, 15th Jul and 15th Oct
- {dayOffset: 15, monthOffset: 2} - 15th Feb, 15th May, 15th Aug and 15th Nov
- {dayOffset: 15, monthOffset: LAST} - 15th Mar, 15th Jun, 15th Sep and 15th Dec
- {dayOffset: LAST, monthOffset: FIRST} - 31st Jan, 30th Apr, 30th Jul and 31th Oct HALF_YEARLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan and 15th Jul
- {dayOffset: 15, monthOffset: 4} - 15th Apr and 15th Oct
- {dayOffset: 15, monthOffset: LAST} - 15th Jun and 15th Dec ANNUALLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan
- {dayOffset: 15, monthOffset: 1} - 15th Jan
- {dayOffset: LAST, monthOffset: 2} - 29th Feb on Leap year, 28th otherwise
- {dayOffset: 15, monthOffset: 8} - 15th Aug
- {dayOffset: 15, monthOffset: LAST} - 15th Dec
If interval is WEEKLY, min: "1" and max: "7" as strings. Spl. string allowed: LAST Otherwise, min: "1" and max: "31" as strings. Spl. string allowed: LAST
min: "1" and max: "12". Spl. string allowed: FIRST / LAST. For QUARTERLY only 1 - 3 is allowed and for HALF_YEARLY 1 - 6. This being an optional field, shouldn't be passed for MONTHLY.
Togai calculates the startOffsets based on the date of association instead of requiring from the user and these offsets will be applied as an override if this flag is enabled. Examples: WEEKLY -
- 23/10/2023 (Monday) - {dayOffset: 1, monthOffset: NIL}
- 25/10/2023 (Wednesday) - {dayOffset: 3, monthOffset: NIL}
- 29/10/2023 (Sunday) - {dayOffset: 7, monthOffset: NIL} MONTHLY -
- 1st Oct - {dayOffset: 1, monthOffset: NIL}
- 12th Oct - {dayOffset: 12, monthOffset: NIL}
- 28th Oct - {dayOffset: 28, monthOffset: NIL}
- 30th Oct - {dayOffset: 30, monthOffset: NIL}
- 31th Oct - {dayOffset: LAST, monthOffset: NIL} QUARTERLY
- 15th Jan, 15th Apr, 15th Jul and 15th Oct - {dayOffset: 15, monthOffset: 1}
- 15th Feb, 15th May, 15th Aug and 15th Nov - {dayOffset: 15, monthOffset: 2}
- 15th Mar, 15th Jun, 15th Sep and 15th Dec - {dayOffset: 15, monthOffset: 3} HALF_YEARLY
- 15th Jan and 15th Jul - {dayOffset: 15, monthOffset: 1}
- 15th Apr and 15th Oct - {dayOffset: 15, monthOffset: 4}
- 15th Jun and 15th Dec - {dayOffset: 15, monthOffset: 6} ANNUALLY
- 15th Jan - {dayOffset: 15, monthOffset: 1}
- 29th Feb on Leap year - {dayOffset: LAST, monthOffset: 2}
- 28th Feb - {dayOffset: LAST, monthOffset: 2}
- 15th Aug - {dayOffset: 15, monthOffset: 8}
- 15th Dec - {dayOffset: 15, monthOffset: 12}
Name your rate card, this will be displayed in the Togai App
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group usageRateCards
Contains all rate related configurations
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
Rate cards can have single or multiple slab up to 100.
Unique Identifier of the attached AddOn
50
Name of the attached AddOn
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group fixedFeeRateCards
If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle. If IN_ARREARS, the rate card will be invoiced in the current billing cycle. If PREPAID, credits/entitlements will be granted only after invoice is paid
IN_ADVANCE
, IN_ARREARS
, PREPAID
Fixed fee applies either for a one-time occurrence or for each cycle.
ONE_TIME
, RECURRING
Represents the number of pricing cycles after which the rate card will be charged
Represents the offset for pricing cycles after which the rate card will be charged
Unique Identifier of the attached AddOn
50
LICENSE: Addon can be used in license rate cards FIXED_FEE: Addon can be used in fixed fee rate cards CREDIT_GRANT: Addon can be used in credit grant rate cards NAMED_LICENSE: Addon can be used in license rate cards
LICENSE
, FIXED_FEE
, CREDIT_GRANT
, NAMED_LICENSE
Name of the attached AddOn
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group licenseRateCards
If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle. If IN_ARREARS, the rate card will be invoiced in the current billing cycle. If PREPAID, credits/entitlements will be granted only after invoice is paid
IN_ADVANCE
, IN_ARREARS
, PREPAID
UsageCycleInterval field allows you to treat the billing interval as many smaller windows. Revenue is calculated for each of the windows (usage cycles) and their sum is considered as the billing interval revenue. Example: 1 Named License being used across entire billing interval. Rate Value: $1/license CASE 1: Without usage cycle. $1 is charged for the entire billing cycle. CASE 2: Usage cycle is configure to be WEEKLY and the billing interval has 4 weeks. In this case $1 is charged for each week totalling to $4 across for the billing interval
WEEKLY
, MONTHLY
, QUARTERLY
, HALF_YEARLY
, ANNUALLY
Max allowed quantity for a particular license in a price plan
Action to be taken when the license maxQuantity is breached:
DO_NOTHING
: Refrain from granting any new licenses.
DO_NOTHING
Contains all rate related configurations
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
Rate cards can have single or multiple slab up to 100.
NONE
, CREDITS
, PAYMENT
, WALLET
x > 0
A tag string to group rate cards
If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle. If IN_ARREARS, the rate card will be invoiced in the current billing cycle. If PREPAID, credits/entitlements will be granted only after invoice is paid
IN_ADVANCE
, IN_ARREARS
, PREPAID
Name your rate card, this will be used in invoice
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
Contains all rate related configurations
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
Rate cards can have single or multiple slab up to 100.
Represents the number of pricing cycles after which the rate card will be charged
Represents the offset for pricing cycles after which the rate card will be charged
Unique Identifier of the attached Feature
50
Name to be displayed during invoice
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group rate cards
Maximum quantity allowed for the feature, if not specified, unlimited quantity is allowed
Contains all rate related configurations
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
Rate cards can have single or multiple slab up to 100.
Represents the billing config of the entitlement overage rate card. If not specified interval:1 and startOffset:0 is taken as default value
Represents the number of pricing cycles after which the rate card will be billed
Represents the offset for pricing cycles after which the rate card will be billed
Unique identifier for the rate card in a price plan. If left null it is auto-generated.
A tag string to group creditGrantRateCard
Grant details of Credit Grant Rate Card
x > 0
Expiry type of grant
PRICING_CYCLE
, NO_EXPIRY
, CUSTOM
Amount to be credited
Togai supports two type of pricing model Tiered and Volume. Tiered pricing model applies respective slab and its rate to the usage value while volume pricing model applies the latest matching slab of the usage value and applies respective rate. For more understanding read Rate Cards
TIERED
, VOLUME
If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle. If IN_ARREARS, the rate card will be invoiced in the current billing cycle. If PREPAID, credits/entitlements will be granted only after invoice is paid
IN_ADVANCE
, IN_ARREARS
, PREPAID
Credit grant applies either for a one-time occurrence or for each cycle.
ONE_TIME
, RECURRING
Represents the number of pricing cycles after which the rate card will be charged
Represents the offset for pricing cycles after which the rate card will be charged
Type of price plan
BILLING
, PURCHASE
Allow changes to price plan from the beginning of the ongoing cycle. type: boolean
x > 1
x > 1
If IN_ADVANCE, the rule will be applied on rate cards with invoice timing IN_ADVANCE . If IN_ARREARS, the rule will be applied on rate cards with invoice timing IN_ARREARS .
IN_ADVANCE
, IN_ARREARS
x > 1
JSON logic condition deciding whether to compute this pricing rule or not
JSON logic to be computed
JSON logic to be computed
ADD
, UPDATE
Description of price plan
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
}
]
}
}'