Skip to main content
Represents a subscription plan in the Stigg system. Plans define the features, entitlements, and pricing available to customers.

Type Definition

type Plan {
  id: UUID!
  refId: String!
  displayName: String!
  description: String
  status: PackageStatus!
  type: String!
  versionNumber: Int!
  isLatest: Boolean
  isParent: Boolean!

  # Pricing
  pricingType: PricingType
  prices: [Price!]
  overagePrices: [Price!]
  overageBillingPeriod: OverageBillingPeriod
  minimumSpend: [MinimumSpend!]

  # Entitlements
  packageEntitlements: [PackageEntitlementUnion!]
  inheritedPackageEntitlements: [PackageEntitlementUnion!]

  # Related entities
  product: Product!
  productId: String
  basePlan: Plan
  compatibleAddons: [Addon!]
  compatiblePackageGroups: [PlanCompatiblePackageGroups!]

  # Trial configuration
  defaultTrialConfig: DefaultTrialConfig

  # Metadata
  additionalMetaData: JSON
  hiddenFromWidgets: [WidgetType!]

  # Integrations
  billingId: String
  billingLinkUrl: String
  awsMarketplacePlanDimension: String
  syncStates: [SyncState!]

  # Draft management
  draftDetails: PackageDraftDetails
  draftSummary: PackageDraftSummary
  offer: Offer

  # Timestamps
  createdAt: DateTime
  updatedAt: DateTime
  environmentId: UUID!
  environment: Environment!
}

Fields

Core Fields

FieldTypeDescription
idUUID!Unique identifier for the plan
refIdString!Your application’s unique identifier for this plan
displayNameString!Display name shown to customers
descriptionStringPlan description
statusPackageStatus!Publication status (DRAFT, PUBLISHED, ARCHIVED)
typeString!Package type identifier
versionNumberInt!Version number of this plan
isLatestBooleanWhether this is the latest version
isParentBoolean!Whether this plan has child plans

Pricing

FieldTypeDescription
pricingTypePricingTypeType of pricing (FREE, PAID, CUSTOM)
prices[Price!]Price configurations for this plan
overagePrices[Price!]Overage pricing for usage-based features
overageBillingPeriodOverageBillingPeriodWhen overage is billed
minimumSpend[MinimumSpend!]Minimum spend configuration

Entitlements

FieldTypeDescription
packageEntitlements[PackageEntitlementUnion!]Entitlements included in this plan
inheritedPackageEntitlements[PackageEntitlementUnion!]Entitlements inherited from base plan
FieldTypeDescription
productProduct!The product this plan belongs to
productIdStringProduct identifier
basePlanPlanParent plan (for plan inheritance)
compatibleAddons[Addon!]Addons compatible with this plan
compatiblePackageGroups[PlanCompatiblePackageGroups!]Compatible package groups

Trial Configuration

FieldTypeDescription
defaultTrialConfigDefaultTrialConfigDefault trial settings for this plan

PackageStatus Enum

ValueDescription
DRAFTPlan is in draft mode, not available for subscription
PUBLISHEDPlan is published and available for subscription
ARCHIVEDPlan is archived and no longer available

PricingType Enum

ValueDescription
FREEPlan has no charge
PAIDPlan requires payment
CUSTOMPlan has custom pricing

Example Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "refId": "plan-pro",
  "displayName": "Pro Plan",
  "description": "For growing teams",
  "status": "PUBLISHED",
  "versionNumber": 2,
  "isLatest": true,
  "isParent": false,
  "pricingType": "PAID",
  "prices": [
    {
      "id": "price-123",
      "billingModel": "FLAT_FEE",
      "billingPeriod": "MONTHLY",
      "price": {
        "amount": 99.00,
        "currency": "USD"
      }
    }
  ],
  "packageEntitlements": [
    {
      "feature": {
        "refId": "feature-api-calls",
        "displayName": "API Calls"
      },
      "usageLimit": 10000,
      "hasUnlimitedUsage": false
    }
  ],
  "defaultTrialConfig": {
    "duration": 14,
    "units": "DAY"
  },
  "compatibleAddons": [
    {
      "refId": "addon-extra-seats",
      "displayName": "Extra Seats"
    }
  ],
  "product": {
    "refId": "product-saas",
    "displayName": "SaaS Platform"
  },
  "createdAt": "2024-01-10T10:00:00Z",
  "updatedAt": "2024-01-15T15:30:00Z"
}