Skip to main content

Create pricing plans

Important

This feature is currently in Early Availability (EA) status. For more information, see GraphQL API policy.

Define pricing model

After you create an edition, use updateEditionPricing mutation to define the pricing model.

Mutation

mutation  {
updateEditionPricing(
input: {
id: "dc1b092c-bb68-480a-bde4-6ea996c86809",
revenueType: RECURRING,
includedItems: [
{
unit: "USER",
amount: "0",
unlimited: false
}
],
cancellable: true,
downgradable: true,
expiredTrialGracePeriod: null,
restricted: false,
trial: {
length: 0,
unit: DAY
},
upgradable: true
}
) {
editionPricing {
id
}
}
}

Response

{
"data": {
"updateEditionPricing": {
"editionPricing": {
"id": "dc1b092c-bb68-480a-bde4-6ea996c86809"
}
}
}
}

Add pricing plans

After you have defined a pricing model, use the createPricingPlan mutation to create a pricing plan to add it to the edition.

Mutation

mutation {
createPricingPlan(
input: {
editionId: "dc1b092c-bb68-480a-bde4-6ea996c86809"
pricingPlan: {
allowCustomUsage: false
keepBillDateOnUsageChange: true
keepBillDateOnPricingPlanChange: true
pricingDuration: MONTHLY
separatePrepaid: true
contract: {
alignWithParentCycleStartDate: true
allowContractRestrictionBypass: true
blockContractUpgrades: false
blockContractDowngrades: true
blockSwitchToShorterContract: true
continueWithoutContract: false
contractCancellationPeriodLimit: 7
endOfContractGracePeriod: 5
keepContractDateOnPlanChange: false
minimumServiceLength: 5
gracePeriod: { length: 15, unit: DAY }
}
costs: {
blockContractDecrease: true
blockContractIncrease: false
blockOriginalContractDecrease: true
meteredUsage: false
priceStrategy: UNIT
showPricePerIncrement: false
unit: "USER"
itemPrices: {
minUnits: 1
prices: { amount: 15.00, currency: "USD" }
}
}
}
}
) {
pricingPlan {
id
}
}
}

Response

{
"data": {
"createPricingPlan": {
"pricingPlan": {
"id": "85710e29-b4f6-44d4-a376-070df21a429a"
}
}
}
}

Was this page helpful?