{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lightspeed/main/json-schema/lightspeed-partner-subscription-token-request-schema.json",
  "title": "PartnerSubscriptionTokenRequest",
  "description": "PartnerSubscriptionTokenRequest represents the request's body for subscription token API",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lightspeed-partner-billing-api-openapi.yml#/components/schemas/PartnerSubscriptionTokenRequest",
  "properties": {
    "components": {
      "description": "Components is a list of components to add on to the plan",
      "items": {
        "$ref": "#/$defs/PartnerSubscriptionTokenComponent"
      },
      "type": "array"
    },
    "coupon_code": {
      "description": "CouponCode is the coupon code to be attached to the activation",
      "type": "string"
    },
    "price_handle": {
      "description": "ProductPricePointHandle is the product price point handle",
      "type": "string"
    },
    "product_handle": {
      "description": "ProductHandle is the product handle",
      "type": "string"
    },
    "return_url": {
      "description": "ReturnURL is the URL to which the user is redirected to after giving his/her consent",
      "type": "string"
    }
  },
  "required": [
    "price_handle",
    "product_handle",
    "return_url"
  ],
  "type": "object",
  "$defs": {
    "PartnerSubscriptionTokenComponent": {
      "description": "PartnerSubscriptionTokenComponent represents a component to be added to a subscription",
      "properties": {
        "component_handle": {
          "description": "Unique reference to the component to be included in the new subscription",
          "type": "string"
        },
        "component_price_handle": {
          "description": "Unique reference to the component price point",
          "type": "string"
        },
        "quantity": {
          "description": "How many components should be added",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "component_handle",
        "component_price_handle",
        "quantity"
      ],
      "type": "object"
    }
  }
}