{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/fusio/main/json-schema/fusio-backend-plan-schema.json",
  "title": "Backend_Plan",
  "description": "This object represents a plan, a plan allows users to obtain points or in general subscribe to your app",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fusio-plan-api-openapi.yml#/components/schemas/Backend_Plan",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier for the object",
      "type": "integer"
    },
    "name": {
      "description": "Name of the plan",
      "type": "string"
    },
    "description": {
      "description": "Short description of the plan",
      "type": "string"
    },
    "price": {
      "description": "The price of this plan",
      "type": "number"
    },
    "points": {
      "description": "The points which are assigned to the user on purchase",
      "type": "integer"
    },
    "period": {
      "description": "Whether the plan is one-time or periodically",
      "type": "integer"
    },
    "externalId": {
      "description": "An external id of a remote payment provider like Stripe",
      "type": "string"
    },
    "scopes": {
      "description": "Scopes which are assigned dynamically to the user on purchase",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "$ref": "#/$defs/Common_Metadata"
    }
  },
  "$defs": {
    "Common_Metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  }
}