Price Plan V2
Create a price plan
Introduction
APIs
- Authentication
- Customers
- Accounts
- Aliases
- Event Schemas
- Usage Meters
- AddOns
- Licenses
- Feature
- (Deprecated) Price Plans
- Price Plan V2
- GETList price plans
- POSTCreate a price plan
- GETGet a price plan
- PATCHUpdate a price plan
- DELDiscard a price plan
- POSTFinalize a price plan
- GETList rate cards of a price plan
- POSTBulk rate card operations of a price plan
- GETList pricing rules of a price plan
- PUTUpdate pricing rules of a price plan
- GETGet list of errors of a price plan
- GETList price plan versions
- POSTCreate a price plan v2 migration
- GET
- Settings
- Price Experimentation
- Jobs
- Event Ingestion
- Entitlements
- Event Management
- Metrics
- Credits
- Invoices
- Payments
- Wallet
- InvoiceGroups
- Alerts
- Reports
Price Plan V2
Create a price plan
Create a price plan
POST
/
v2
/
price_plans
curl --request POST \
--url https://api.togai.com/v2/price_plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"type": "BILLING",
"pricingCycleConfig": {
"interval": "WEEKLY",
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"gracePeriod": 3,
"anniversaryCycle": true
},
"supportedCurrencies": [
"<string>"
],
"deferredRevenue": true,
"allowOngoingCycleUpdates": true
}'
{
"name": "<string>",
"description": "<string>",
"type": "BILLING",
"pricingCycleConfig": {
"interval": "WEEKLY",
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"gracePeriod": 3,
"anniversaryCycle": true
},
"supportedCurrencies": [
"<string>"
],
"deferredRevenue": true,
"allowOngoingCycleUpdates": true,
"id": "<string>",
"referenceId": "<string>",
"version": 123,
"status": "DRAFT",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Payload to create price plan
Request to create a price plan
Response
200
application/json
Response for Create and Get price plan requests
Request to create a price plan
curl --request POST \
--url https://api.togai.com/v2/price_plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"type": "BILLING",
"pricingCycleConfig": {
"interval": "WEEKLY",
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"gracePeriod": 3,
"anniversaryCycle": true
},
"supportedCurrencies": [
"<string>"
],
"deferredRevenue": true,
"allowOngoingCycleUpdates": true
}'
{
"name": "<string>",
"description": "<string>",
"type": "BILLING",
"pricingCycleConfig": {
"interval": "WEEKLY",
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"gracePeriod": 3,
"anniversaryCycle": true
},
"supportedCurrencies": [
"<string>"
],
"deferredRevenue": true,
"allowOngoingCycleUpdates": true,
"id": "<string>",
"referenceId": "<string>",
"version": 123,
"status": "DRAFT",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}