Skip to main content
Retrieves detailed information about a specific plan using its reference ID.

Query

query GetPlan($input: GetPackageByRefIdInput!) {
  getPlanByRefId(input: $input) {
    refId
    displayName
    description
    status
    pricingType
    versionNumber
    basePlan {
      refId
      displayName
    }
    product {
      refId
      displayName
    }
    prices {
      billingModel
      billingPeriod
      billingCadence
      price {
        amount
        currency
      }
      tiers {
        upTo
        unitPrice {
          amount
          currency
        }
      }
    }
    packageEntitlements {
      ... on PackageEntitlement {
        feature {
          refId
          displayName
          featureType
          featureUnits
        }
        hasUnlimitedUsage
        usageLimit
        resetPeriod
      }
    }
    compatibleAddons {
      refId
      displayName
      maxQuantity
    }
    defaultTrialConfig {
      duration
      units
    }
  }
}
{
  "input": {
    "refId": "plan-pro"
  }
}
{
  "data": {
    "getPlanByRefId": {
      "refId": "plan-pro",
      "displayName": "Pro Plan",
      "description": "For growing teams",
      "status": "PUBLISHED",
      "pricingType": "PAID",
      "versionNumber": 3,
      "basePlan": null,
      "product": {
        "refId": "product-main",
        "displayName": "Main Product"
      },
      "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
        }
      ],
      "packageEntitlements": [
        {
          "feature": {
            "refId": "feature-api-calls",
            "displayName": "API Calls",
            "featureType": "NUMBER",
            "featureUnits": "call"
          },
          "hasUnlimitedUsage": false,
          "usageLimit": 10000,
          "resetPeriod": "MONTH"
        },
        {
          "feature": {
            "refId": "feature-sso",
            "displayName": "Single Sign-On",
            "featureType": "BOOLEAN",
            "featureUnits": null
          },
          "hasUnlimitedUsage": false,
          "usageLimit": null,
          "resetPeriod": null
        }
      ],
      "compatibleAddons": [
        {
          "refId": "addon-seats",
          "displayName": "Extra Seats",
          "maxQuantity": 100
        }
      ],
      "defaultTrialConfig": {
        "duration": 14,
        "units": "DAYS"
      }
    }
  }
}

Parameters

input
GetPackageByRefIdInput
required
Input parameters for retrieving the plan

Return Type

Returns a Plan object with all plan details including entitlements, pricing, and configuration.

Common Use Cases

Show complete plan information on a plan detail page.
Verify what entitlements are included in a specific plan.
Retrieve specific versions to compare changes.