Mutation
mutation SetPackagePricing($input: PackagePricingInput!) {
setPackagePricing(input: $input) {
packageId
prices {
billingModel
billingPeriod
billingCadence
price {
amount
currency
}
tiers {
upTo
unitPrice {
amount
currency
}
}
}
}
}
{
"input": {
"packageId": "plan-uuid-123",
"pricingType": "PAID",
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"price": {
"amount": 99,
"currency": "USD"
}
},
{
"billingModel": "FLAT_FEE",
"billingPeriod": "ANNUAL",
"price": {
"amount": 990,
"currency": "USD"
}
}
]
}
}
{
"data": {
"setPackagePricing": {
"packageId": "plan-uuid-123",
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"billingCadence": "RECURRING",
"price": {
"amount": 99,
"currency": "USD"
},
"tiers": null
},
{
"billingModel": "FLAT_FEE",
"billingPeriod": "ANNUAL",
"billingCadence": "RECURRING",
"price": {
"amount": 990,
"currency": "USD"
},
"tiers": null
}
]
}
}
}
Parameters
Input for setting package pricing
Show properties
Show properties
Plan or addon internal ID
FREE, PAID, or CUSTOM
Array of price configurations
Show nested properties
Show nested properties
FLAT_FEE, USAGE_BASED, TIERED, CREDIT_BASED
MONTHLY, ANNUAL
RECURRING or ONE_OFF
Price amount and currency
Feature ID for usage-based pricing
Tiers for tiered pricing
Units per block for metered pricing
Environment ID
Billing Models
| Model | Description |
|---|---|
FLAT_FEE | Fixed recurring price |
USAGE_BASED | Based on metered usage |
TIERED | Volume-based tiers |
CREDIT_BASED | Deduct from credit balance |
Examples
Flat Fee Pricing
{
"input": {
"packageId": "plan-uuid-123",
"pricingType": "PAID",
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"price": { "amount": 99, "currency": "USD" }
}
]
}
}
Usage-Based Pricing
{
"input": {
"packageId": "plan-uuid-123",
"pricingType": "PAID",
"prices": [
{
"billingModel": "USAGE_BASED",
"billingPeriod": "MONTHLY",
"featureId": "feature-api-calls",
"price": { "amount": 0.01, "currency": "USD" }
}
]
}
}
Tiered Pricing
{
"input": {
"packageId": "plan-uuid-123",
"pricingType": "PAID",
"prices": [
{
"billingModel": "TIERED",
"billingPeriod": "MONTHLY",
"featureId": "feature-api-calls",
"tiers": [
{ "upTo": 1000, "unitPrice": { "amount": 0, "currency": "USD" } },
{ "upTo": 10000, "unitPrice": { "amount": 0.01, "currency": "USD" } },
{ "upTo": null, "unitPrice": { "amount": 0.005, "currency": "USD" } }
]
}
]
}
}
Related Operations
- Create Plan - Create plan
- Create Addon - Create addon
- Publish Plan - Publish plan
