> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Plan

Retrieves detailed information about a specific plan using its reference ID.

## Query

<CodeGroup>
  ```graphql Query theme={null}
  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
      }
    }
  }
  ```

  ```json Variables theme={null}
  {
    "input": {
      "refId": "plan-pro"
    }
  }
  ```

  ```json Response theme={null}
  {
    "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"
        }
      }
    }
  }
  ```
</CodeGroup>

## Parameters

<ParamField body="input" type="GetPackageByRefIdInput" required>
  Input parameters for retrieving the plan

  <Expandable title="properties">
    <ParamField body="refId" type="String" required>
      The unique plan reference ID
    </ParamField>

    <ParamField body="versionNumber" type="Int">
      Specific version to retrieve (defaults to latest)
    </ParamField>

    <ParamField body="environmentId" type="UUID">
      Environment ID (defaults to API key environment)
    </ParamField>
  </Expandable>
</ParamField>

## Return Type

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

## Common Use Cases

<AccordionGroup>
  <Accordion title="Display plan details">
    Show complete plan information on a plan detail page.
  </Accordion>

  <Accordion title="Check plan features">
    Verify what entitlements are included in a specific plan.
  </Accordion>

  <Accordion title="Compare plan versions">
    Retrieve specific versions to compare changes.
  </Accordion>
</AccordionGroup>

## Related Operations

* [List Plans](/api-and-sdks/api-reference/queries/list-plans) - Query multiple plans
* [Paywall](/api-and-sdks/api-reference/queries/paywall) - Get paywall-formatted data
