curl --request GET \
--url https://api.togai.com/v2/price_plans/{price_plan_id}/versions \
--header 'Authorization: Bearer <token>'{
"data": [
{
"name": "<string>",
"type": "BILLING",
"supportedCurrencies": [
"<string>"
],
"id": "<string>",
"referenceId": "<string>",
"version": 123,
"status": "DRAFT",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"pricingCycleConfig": {
"interval": "WEEKLY",
"gracePeriod": 3,
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"anniversaryCycle": true
},
"deferredRevenue": true,
"allowOngoingCycleUpdates": true
}
],
"nextToken": "<string>"
}List price plan versions
curl --request GET \
--url https://api.togai.com/v2/price_plans/{price_plan_id}/versions \
--header 'Authorization: Bearer <token>'{
"data": [
{
"name": "<string>",
"type": "BILLING",
"supportedCurrencies": [
"<string>"
],
"id": "<string>",
"referenceId": "<string>",
"version": 123,
"status": "DRAFT",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"pricingCycleConfig": {
"interval": "WEEKLY",
"gracePeriod": 3,
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"anniversaryCycle": true
},
"deferredRevenue": true,
"allowOngoingCycleUpdates": true
}
],
"nextToken": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
50"pp.1zYnCiM9Bpg.lv25y"
"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ=="
10
Response for list price plans request
Paginated response for price plan
Show child attributes
Name of the price plan
50Type of price plan
BILLING, PURCHASE List of currencies supported by the price plan
5050DRAFT, ACTIVE Description of price plan
255Represents configurations related to pricing cycle
Show child attributes
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.
3
Represents the start of pricing cycle in terms of
Show child attributes
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 -
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.
deferredRevenue plan
Allow changes to price plan from the beginning of the ongoing cycle.