{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/benjipays-com/json-schema/benjipays-com-get-plan-response-schema.json",
  "title": "GetPlanResponse",
  "description": "Single plan details",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/benjipays-com-plans-api-openapi.yml#/components/schemas/GetPlanResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/Plan"
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "Plan": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Plan identifier (same value as path `planId`)"
        },
        "distributorExternalId": {
          "description": "Distributor external ID this plan is visible to",
          "type": "string"
        },
        "partnerId": {
          "description": "Partner ID for partner-specific custom pricing",
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Plan name"
        },
        "basePrice": {
          "type": "number",
          "description": "Base monthly price"
        },
        "baseAnnualPrice": {
          "description": "Base annual price (discounted)",
          "type": "number"
        },
        "priceRanges": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "number",
                "description": "Starting transaction count for this tier"
              },
              "to": {
                "type": "number",
                "description": "Ending transaction count for this tier"
              },
              "rate": {
                "type": "number",
                "description": "Rate per transaction in this tier"
              }
            },
            "required": [
              "from",
              "to",
              "rate"
            ],
            "additionalProperties": false,
            "description": "Price range for tiered pricing"
          },
          "description": "Tiered pricing ranges"
        },
        "includedTransactions": {
          "type": "number",
          "description": "Number of transactions included in base price"
        },
        "additionalInvoicePrice": {
          "description": "Price per additional invoice beyond included",
          "type": "number"
        },
        "description": {
          "description": "Plan description",
          "type": "string"
        },
        "planType": {
          "description": "Plan type identifier",
          "type": "string"
        },
        "status": {
          "description": "Plan status",
          "type": "string",
          "enum": [
            "active",
            "deprecated"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "basePrice",
        "priceRanges",
        "includedTransactions"
      ],
      "additionalProperties": false,
      "description": "Plan details"
    }
  }
}