{
  "openapi": "3.1.0",
  "info": {
    "title": "Polar API",
    "summary": "Polar HTTP and Webhooks API",
    "description": "Read the docs at https://polar.sh/docs/api-reference",
    "version": "2026-04"
  },
  "servers": [
    {
      "url": "https://api.polar.sh",
      "description": "Production environment",
      "x-speakeasy-server-id": "production",
      "x-polar-environment": "production"
    },
    {
      "url": "https://sandbox-api.polar.sh",
      "description": "Sandbox environment",
      "x-speakeasy-server-id": "sandbox",
      "x-polar-environment": "sandbox"
    }
  ],
  "paths": {
    "/v1/organizations/": {
      "get": {
        "tags": [
          "organizations",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Organizations",
        "description": "List organizations.\n\n**Scopes**: `organizations:read` `organizations:write`",
        "operationId": "organizations:list",
        "security": [
          {
            "oidc": [
              "organizations:read",
              "organizations:write"
            ]
          },
          {
            "pat": [
              "organizations:read",
              "organizations:write"
            ]
          },
          {
            "oat": [
              "organizations:read",
              "organizations:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by slug.",
              "title": "Slug"
            },
            "description": "Filter by slug."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Organization_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "organizations",
        "x-speakeasy-name-override": "list_organizations",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Organization"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.organizations.iter_list(\n    page=1,\n    limit=10,\n    sorting=['created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.organizations.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "organizations",
          "public"
        ],
        "summary": "Create Organization",
        "description": "Create an organization.\n\n**Scopes**: `organizations:write`",
        "operationId": "organizations:create",
        "security": [
          {
            "oidc": [
              "organizations:write"
            ]
          },
          {
            "pat": [
              "organizations:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Organization created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CannotCreateOrganizationError"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "User"
        ],
        "x-speakeasy-group": "organizations",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.organizations.create(\n    name='string',\n    slug='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.organizations.create(\n  {\n    \"name\": \"string\",\n    \"slug\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/organizations/{id}": {
      "get": {
        "tags": [
          "organizations",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Organization",
        "description": "Get an organization by ID.\n\n**Scopes**: `organizations:read` `organizations:write`",
        "operationId": "organizations:get",
        "security": [
          {
            "oidc": [
              "organizations:read",
              "organizations:write"
            ]
          },
          {
            "pat": [
              "organizations:read",
              "organizations:write"
            ]
          },
          {
            "oat": [
              "organizations:read",
              "organizations:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "examples": [
                "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
              ],
              "description": "The organization ID.",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "organizations",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.organizations.get(\n    '1dbfc517-0bbf-4301-9ba8-555ca42b9737',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.organizations.get(\n  \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "organizations",
          "public"
        ],
        "summary": "Update Organization",
        "description": "Update an organization.\n\n**Scopes**: `organizations:write`",
        "operationId": "organizations:update",
        "security": [
          {
            "oidc": [
              "organizations:write"
            ]
          },
          {
            "pat": [
              "organizations:write"
            ]
          },
          {
            "oat": [
              "organizations:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "examples": [
                "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
              ],
              "description": "The organization ID.",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Organization updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "403": {
            "description": "You don't have the permission to update this organization, or dispute auto-accept isn't enabled for it.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/NotPermitted"
                    },
                    {
                      "$ref": "#/components/schemas/DisputeAutoAcceptNotEnabled"
                    }
                  ],
                  "title": "Response 403 Organizations:Update"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "Cannot enforce SSO without an enabled connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOEnforcementRequiresConnection"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "organizations",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.organizations.update(\n    '1dbfc517-0bbf-4301-9ba8-555ca42b9737',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.organizations.update(\n  \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/subscriptions/": {
      "get": {
        "tags": [
          "subscriptions",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Subscriptions",
        "description": "List subscriptions.\n\n**Scopes**: `subscriptions:read` `subscriptions:write`",
        "operationId": "subscriptions:list",
        "security": [
          {
            "oidc": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          },
          {
            "pat": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          },
          {
            "oat": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The customer external ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "The customer external ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by customer external ID."
            },
            "description": "Filter by customer external ID."
          },
          {
            "name": "discount_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The discount ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The discount ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "DiscountID Filter",
              "description": "Filter by discount ID."
            },
            "description": "Filter by discount ID."
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active or inactive subscription.",
              "deprecated": true,
              "title": "Active"
            },
            "description": "Filter by active or inactive subscription.",
            "deprecated": true
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SubscriptionStatus"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter",
              "description": "Filter by subscription status."
            },
            "description": "Filter by subscription status."
          },
          {
            "name": "cancel_at_period_end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by subscriptions that are set to cancel at period end.",
              "title": "Cancel At Period End"
            },
            "description": "Filter by subscriptions that are set to cancel at period end."
          },
          {
            "name": "customer_cancellation_reason",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomerCancellationReason"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerCancellationReason"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerCancellationReason Filter",
              "description": "Filter by customer cancellation reason."
            },
            "description": "Filter by customer cancellation reason."
          },
          {
            "name": "canceled_at_after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by cancellation date (after or equal to).",
              "title": "Canceled At After"
            },
            "description": "Filter by cancellation date (after or equal to)."
          },
          {
            "name": "canceled_at_before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by cancellation date (before or equal to).",
              "title": "Canceled At Before"
            },
            "description": "Filter by cancellation date (before or equal to)."
          },
          {
            "name": "started_after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only include subscriptions started after this date.",
              "title": "Started After"
            },
            "description": "Only include subscriptions started after this date."
          },
          {
            "name": "started_before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only include subscriptions started before this date.",
              "title": "Started Before"
            },
            "description": "Only include subscriptions started before this date."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-started_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "schema": {
              "$ref": "#/components/schemas/MetadataQuery"
            },
            "description": "Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Subscription_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.subscriptions.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-started_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.subscriptions.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-started_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "subscriptions",
          "public"
        ],
        "summary": "Create Subscription",
        "description": "Create a subscription programmatically.\n\nThis endpoint only allows to create subscription on free products.\nFor paid products, use the checkout flow.\n\nNo initial order will be created and no confirmation email will be sent.\n\n**Scopes**: `subscriptions:write`",
        "operationId": "subscriptions:create",
        "security": [
          {
            "oidc": [
              "subscriptions:write"
            ]
          },
          {
            "pat": [
              "subscriptions:write"
            ]
          },
          {
            "oat": [
              "subscriptions:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SubscriptionCreateCustomer"
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionCreateExternalCustomer"
                  }
                ],
                "title": "Subscription Create"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Subscription created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.subscriptions.create(\n    product_id='d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23',\n    customer_id='992fae2a-2a17-4b7a-8d9e-e287cf90131b',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.subscriptions.create(\n  {\n    \"product_id\": \"d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23\",\n    \"customer_id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/subscriptions/export": {
      "get": {
        "tags": [
          "subscriptions",
          "public"
        ],
        "summary": "Export Subscriptions",
        "description": "Export subscriptions as a CSV file.\n\n**Scopes**: `subscriptions:read` `subscriptions:write`",
        "operationId": "subscriptions:export",
        "security": [
          {
            "oidc": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          },
          {
            "pat": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          },
          {
            "oat": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SubscriptionStatus"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter",
              "description": "Filter by subscription status."
            },
            "description": "Filter by subscription status."
          },
          {
            "name": "cancel_at_period_end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by subscriptions that are set to cancel at period end.",
              "title": "Cancel At Period End"
            },
            "description": "Filter by subscriptions that are set to cancel at period end."
          },
          {
            "name": "started_after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only include subscriptions started after this date. Must include a UTC offset.",
              "title": "Started After"
            },
            "description": "Only include subscriptions started after this date. Must include a UTC offset."
          },
          {
            "name": "started_before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only include subscriptions started before this date. Must include a UTC offset.",
              "title": "Started Before"
            },
            "description": "Only include subscriptions started before this date. Must include a UTC offset."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Time zone used to render dates in the CSV.",
              "default": "UTC",
              "title": "Timezone"
            },
            "description": "Time zone used to render dates in the CSV."
          },
          {
            "name": "columns",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SubscriptionExportColumn"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionExportColumn"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Columns to include in the CSV, in order. Defaults to email, started_at, product, amount, currency, status and recurring_interval.",
              "title": "Columns"
            },
            "description": "Columns to include in the CSV, in order. Defaults to email, started_at, product, amount, currency, status and recurring_interval."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "export",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.subscriptions.export(\n    timezone='UTC',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.subscriptions.export(\n  {\n    \"timezone\": \"UTC\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/subscriptions/{id}": {
      "get": {
        "tags": [
          "subscriptions",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Subscription",
        "description": "Get a subscription by ID.\n\n**Scopes**: `subscriptions:read` `subscriptions:write`",
        "operationId": "subscriptions:get",
        "security": [
          {
            "oidc": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          },
          {
            "pat": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          },
          {
            "oat": [
              "subscriptions:read",
              "subscriptions:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The subscription ID.",
              "title": "Id"
            },
            "description": "The subscription ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "status",
              "label": "Status"
            },
            {
              "key": "customer_id",
              "label": "Customer ID"
            },
            {
              "key": "product_id",
              "label": "Product ID"
            }
          ]
        },
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.subscriptions.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.subscriptions.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "subscriptions",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Subscription",
        "description": "Update a subscription.\n\n**Scopes**: `subscriptions:write`",
        "operationId": "subscriptions:update",
        "security": [
          {
            "oidc": [
              "subscriptions:write"
            ]
          },
          {
            "pat": [
              "subscriptions:write"
            ]
          },
          {
            "oat": [
              "subscriptions:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The subscription ID.",
              "title": "Id"
            },
            "description": "The subscription ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "402": {
            "description": "The charge failed, or requires customer authentication that can't be completed off-session.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PaymentFailed"
                    },
                    {
                      "$ref": "#/components/schemas/PaymentActionRequired"
                    }
                  ],
                  "title": "Response 402 Subscriptions:Update"
                }
              }
            }
          },
          "403": {
            "description": "Subscription is already canceled or will be at the end of the period, is not active, or the organization is not ready to renew subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AlreadyCanceledSubscription"
                    },
                    {
                      "$ref": "#/components/schemas/InactiveSubscription"
                    },
                    {
                      "$ref": "#/components/schemas/PaymentNotReady"
                    }
                  ],
                  "title": "Response 403 Subscriptions:Update"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "Subscription is pending an update, or is not scheduled to be canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SubscriptionLocked"
                    },
                    {
                      "$ref": "#/components/schemas/SubscriptionNotScheduledToCancel"
                    }
                  ],
                  "title": "Response 409 Subscriptions:Update"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.subscriptions.update(\n    '00000000-0000-4000-8000-000000000000',\n    product_id='d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.subscriptions.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"product_id\": \"d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "subscriptions",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Revoke Subscription",
        "description": "Revoke a subscription, i.e cancel immediately.\n\n**Scopes**: `subscriptions:write`",
        "operationId": "subscriptions:revoke",
        "security": [
          {
            "oidc": [
              "subscriptions:write"
            ]
          },
          {
            "pat": [
              "subscriptions:write"
            ]
          },
          {
            "oat": [
              "subscriptions:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The subscription ID.",
              "title": "Id"
            },
            "description": "The subscription ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "403": {
            "description": "This subscription is already revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlreadyCanceledSubscription"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "Subscription is pending an update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionLocked"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "revoke",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.subscriptions.revoke(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.subscriptions.revoke(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/oauth2/register": {
      "post": {
        "tags": [
          "oauth2",
          "clients",
          "public"
        ],
        "summary": "Create Client",
        "description": "Create an OAuth2 client.",
        "operationId": "oauth2:clients:oauth2:create_client",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuth2ClientConfiguration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": []
          },
          {
            "pat": []
          }
        ],
        "x-polar-allowed-subjects": [
          "Anonymous",
          "User"
        ],
        "x-speakeasy-group": "oauth2.clients",
        "x-speakeasy-name-override": "oauth2:create_client",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.clients.oauth2.create_client(\n    redirect_uris=['https://example.com'],\n    token_endpoint_auth_method='client_secret_post',\n    grant_types=['authorization_code', 'refresh_token'],\n    response_types=['code'],\n    scope=('openid profile email user:read user:write organizations:read '\n     'organizations:write custom_fields:read custom_fields:write '\n     'discounts:read discounts:write checkout_links:read '\n     'checkout_links:write checkouts:read checkouts:write '\n     'transactions:read transactions:write payouts:read payouts:write '\n     'products:read products:write benefits:read benefits:write '\n     'events:read events:write meters:read meters:write files:read '\n     'files:write subscriptions:read subscriptions:write customers:read '\n     'customers:write members:read members:write wallets:read '\n     'wallets:write disputes:read disputes:write customer_meters:read '\n     'customer_sessions:write member_sessions:write customer_seats:read '\n     'customer_seats:write orders:read orders:write refunds:read '\n     'refunds:write payments:read metrics:read metrics:write webhooks:read '\n     'webhooks:write license_keys:read license_keys:write '\n     'customer_portal:read customer_portal:write notifications:read '\n     'notifications:write notification_recipients:read '\n     'notification_recipients:write'),\n    client_name='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.oauth2.clients.oauth2.createClient(\n  {\n    \"redirect_uris\": [\n      \"https://example.com\"\n    ],\n    \"token_endpoint_auth_method\": \"client_secret_post\",\n    \"grant_types\": [\n      \"authorization_code\",\n      \"refresh_token\"\n    ],\n    \"response_types\": [\n      \"code\"\n    ],\n    \"scope\": \"openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write\",\n    \"client_name\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/oauth2/register/{client_id}": {
      "get": {
        "tags": [
          "oauth2",
          "clients",
          "public"
        ],
        "summary": "Get Client",
        "description": "Get an OAuth2 client by Client ID.",
        "operationId": "oauth2:clients:oauth2:get_client",
        "security": [
          {
            "oidc": []
          },
          {
            "pat": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Anonymous",
          "User"
        ],
        "x-speakeasy-group": "oauth2.clients",
        "x-speakeasy-name-override": "oauth2:get_client",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.clients.oauth2.get_client(\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.oauth2.clients.oauth2.getClient(\n  \"string\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "put": {
        "tags": [
          "oauth2",
          "clients",
          "public"
        ],
        "summary": "Update Client",
        "description": "Update an OAuth2 client.",
        "operationId": "oauth2:clients:oauth2:update_client",
        "security": [
          {
            "oidc": []
          },
          {
            "pat": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuth2ClientConfigurationUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Anonymous",
          "User"
        ],
        "x-speakeasy-group": "oauth2.clients",
        "x-speakeasy-name-override": "oauth2:update_client",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.clients.oauth2.update_client(\n    'string',\n    redirect_uris=['https://example.com'],\n    token_endpoint_auth_method='client_secret_post',\n    grant_types=['authorization_code', 'refresh_token'],\n    response_types=['code'],\n    scope=('openid profile email user:read user:write organizations:read '\n     'organizations:write custom_fields:read custom_fields:write '\n     'discounts:read discounts:write checkout_links:read '\n     'checkout_links:write checkouts:read checkouts:write '\n     'transactions:read transactions:write payouts:read payouts:write '\n     'products:read products:write benefits:read benefits:write '\n     'events:read events:write meters:read meters:write files:read '\n     'files:write subscriptions:read subscriptions:write customers:read '\n     'customers:write members:read members:write wallets:read '\n     'wallets:write disputes:read disputes:write customer_meters:read '\n     'customer_sessions:write member_sessions:write customer_seats:read '\n     'customer_seats:write orders:read orders:write refunds:read '\n     'refunds:write payments:read metrics:read metrics:write webhooks:read '\n     'webhooks:write license_keys:read license_keys:write '\n     'customer_portal:read customer_portal:write notifications:read '\n     'notifications:write notification_recipients:read '\n     'notification_recipients:write'),\n    client_name='string',\n    client_id='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.oauth2.clients.oauth2.updateClient(\n  \"string\",\n  {\n    \"redirect_uris\": [\n      \"https://example.com\"\n    ],\n    \"token_endpoint_auth_method\": \"client_secret_post\",\n    \"grant_types\": [\n      \"authorization_code\",\n      \"refresh_token\"\n    ],\n    \"response_types\": [\n      \"code\"\n    ],\n    \"scope\": \"openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write\",\n    \"client_name\": \"string\",\n    \"client_id\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "oauth2",
          "clients",
          "public"
        ],
        "summary": "Delete Client",
        "description": "Delete an OAuth2 client.",
        "operationId": "oauth2:clients:oauth2:delete_client",
        "security": [
          {
            "oidc": []
          },
          {
            "pat": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Client deleted successfully."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Anonymous",
          "User"
        ],
        "x-speakeasy-group": "oauth2.clients",
        "x-speakeasy-name-override": "oauth2:delete_client",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.oauth2.clients.oauth2.delete_client(\n    'string',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.oauth2.clients.oauth2.deleteClient(\n  \"string\",\n);\n"
          }
        ]
      }
    },
    "/v1/oauth2/authorize": {
      "get": {
        "tags": [
          "oauth2",
          "public"
        ],
        "summary": "Authorize",
        "operationId": "oauth2:authorize",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AuthorizeResponseUser"
                    },
                    {
                      "$ref": "#/components/schemas/AuthorizeResponseOrganization"
                    }
                  ],
                  "title": "Response Oauth2:Authorize",
                  "discriminator": {
                    "propertyName": "sub_type",
                    "mapping": {
                      "user": "#/components/schemas/AuthorizeResponseUser",
                      "organization": "#/components/schemas/AuthorizeResponseOrganization"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": []
          },
          {
            "pat": []
          }
        ],
        "x-polar-allowed-subjects": [
          "Anonymous",
          "User"
        ],
        "x-speakeasy-group": "oauth2",
        "x-speakeasy-name-override": "authorize",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.authorize()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.oauth2.authorize();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/oauth2/token": {
      "post": {
        "tags": [
          "oauth2",
          "public"
        ],
        "summary": "Request Token",
        "description": "Request an access token using a valid grant.",
        "operationId": "oauth2:request_token",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AuthorizationCodeTokenRequest"
                  },
                  {
                    "$ref": "#/components/schemas/RefreshTokenRequest"
                  },
                  {
                    "$ref": "#/components/schemas/WebTokenRequest"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "oauth2",
        "x-speakeasy-name-override": "oauth2:request_token",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.request_token()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.oauth2.requestToken();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/oauth2/revoke": {
      "post": {
        "tags": [
          "oauth2",
          "public"
        ],
        "summary": "Revoke Token",
        "description": "Revoke an access token or a refresh token.",
        "operationId": "oauth2:revoke_token",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RevokeTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeTokenResponse"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "oauth2",
        "x-speakeasy-name-override": "oauth2:revoke_token",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.revoke_token()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.oauth2.revokeToken();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/oauth2/introspect": {
      "post": {
        "tags": [
          "oauth2",
          "public"
        ],
        "summary": "Introspect Token",
        "description": "Get information about an access token.",
        "operationId": "oauth2:introspect_token",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/IntrospectTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntrospectTokenResponse"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "oauth2",
        "x-speakeasy-name-override": "oauth2:introspect_token",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.introspect_token()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.oauth2.introspectToken();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/oauth2/userinfo": {
      "get": {
        "tags": [
          "oauth2",
          "public"
        ],
        "summary": "Get User Info",
        "description": "Get information about the authenticated user.",
        "operationId": "oauth2:userinfo",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/UserInfoUser"
                    },
                    {
                      "$ref": "#/components/schemas/UserInfoOrganization"
                    }
                  ],
                  "title": "Response Oauth2:Userinfo"
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": []
          }
        ],
        "x-speakeasy-name-override": "userinfo",
        "x-speakeasy-group": "oauth2",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.userinfo()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.oauth2.userinfo();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/benefits/": {
      "get": {
        "tags": [
          "benefits",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Benefits",
        "description": "List benefits.\n\n**Scopes**: `benefits:read` `benefits:write`",
        "operationId": "benefits:list",
        "security": [
          {
            "oidc": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "pat": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "oat": [
              "benefits:read",
              "benefits:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/BenefitType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BenefitType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "BenefitType Filter",
              "description": "Filter by benefit type."
            },
            "description": "Filter by benefit type."
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The benefit ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The benefit ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Filter IDs",
              "description": "Filter by benefit IDs."
            },
            "description": "Filter by benefit IDs."
          },
          {
            "name": "exclude_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The benefit ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The benefit ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Exclude IDs",
              "description": "Exclude benefits with these IDs."
            },
            "description": "Exclude benefits with these IDs."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query",
              "description": "Filter by description."
            },
            "description": "Filter by description."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BenefitSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "schema": {
              "$ref": "#/components/schemas/MetadataQuery"
            },
            "description": "Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Benefit_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "benefits",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Benefit"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.benefits.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.benefits.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "benefits",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Benefit",
        "description": "Create a benefit.\n\n**Scopes**: `benefits:write`",
        "operationId": "benefits:create",
        "security": [
          {
            "oidc": [
              "benefits:write"
            ]
          },
          {
            "pat": [
              "benefits:write"
            ]
          },
          {
            "oat": [
              "benefits:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BenefitCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Benefit created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Benefit",
                  "title": "Benefit"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "benefits",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.benefits.create(\n    type='custom',\n    description='string',\n    properties={},\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.benefits.create(\n  {\n    \"type\": \"custom\",\n    \"description\": \"string\",\n    \"properties\": {}\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/benefits/{id}": {
      "get": {
        "tags": [
          "benefits",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Benefit",
        "description": "Get a benefit by ID.\n\n**Scopes**: `benefits:read` `benefits:write`",
        "operationId": "benefits:get",
        "security": [
          {
            "oidc": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "pat": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "oat": [
              "benefits:read",
              "benefits:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The benefit ID.",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Benefit",
                  "title": "Benefit"
                }
              }
            }
          },
          "404": {
            "description": "Benefit not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "type",
              "label": "Type"
            },
            {
              "key": "description",
              "label": "Description"
            }
          ]
        },
        "x-speakeasy-group": "benefits",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.benefits.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.benefits.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "benefits",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Benefit",
        "description": "Update a benefit.\n\n**Scopes**: `benefits:write`",
        "operationId": "benefits:update",
        "security": [
          {
            "oidc": [
              "benefits:write"
            ]
          },
          {
            "pat": [
              "benefits:write"
            ]
          },
          {
            "oat": [
              "benefits:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The benefit ID.",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/BenefitCustomUpdate"
                  },
                  {
                    "$ref": "#/components/schemas/BenefitDiscordUpdate"
                  },
                  {
                    "$ref": "#/components/schemas/BenefitGitHubRepositoryUpdate"
                  },
                  {
                    "$ref": "#/components/schemas/BenefitDownloadablesUpdate"
                  },
                  {
                    "$ref": "#/components/schemas/BenefitLicenseKeysUpdate"
                  },
                  {
                    "$ref": "#/components/schemas/BenefitMeterCreditUpdate"
                  },
                  {
                    "$ref": "#/components/schemas/BenefitFeatureFlagUpdate"
                  },
                  {
                    "$ref": "#/components/schemas/BenefitSlackSharedChannelUpdate"
                  }
                ],
                "title": "Benefit Update"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Benefit updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Benefit",
                  "title": "Benefit"
                }
              }
            }
          },
          "404": {
            "description": "Benefit not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "benefits",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.benefits.update(\n    '00000000-0000-4000-8000-000000000000',\n    type='custom',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.benefits.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"type\": \"custom\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "benefits",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Benefit",
        "description": "Delete a benefit.\n\n> [!WARNING]\n> Every grants associated with the benefit will be revoked.\n> Users will lose access to the benefit.\n\n**Scopes**: `benefits:write`",
        "operationId": "benefits:delete",
        "security": [
          {
            "oidc": [
              "benefits:write"
            ]
          },
          {
            "pat": [
              "benefits:write"
            ]
          },
          {
            "oat": [
              "benefits:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The benefit ID.",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Benefit deleted."
          },
          "403": {
            "description": "This benefit is not deletable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "Benefit not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "benefits",
        "x-speakeasy-name-override": "delete",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.benefits.delete(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.benefits.delete(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/benefits/{id}/files": {
      "get": {
        "tags": [
          "benefits",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Benefit Files",
        "description": "List the downloadable files for a benefit with their download statistics.\n\n**Scopes**: `benefits:read` `benefits:write`",
        "operationId": "benefits:files",
        "security": [
          {
            "oidc": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "pat": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "oat": [
              "benefits:read",
              "benefits:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The benefit ID.",
              "title": "Id"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_BenefitDownloadableFile_"
                }
              }
            }
          },
          "404": {
            "description": "Benefit not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "benefits",
        "x-speakeasy-name-override": "files",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/BenefitDownloadableFile"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.benefits.iter_files(\n    '00000000-0000-4000-8000-000000000000',\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.benefits.iterFiles(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/benefits/{id}/grants": {
      "get": {
        "tags": [
          "benefits",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Benefit Grants",
        "description": "List the individual grants for a benefit.\n\nIt's especially useful to check if a user has been granted a benefit.\n\n**Scopes**: `benefits:read` `benefits:write`",
        "operationId": "benefits:grants",
        "security": [
          {
            "oidc": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "pat": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "oat": [
              "benefits:read",
              "benefits:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The benefit ID.",
              "title": "Id"
            }
          },
          {
            "name": "is_granted",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. ",
              "title": "Is Granted"
            },
            "description": "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. "
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer."
            },
            "description": "Filter by customer."
          },
          {
            "name": "member_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "MemberID Filter",
              "description": "Filter by member."
            },
            "description": "Filter by member."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_BenefitGrant_"
                }
              }
            }
          },
          "404": {
            "description": "Benefit not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "benefits",
        "x-speakeasy-name-override": "grants",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/BenefitGrant"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.benefits.iter_grants(\n    '00000000-0000-4000-8000-000000000000',\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.benefits.iterGrants(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/benefit-grants/": {
      "get": {
        "tags": [
          "benefit-grants",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Benefit Grants",
        "description": "List benefit grants across all benefits accessible to the authenticated subject.\n\n**Scopes**: `benefits:read` `benefits:write`",
        "operationId": "benefit-grants:list",
        "security": [
          {
            "oidc": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "pat": [
              "benefits:read",
              "benefits:write"
            ]
          },
          {
            "oat": [
              "benefits:read",
              "benefits:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The customer external ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "The customer external ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by customer external ID."
            },
            "description": "Filter by customer external ID."
          },
          {
            "name": "is_granted",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. ",
              "title": "Is Granted"
            },
            "description": "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. "
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BenefitGrantSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_BenefitGrant_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "benefit-grants",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/BenefitGrant"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.benefit_grants.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.benefitGrants.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/webhooks/endpoints": {
      "get": {
        "tags": [
          "webhooks",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Webhook Endpoints",
        "description": "List webhook endpoints.\n\n**Scopes**: `webhooks:read` `webhooks:write`",
        "operationId": "webhooks:list_webhook_endpoints",
        "security": [
          {
            "oidc": [
              "webhooks:read",
              "webhooks:write"
            ]
          },
          {
            "pat": [
              "webhooks:read",
              "webhooks:write"
            ]
          },
          {
            "oat": [
              "webhooks:read",
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by organization ID.",
              "title": "Organization Id"
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_WebhookEndpoint_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "list_webhook_endpoints",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/WebhookEndpoint"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.webhooks.iter_list_webhook_endpoints(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.webhooks.iterListWebhookEndpoints(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "webhooks",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Webhook Endpoint",
        "description": "Create a webhook endpoint.\n\n**Scopes**: `webhooks:write`",
        "operationId": "webhooks:create_webhook_endpoint",
        "security": [
          {
            "oidc": [
              "webhooks:write"
            ]
          },
          {
            "pat": [
              "webhooks:write"
            ]
          },
          {
            "oat": [
              "webhooks:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook endpoint created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "create_webhook_endpoint",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.webhooks.create_webhook_endpoint(\n    url='https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0',\n    api_version='2026-10',\n    format='raw',\n    events=['checkout.created'],\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.webhooks.createWebhookEndpoint(\n  {\n    \"url\": \"https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0\",\n    \"api_version\": \"2026-10\",\n    \"format\": \"raw\",\n    \"events\": [\n      \"checkout.created\"\n    ]\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/webhooks/endpoints/{id}": {
      "get": {
        "tags": [
          "webhooks",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Webhook Endpoint",
        "description": "Get a webhook endpoint by ID.\n\n**Scopes**: `webhooks:read` `webhooks:write`",
        "operationId": "webhooks:get_webhook_endpoint",
        "security": [
          {
            "oidc": [
              "webhooks:read",
              "webhooks:write"
            ]
          },
          {
            "pat": [
              "webhooks:read",
              "webhooks:write"
            ]
          },
          {
            "oat": [
              "webhooks:read",
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The webhook endpoint ID.",
              "title": "Id"
            },
            "description": "The webhook endpoint ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "404": {
            "description": "Webhook endpoint not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "url",
              "label": "URL"
            },
            {
              "key": "enabled",
              "label": "Enabled"
            }
          ]
        },
        "x-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "get_webhook_endpoint",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.webhooks.get_webhook_endpoint(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.webhooks.getWebhookEndpoint(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "webhooks",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Webhook Endpoint",
        "description": "Update a webhook endpoint.\n\n**Scopes**: `webhooks:write`",
        "operationId": "webhooks:update_webhook_endpoint",
        "security": [
          {
            "oidc": [
              "webhooks:write"
            ]
          },
          {
            "pat": [
              "webhooks:write"
            ]
          },
          {
            "oat": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The webhook endpoint ID.",
              "title": "Id"
            },
            "description": "The webhook endpoint ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook endpoint updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "404": {
            "description": "Webhook endpoint not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "update_webhook_endpoint",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.webhooks.update_webhook_endpoint(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.webhooks.updateWebhookEndpoint(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "webhooks",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Webhook Endpoint",
        "description": "Delete a webhook endpoint.\n\n**Scopes**: `webhooks:write`",
        "operationId": "webhooks:delete_webhook_endpoint",
        "security": [
          {
            "oidc": [
              "webhooks:write"
            ]
          },
          {
            "pat": [
              "webhooks:write"
            ]
          },
          {
            "oat": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The webhook endpoint ID.",
              "title": "Id"
            },
            "description": "The webhook endpoint ID."
          }
        ],
        "responses": {
          "204": {
            "description": "Webhook endpoint deleted."
          },
          "404": {
            "description": "Webhook endpoint not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "delete_webhook_endpoint",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.webhooks.delete_webhook_endpoint(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.webhooks.deleteWebhookEndpoint(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/webhooks/endpoints/{id}/secret": {
      "patch": {
        "tags": [
          "webhooks",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Reset Webhook Endpoint Secret",
        "description": "Regenerate a webhook endpoint secret.\n\n**Scopes**: `webhooks:write`",
        "operationId": "webhooks:reset_webhook_endpoint_secret",
        "security": [
          {
            "oidc": [
              "webhooks:write"
            ]
          },
          {
            "pat": [
              "webhooks:write"
            ]
          },
          {
            "oat": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The webhook endpoint ID.",
              "title": "Id"
            },
            "description": "The webhook endpoint ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook endpoint secret reset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "404": {
            "description": "Webhook endpoint not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "reset_webhook_endpoint_secret",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.webhooks.reset_webhook_endpoint_secret(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.webhooks.resetWebhookEndpointSecret(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/webhooks/deliveries": {
      "get": {
        "tags": [
          "webhooks",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Webhook Deliveries",
        "description": "List webhook deliveries.\n\nDeliveries are all the attempts to deliver a webhook event to an endpoint.\n\n**Scopes**: `webhooks:read` `webhooks:write`",
        "operationId": "webhooks:list_webhook_deliveries",
        "security": [
          {
            "oidc": [
              "webhooks:read",
              "webhooks:write"
            ]
          },
          {
            "pat": [
              "webhooks:read",
              "webhooks:write"
            ]
          },
          {
            "oat": [
              "webhooks:read",
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by webhook endpoint ID.",
              "title": "Endpoint Id"
            },
            "description": "Filter by webhook endpoint ID."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter deliveries after this timestamp.",
              "title": "Start Timestamp"
            },
            "description": "Filter deliveries after this timestamp."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter deliveries before this timestamp.",
              "title": "End Timestamp"
            },
            "description": "Filter deliveries before this timestamp."
          },
          {
            "name": "succeeded",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by delivery success status.",
              "title": "Succeeded"
            },
            "description": "Filter by delivery success status."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Query to filter webhook deliveries.",
              "title": "Query"
            },
            "description": "Query to filter webhook deliveries."
          },
          {
            "name": "http_code_class",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "2xx",
                    "3xx",
                    "4xx",
                    "5xx"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by HTTP response code class (2xx, 3xx, 4xx, 5xx).",
              "title": "Http Code Class"
            },
            "description": "Filter by HTTP response code class (2xx, 3xx, 4xx, 5xx)."
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WebhookEventType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEventType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by webhook event type.",
              "title": "Event Type"
            },
            "description": "Filter by webhook event type."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_WebhookDelivery_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "list_webhook_deliveries",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/WebhookDelivery"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.webhooks.iter_list_webhook_deliveries(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.webhooks.iterListWebhookDeliveries(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/webhooks/events/{id}/redeliver": {
      "post": {
        "tags": [
          "webhooks",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Redeliver Webhook Event",
        "description": "Schedule the re-delivery of a webhook event.\n\n**Scopes**: `webhooks:write`",
        "operationId": "webhooks:redeliver_webhook_event",
        "security": [
          {
            "oidc": [
              "webhooks:write"
            ]
          },
          {
            "pat": [
              "webhooks:write"
            ]
          },
          {
            "oat": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The webhook event ID.",
              "title": "Id"
            },
            "description": "The webhook event ID."
          }
        ],
        "responses": {
          "202": {
            "description": "Webhook event re-delivery scheduled.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Webhook event not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "redeliver_webhook_event",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.webhooks.redeliver_webhook_event(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.webhooks.redeliverWebhookEvent(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/products/": {
      "get": {
        "tags": [
          "products",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Products",
        "description": "List products.\n\n**Scopes**: `products:read` `products:write`",
        "operationId": "products:list",
        "security": [
          {
            "oidc": [
              "products:read",
              "products:write"
            ]
          },
          {
            "pat": [
              "products:read",
              "products:write"
            ]
          },
          {
            "oat": [
              "products:read",
              "products:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by product name.",
              "title": "Query"
            },
            "description": "Filter by product name."
          },
          {
            "name": "is_archived",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on archived products.",
              "title": "Is Archived"
            },
            "description": "Filter on archived products."
          },
          {
            "name": "is_recurring",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. ",
              "title": "Is Recurring"
            },
            "description": "Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. "
          },
          {
            "name": "benefit_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The benefit ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The benefit ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "BenefitID Filter",
              "description": "Filter products granting specific benefit."
            },
            "description": "Filter products granting specific benefit."
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductVisibility"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by visibility.",
              "title": "Visibility"
            },
            "description": "Filter by visibility."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "schema": {
              "$ref": "#/components/schemas/MetadataQuery"
            },
            "description": "Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Product_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "products",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Product"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.products.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.products.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "products",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Product",
        "description": "Create a product.\n\n**Scopes**: `products:write`",
        "operationId": "products:create",
        "security": [
          {
            "oidc": [
              "products:write"
            ]
          },
          {
            "pat": [
              "products:write"
            ]
          },
          {
            "oat": [
              "products:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Product created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "products",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.products.create(\n    name='string',\n    prices=[{'amount_type': 'fixed', 'price_amount': 0}],\n    recurring_interval='day',\n    recurring_interval_count=1,\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.products.create(\n  {\n    \"name\": \"string\",\n    \"prices\": [\n      {\n        \"amount_type\": \"fixed\",\n        \"price_amount\": 0\n      }\n    ],\n    \"recurring_interval\": \"day\",\n    \"recurring_interval_count\": 1\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/products/{id}": {
      "get": {
        "tags": [
          "products",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Product",
        "description": "Get a product by ID.\n\n**Scopes**: `products:read` `products:write`",
        "operationId": "products:get",
        "security": [
          {
            "oidc": [
              "products:read",
              "products:write"
            ]
          },
          {
            "pat": [
              "products:read",
              "products:write"
            ]
          },
          {
            "oat": [
              "products:read",
              "products:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The product ID.",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "404": {
            "description": "Product not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "is_archived",
              "label": "Archived"
            }
          ]
        },
        "x-speakeasy-group": "products",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.products.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.products.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "products",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Product",
        "description": "Update a product.\n\n**Scopes**: `products:write`",
        "operationId": "products:update",
        "security": [
          {
            "oidc": [
              "products:write"
            ]
          },
          {
            "pat": [
              "products:write"
            ]
          },
          {
            "oat": [
              "products:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The product ID.",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Product updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "403": {
            "description": "You don't have the permission to update this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "Product not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "products",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.products.update(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.products.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "products",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Product",
        "description": "Delete a product.\n\nOnly products without orders, subscriptions, trials or discounts can be deleted.\nProducts that are in use can only be archived.\n\n**Scopes**: `products:write`",
        "operationId": "products:delete",
        "security": [
          {
            "oidc": [
              "products:write"
            ]
          },
          {
            "pat": [
              "products:write"
            ]
          },
          {
            "oat": [
              "products:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The product ID.",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Product deleted."
          },
          "403": {
            "description": "You don't have the permission to delete this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "Product not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "Product is in use and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductNotDeletable"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "products",
        "x-speakeasy-name-override": "delete",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.products.delete(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.products.delete(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/products/{id}/benefits": {
      "post": {
        "tags": [
          "products",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Product Benefits",
        "description": "Update benefits granted by a product.\n\n**Scopes**: `products:write`",
        "operationId": "products:update_benefits",
        "security": [
          {
            "oidc": [
              "products:write"
            ]
          },
          {
            "pat": [
              "products:write"
            ]
          },
          {
            "oat": [
              "products:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The product ID.",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductBenefitsUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Product benefits updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "403": {
            "description": "You don't have the permission to update this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "Product not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "products",
        "x-speakeasy-name-override": "update_benefits",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.products.update_benefits(\n    '00000000-0000-4000-8000-000000000000',\n    benefits=['00000000-0000-4000-8000-000000000000'],\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.products.updateBenefits(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"benefits\": [\n      \"00000000-0000-4000-8000-000000000000\"\n    ]\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/orders/": {
      "get": {
        "tags": [
          "orders",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Orders",
        "description": "List orders.\n\n**Scopes**: `orders:read`",
        "operationId": "orders:list",
        "security": [
          {
            "oidc": [
              "orders:read"
            ]
          },
          {
            "pat": [
              "orders:read"
            ]
          },
          {
            "oat": [
              "orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "product_billing_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ProductBillingType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductBillingType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductBillingType Filter",
              "description": "Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."
            },
            "description": "Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."
          },
          {
            "name": "discount_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "DiscountID Filter",
              "description": "Filter by discount ID."
            },
            "description": "Filter by discount ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The customer external ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "The customer external ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by customer external ID."
            },
            "description": "Filter by customer external ID."
          },
          {
            "name": "checkout_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CheckoutID Filter",
              "description": "Filter by checkout ID."
            },
            "description": "Filter by checkout ID."
          },
          {
            "name": "subscription_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The subscription ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The subscription ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "SubscriptionID Filter",
              "description": "Filter by subscription ID."
            },
            "description": "Filter by subscription ID."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/OrderStatus"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter",
              "description": "Filter by order status."
            },
            "description": "Filter by order status."
          },
          {
            "name": "created_after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only include orders created after this date",
              "title": "Created After"
            },
            "description": "Only include orders created after this date"
          },
          {
            "name": "created_before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only include orders created before this date",
              "title": "Created Before"
            },
            "description": "Only include orders created before this date"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "schema": {
              "$ref": "#/components/schemas/MetadataQuery"
            },
            "description": "Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Order_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.orders.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.orders.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "orders",
          "public"
        ],
        "summary": "Create Order",
        "description": "Create a draft order for an off-session charge against a saved payment\nmethod. The order is created with `status=draft` and no invoice number;\ncall `POST /v1/orders/{id}/finalize` to attempt the charge.\n\nThe organization must have the `off_session_charges_enabled` feature flag.\n\n**Scopes**: `orders:write`",
        "operationId": "orders:create",
        "security": [
          {
            "oidc": [
              "orders:write"
            ]
          },
          {
            "pat": [
              "orders:write"
            ]
          },
          {
            "oat": [
              "orders:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.create(\n    customer_id='00000000-0000-4000-8000-000000000000',\n    product_id='00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.orders.create(\n  {\n    \"customer_id\": \"00000000-0000-4000-8000-000000000000\",\n    \"product_id\": \"00000000-0000-4000-8000-000000000000\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/orders/export": {
      "get": {
        "tags": [
          "orders",
          "public"
        ],
        "summary": "Export Orders",
        "description": "Export orders as a CSV file.\n\n**Scopes**: `orders:read`",
        "operationId": "orders:export",
        "security": [
          {
            "oidc": [
              "orders:read"
            ]
          },
          {
            "pat": [
              "orders:read"
            ]
          },
          {
            "oat": [
              "orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/OrderStatus"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter",
              "description": "Filter by order status."
            },
            "description": "Filter by order status."
          },
          {
            "name": "created_after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only include orders created after this date. Must include a UTC offset.",
              "title": "Created After"
            },
            "description": "Only include orders created after this date. Must include a UTC offset."
          },
          {
            "name": "created_before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only include orders created before this date. Must include a UTC offset.",
              "title": "Created Before"
            },
            "description": "Only include orders created before this date. Must include a UTC offset."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Time zone used to render dates in the CSV.",
              "default": "UTC",
              "title": "Timezone"
            },
            "description": "Time zone used to render dates in the CSV."
          },
          {
            "name": "columns",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/OrderExportColumn"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderExportColumn"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Columns to include in the CSV, in order. Defaults to email, created_at, product, net_amount, currency, status and invoice_number.",
              "title": "Columns"
            },
            "description": "Columns to include in the CSV, in order. Defaults to email, created_at, product, net_amount, currency, status and invoice_number."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "export",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.export(\n    timezone='UTC',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.orders.export(\n  {\n    \"timezone\": \"UTC\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/orders/{id}": {
      "get": {
        "tags": [
          "orders",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Order",
        "description": "Get an order by ID.\n\n**Scopes**: `orders:read`",
        "operationId": "orders:get",
        "security": [
          {
            "oidc": [
              "orders:read"
            ]
          },
          {
            "pat": [
              "orders:read"
            ]
          },
          {
            "oat": [
              "orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.orders.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "orders",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Order",
        "description": "Update an order.\n\n**Scopes**: `orders:write`",
        "operationId": "orders:update",
        "security": [
          {
            "oidc": [
              "orders:write"
            ]
          },
          {
            "pat": [
              "orders:write"
            ]
          },
          {
            "oat": [
              "orders:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.update(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.orders.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/orders/{id}/finalize": {
      "post": {
        "tags": [
          "orders",
          "public"
        ],
        "summary": "Finalize Order",
        "description": "Finalize a draft order and synchronously attempt an off-session charge.\n\nOn success, the order transitions to `paid` and benefit grants fire\nbefore the response returns. On failure (decline, missing payment method,\nSCA challenge), the order stays in `draft` and a 4xx error is returned.\n\nThe request fails with 412 if the order is not in `draft` status.\n\n**Scopes**: `orders:write`",
        "operationId": "orders:finalize",
        "security": [
          {
            "oidc": [
              "orders:write"
            ]
          },
          {
            "pat": [
              "orders:write"
            ]
          },
          {
            "oat": [
              "orders:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderFinalize",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "402": {
            "description": "The charge failed, or requires customer authentication (e.g. a 3DS challenge) that can't be completed off-session.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PaymentFailed"
                    },
                    {
                      "$ref": "#/components/schemas/PaymentActionRequired"
                    }
                  ],
                  "title": "Response 402 Orders:Finalize"
                }
              }
            }
          },
          "403": {
            "description": "Off-session charges are not enabled for this organization, or its account can't currently accept payments.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OffSessionChargesNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/OrganizationNotReadyForPayments"
                    }
                  ],
                  "title": "Response 403 Orders:Finalize"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "412": {
            "description": "The order is not in `draft` status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderNotDraft"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "finalize",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.finalize(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.orders.finalize(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/orders/{id}/invoice": {
      "post": {
        "tags": [
          "orders",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Generate Order Invoice",
        "description": "Trigger generation of an order's invoice.\n\n**Scopes**: `orders:read`",
        "operationId": "orders:generate_invoice",
        "security": [
          {
            "oidc": [
              "orders:read"
            ]
          },
          {
            "pat": [
              "orders:read"
            ]
          },
          {
            "oat": [
              "orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "Order is not eligible for invoice generation (invalid status).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderNotEligibleForInvoice"
                }
              }
            }
          },
          "422": {
            "description": "Order is missing billing name or address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MissingInvoiceBillingDetails"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-mint": {
          "content": "<Warning>\n  Once the invoice is generated, it's permanent and cannot be modified.\n\n  Make sure the billing details (name and address) are correct before generating the invoice. You can update them before generating the invoice by calling the [`PATCH /v1/orders/{id}`](/api-reference/orders/update-order) endpoint.\n</Warning>\n\n<Note>\n  After successfully calling this endpoint, you get a `202` response, meaning the generation of the invoice has been scheduled. It usually only takes a few seconds before you can retrieve the invoice using the [`GET /v1/orders/{id}/invoice`](/api-reference/orders/get-order-invoice) endpoint.\n\n  If you want a reliable notification when the invoice is ready, you can listen to the [`order.updated`](/api-reference/orderupdated) webhook and check the [`is_invoice_generated` field](/api-reference/orderupdated#schema-data-is-invoice-generated).\n</Note>"
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "generate_invoice",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.generate_invoice(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.orders.generateInvoice(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "get": {
        "tags": [
          "orders",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Order Invoice",
        "description": "Get an order's invoice data.\n\n**Scopes**: `orders:read`",
        "operationId": "orders:invoice",
        "security": [
          {
            "oidc": [
              "orders:read"
            ]
          },
          {
            "pat": [
              "orders:read"
            ]
          },
          {
            "oat": [
              "orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderInvoice"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-mint": {
          "content": "<Note>\n  The invoice must be generated first before it can be retrieved. You should call the [`POST /v1/orders/{id}/invoice`](/api-reference/orders/generate-order-invoice) endpoint to generate the invoice.\n\n  If the invoice is not generated, you will receive a `404` error.\n</Note>"
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "invoice",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.invoice(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.orders.invoice(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/orders/{id}/receipt": {
      "get": {
        "tags": [
          "orders",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Order Receipt",
        "description": "Get a presigned URL to download an order's receipt PDF.\n\n**Scopes**: `orders:read`",
        "operationId": "orders:receipt",
        "security": [
          {
            "oidc": [
              "orders:read"
            ]
          },
          {
            "pat": [
              "orders:read"
            ]
          },
          {
            "oat": [
              "orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderReceipt"
                }
              }
            }
          },
          "202": {
            "description": "Receipt generation in progress."
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "receipt",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.receipt(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.orders.receipt(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/refunds/": {
      "get": {
        "tags": [
          "refunds",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Refunds",
        "description": "List refunds.\n\n**Scopes**: `refunds:read` `refunds:write`",
        "operationId": "refunds:list",
        "security": [
          {
            "oidc": [
              "refunds:read",
              "refunds:write"
            ]
          },
          {
            "pat": [
              "refunds:read",
              "refunds:write"
            ]
          },
          {
            "oat": [
              "refunds:read",
              "refunds:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The refund ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The refund ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "RefundID Filter",
              "description": "Filter by refund ID."
            },
            "description": "Filter by refund ID."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The order ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The order ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrderID Filter",
              "description": "Filter by order ID."
            },
            "description": "Filter by order ID."
          },
          {
            "name": "subscription_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The subscription ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The subscription ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "SubscriptionID Filter",
              "description": "Filter by subscription ID."
            },
            "description": "Filter by subscription ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The customer external ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "The customer external ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by customer external ID."
            },
            "description": "Filter by customer external ID."
          },
          {
            "name": "succeeded",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "RefundStatus Filter",
              "description": "Filter by `succeeded`."
            },
            "description": "Filter by `succeeded`."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RefundSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Refund_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "refunds",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Refund"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.refunds.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.refunds.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "refunds",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Refund",
        "description": "Create a refund.\n\n**Scopes**: `refunds:write`",
        "operationId": "refunds:create",
        "security": [
          {
            "oidc": [
              "refunds:write"
            ]
          },
          {
            "pat": [
              "refunds:write"
            ]
          },
          {
            "oat": [
              "refunds:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Refund created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refund"
                }
              }
            }
          },
          "403": {
            "description": "Order is already fully refunded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefundedAlready"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "refunds",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.refunds.create(\n    order_id='00000000-0000-4000-8000-000000000000',\n    reason='duplicate',\n    amount=1,\n    revoke_benefits=False,\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.refunds.create(\n  {\n    \"order_id\": \"00000000-0000-4000-8000-000000000000\",\n    \"reason\": \"duplicate\",\n    \"amount\": 1,\n    \"revoke_benefits\": false\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/disputes/": {
      "get": {
        "tags": [
          "disputes",
          "public"
        ],
        "summary": "List Disputes",
        "description": "List disputes.\n\n**Scopes**: `disputes:read` `disputes:write`",
        "operationId": "disputes:list",
        "security": [
          {
            "oidc": [
              "disputes:read",
              "disputes:write"
            ]
          },
          {
            "pat": [
              "disputes:read",
              "disputes:write"
            ]
          },
          {
            "oat": [
              "disputes:read",
              "disputes:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The order ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The order ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrderID Filter",
              "description": "Filter by order ID."
            },
            "description": "Filter by order ID."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DisputeStatus"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DisputeStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter",
              "description": "Filter by dispute status."
            },
            "description": "Filter by dispute status."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DisputeSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Dispute_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "disputes",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Dispute"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.disputes.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.disputes.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/disputes/{id}": {
      "get": {
        "tags": [
          "disputes",
          "public"
        ],
        "summary": "Get Dispute",
        "description": "Get a dispute by ID.\n\n**Scopes**: `disputes:read` `disputes:write`",
        "operationId": "disputes:get",
        "security": [
          {
            "oidc": [
              "disputes:read",
              "disputes:write"
            ]
          },
          {
            "pat": [
              "disputes:read",
              "disputes:write"
            ]
          },
          {
            "oat": [
              "disputes:read",
              "disputes:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The dispute ID.",
              "title": "Id"
            },
            "description": "The dispute ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dispute"
                }
              }
            }
          },
          "404": {
            "description": "Dispute not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "disputes",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.disputes.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.disputes.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/disputes/{id}/accept": {
      "post": {
        "tags": [
          "disputes",
          "public"
        ],
        "summary": "Accept Dispute",
        "description": "Accept a dispute, conceding the chargeback.\n\nCloses the dispute with the processor (settling it as `lost`) and records\nthe merchant's decision on the dispute's support case.\n\n**Scopes**: `disputes:write`",
        "operationId": "disputes:accept",
        "security": [
          {
            "oidc": [
              "disputes:write"
            ]
          },
          {
            "pat": [
              "disputes:write"
            ]
          },
          {
            "oat": [
              "disputes:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The dispute ID.",
              "title": "Id"
            },
            "description": "The dispute ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dispute"
                }
              }
            }
          },
          "404": {
            "description": "Dispute not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisputeNotOpenError"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "disputes",
        "x-speakeasy-name-override": "accept",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.disputes.accept(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.disputes.accept(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/checkouts/": {
      "get": {
        "tags": [
          "checkouts",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Checkout Sessions",
        "description": "List checkout sessions.\n\n**Scopes**: `checkouts:read` `checkouts:write`",
        "operationId": "checkouts:list",
        "security": [
          {
            "oidc": [
              "checkouts:read",
              "checkouts:write"
            ]
          },
          {
            "pat": [
              "checkouts:read",
              "checkouts:write"
            ]
          },
          {
            "oat": [
              "checkouts:read",
              "checkouts:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The customer external ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "The customer external ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by customer external ID."
            },
            "description": "Filter by customer external ID."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CheckoutStatus"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CheckoutStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter",
              "description": "Filter by checkout session status."
            },
            "description": "Filter by checkout session status."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by customer email.",
              "title": "Query"
            },
            "description": "Filter by customer email."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CheckoutSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Checkout_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "checkouts",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Checkout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.checkouts.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.checkouts.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "checkouts",
          "public"
        ],
        "summary": "Create Checkout Session",
        "description": "Create a checkout session.\n\n**Scopes**: `checkouts:write`",
        "operationId": "checkouts:create",
        "security": [
          {
            "oidc": [
              "checkouts:write"
            ]
          },
          {
            "pat": [
              "checkouts:write"
            ]
          },
          {
            "oat": [
              "checkouts:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Checkout session created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "checkouts",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkouts.create(\n    allow_discount_codes=True,\n    require_billing_address=False,\n    allow_trial=True,\n    is_business_customer=False,\n    products=['00000000-0000-4000-8000-000000000000'],\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkouts.create(\n  {\n    \"allow_discount_codes\": true,\n    \"require_billing_address\": false,\n    \"allow_trial\": true,\n    \"is_business_customer\": false,\n    \"products\": [\n      \"00000000-0000-4000-8000-000000000000\"\n    ]\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/checkouts/{id}": {
      "get": {
        "tags": [
          "checkouts",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Checkout Session",
        "description": "Get a checkout session by ID.\n\n**Scopes**: `checkouts:read` `checkouts:write`",
        "operationId": "checkouts:get",
        "security": [
          {
            "oidc": [
              "checkouts:read",
              "checkouts:write"
            ]
          },
          {
            "pat": [
              "checkouts:read",
              "checkouts:write"
            ]
          },
          {
            "oat": [
              "checkouts:read",
              "checkouts:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The checkout session ID.",
              "title": "Id"
            },
            "description": "The checkout session ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                }
              }
            }
          },
          "404": {
            "description": "Checkout session not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "checkouts",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkouts.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkouts.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "checkouts",
          "public"
        ],
        "summary": "Update Checkout Session",
        "description": "Update a checkout session.\n\n**Scopes**: `checkouts:write`",
        "operationId": "checkouts:update",
        "security": [
          {
            "oidc": [
              "checkouts:write"
            ]
          },
          {
            "pat": [
              "checkouts:write"
            ]
          },
          {
            "oat": [
              "checkouts:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The checkout session ID.",
              "title": "Id"
            },
            "description": "The checkout session ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout session updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                }
              }
            }
          },
          "404": {
            "description": "Checkout session not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "403": {
            "description": "The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutForbiddenError"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "checkouts",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkouts.update(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkouts.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/checkouts/client/{client_secret}": {
      "get": {
        "tags": [
          "checkouts",
          "public"
        ],
        "summary": "Get Checkout Session from Client",
        "description": "Get a checkout session by client secret.",
        "operationId": "checkouts:client_get",
        "parameters": [
          {
            "name": "client_secret",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The checkout session client secret.",
              "title": "Client Secret"
            },
            "description": "The checkout session client secret."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutPublic"
                }
              }
            }
          },
          "403": {
            "description": "The organization is not allowed to accept payments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "Checkout session not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "410": {
            "description": "The checkout session is expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpiredCheckoutError"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "checkouts",
        "x-speakeasy-name-override": "client_get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkouts.client_get(\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkouts.clientGet(\n  \"string\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "checkouts",
          "public"
        ],
        "summary": "Update Checkout Session from Client",
        "description": "Update a checkout session by client secret.",
        "operationId": "checkouts:client_update",
        "parameters": [
          {
            "name": "client_secret",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The checkout session client secret.",
              "title": "Client Secret"
            },
            "description": "The checkout session client secret."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutUpdatePublic"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout session updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutPublic"
                }
              }
            }
          },
          "404": {
            "description": "Checkout session not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "403": {
            "description": "The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutForbiddenError"
                }
              }
            }
          },
          "409": {
            "description": "The checkout session is being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutLocked"
                }
              }
            }
          },
          "410": {
            "description": "The checkout session is expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpiredCheckoutError"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "checkouts",
        "x-speakeasy-name-override": "client_update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkouts.client_update(\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkouts.clientUpdate(\n  \"string\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/checkouts/client/{client_secret}/confirm": {
      "post": {
        "tags": [
          "checkouts",
          "public"
        ],
        "summary": "Confirm Checkout Session from Client",
        "description": "Confirm a checkout session by client secret.\n\nOrders and subscriptions will be processed.",
        "operationId": "checkouts:client_confirm",
        "security": [
          {
            "oidc": []
          },
          {
            "pat": []
          }
        ],
        "parameters": [
          {
            "name": "client_secret",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The checkout session client secret.",
              "title": "Client Secret"
            },
            "description": "The checkout session client secret."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutConfirmStripe"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout session confirmed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutPublicConfirmed"
                }
              }
            }
          },
          "400": {
            "description": "The payment failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentError"
                }
              }
            }
          },
          "404": {
            "description": "Checkout session not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "403": {
            "description": "The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutForbiddenError"
                }
              }
            }
          },
          "409": {
            "description": "The checkout session is being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutLocked"
                }
              }
            }
          },
          "410": {
            "description": "The checkout session is expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpiredCheckoutError"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Anonymous",
          "User"
        ],
        "x-speakeasy-group": "checkouts",
        "x-speakeasy-name-override": "client_confirm",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkouts.client_confirm(\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkouts.clientConfirm(\n  \"string\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/files/": {
      "get": {
        "tags": [
          "files",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Files",
        "description": "List files.\n\n**Scopes**: `files:read` `files:write`",
        "operationId": "files:list",
        "security": [
          {
            "oidc": [
              "files:read",
              "files:write"
            ]
          },
          {
            "pat": [
              "files:read",
              "files:write"
            ]
          },
          {
            "oat": [
              "files:read",
              "files:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "FileID Filter",
              "description": "Filter by file ID."
            },
            "description": "Filter by file ID."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_FileRead_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "files",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/FileRead"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.files.iter_list(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.files.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "files",
          "public"
        ],
        "summary": "Create File",
        "description": "Create a file.\n\n**Scopes**: `files:write`",
        "operationId": "files:create",
        "security": [
          {
            "oidc": [
              "files:write"
            ]
          },
          {
            "pat": [
              "files:write"
            ]
          },
          {
            "oat": [
              "files:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "File created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUpload"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "files",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.files.create(\n    name='string',\n    mime_type='string',\n    size=1,\n    upload={'parts': [{'number': 1, 'chunk_start': 1, 'chunk_end': 1}]},\n    service='downloadable',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.files.create(\n  {\n    \"name\": \"string\",\n    \"mime_type\": \"string\",\n    \"size\": 1,\n    \"upload\": {\n      \"parts\": [\n        {\n          \"number\": 1,\n          \"chunk_start\": 1,\n          \"chunk_end\": 1\n        }\n      ]\n    },\n    \"service\": \"downloadable\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/files/{id}/uploaded": {
      "post": {
        "tags": [
          "files",
          "public"
        ],
        "summary": "Complete File Upload",
        "description": "Complete a file upload.\n\n**Scopes**: `files:write`",
        "operationId": "files:uploaded",
        "security": [
          {
            "oidc": [
              "files:write"
            ]
          },
          {
            "pat": [
              "files:write"
            ]
          },
          {
            "oat": [
              "files:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The file ID.",
              "title": "Id"
            },
            "description": "The file ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileUploadCompleted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File upload completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileRead"
                }
              }
            }
          },
          "403": {
            "description": "You don't have the permission to update this file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "File not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "files",
        "x-speakeasy-name-override": "uploaded",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.files.uploaded(\n    '00000000-0000-4000-8000-000000000000',\n    id='string',\n    path='string',\n    parts=[{'number': 1,\n      'checksum_etag': 'string',\n      'checksum_sha256_base64': 'string'}],\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.files.uploaded(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"id\": \"string\",\n    \"path\": \"string\",\n    \"parts\": [\n      {\n        \"number\": 1,\n        \"checksum_etag\": \"string\",\n        \"checksum_sha256_base64\": \"string\"\n      }\n    ]\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/files/{id}": {
      "patch": {
        "tags": [
          "files",
          "public"
        ],
        "summary": "Update File",
        "description": "Update a file.\n\n**Scopes**: `files:write`",
        "operationId": "files:update",
        "security": [
          {
            "oidc": [
              "files:write"
            ]
          },
          {
            "pat": [
              "files:write"
            ]
          },
          {
            "oat": [
              "files:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The file ID.",
              "title": "Id"
            },
            "description": "The file ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FilePatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileRead"
                }
              }
            }
          },
          "403": {
            "description": "You don't have the permission to update this file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "File not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "files",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.files.update(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.files.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "files",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete File",
        "description": "Delete a file.\n\n**Scopes**: `files:write`",
        "operationId": "files:delete",
        "security": [
          {
            "oidc": [
              "files:write"
            ]
          },
          {
            "pat": [
              "files:write"
            ]
          },
          {
            "oat": [
              "files:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "File deleted."
          },
          "403": {
            "description": "You don't have the permission to delete this file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "File not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "files",
        "x-speakeasy-name-override": "delete",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.files.delete(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.files.delete(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/metrics/": {
      "get": {
        "tags": [
          "metrics",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Metrics",
        "description": "Get metrics about your orders and subscriptions.\n\nCurrency values are output in cents.\n\n**Scopes**: `metrics:read`",
        "operationId": "metrics:get",
        "security": [
          {
            "oidc": [
              "metrics:read"
            ]
          },
          {
            "pat": [
              "metrics:read"
            ]
          },
          {
            "oat": [
              "metrics:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Start date.",
              "title": "Start Date"
            },
            "description": "Start date."
          },
          {
            "name": "end_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "End date.",
              "title": "End Date"
            },
            "description": "End date."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Timezone to use for the timestamps. Default is UTC.",
              "enum": [
                "Africa/Abidjan",
                "Africa/Accra",
                "Africa/Addis_Ababa",
                "Africa/Algiers",
                "Africa/Asmara",
                "Africa/Asmera",
                "Africa/Bamako",
                "Africa/Bangui",
                "Africa/Banjul",
                "Africa/Bissau",
                "Africa/Blantyre",
                "Africa/Brazzaville",
                "Africa/Bujumbura",
                "Africa/Cairo",
                "Africa/Casablanca",
                "Africa/Ceuta",
                "Africa/Conakry",
                "Africa/Dakar",
                "Africa/Dar_es_Salaam",
                "Africa/Djibouti",
                "Africa/Douala",
                "Africa/El_Aaiun",
                "Africa/Freetown",
                "Africa/Gaborone",
                "Africa/Harare",
                "Africa/Johannesburg",
                "Africa/Juba",
                "Africa/Kampala",
                "Africa/Khartoum",
                "Africa/Kigali",
                "Africa/Kinshasa",
                "Africa/Lagos",
                "Africa/Libreville",
                "Africa/Lome",
                "Africa/Luanda",
                "Africa/Lubumbashi",
                "Africa/Lusaka",
                "Africa/Malabo",
                "Africa/Maputo",
                "Africa/Maseru",
                "Africa/Mbabane",
                "Africa/Mogadishu",
                "Africa/Monrovia",
                "Africa/Nairobi",
                "Africa/Ndjamena",
                "Africa/Niamey",
                "Africa/Nouakchott",
                "Africa/Ouagadougou",
                "Africa/Porto-Novo",
                "Africa/Sao_Tome",
                "Africa/Timbuktu",
                "Africa/Tripoli",
                "Africa/Tunis",
                "Africa/Windhoek",
                "America/Adak",
                "America/Anchorage",
                "America/Anguilla",
                "America/Antigua",
                "America/Araguaina",
                "America/Argentina/Buenos_Aires",
                "America/Argentina/Catamarca",
                "America/Argentina/ComodRivadavia",
                "America/Argentina/Cordoba",
                "America/Argentina/Jujuy",
                "America/Argentina/La_Rioja",
                "America/Argentina/Mendoza",
                "America/Argentina/Rio_Gallegos",
                "America/Argentina/Salta",
                "America/Argentina/San_Juan",
                "America/Argentina/San_Luis",
                "America/Argentina/Tucuman",
                "America/Argentina/Ushuaia",
                "America/Aruba",
                "America/Asuncion",
                "America/Atikokan",
                "America/Atka",
                "America/Bahia",
                "America/Bahia_Banderas",
                "America/Barbados",
                "America/Belem",
                "America/Belize",
                "America/Blanc-Sablon",
                "America/Boa_Vista",
                "America/Bogota",
                "America/Boise",
                "America/Buenos_Aires",
                "America/Cambridge_Bay",
                "America/Campo_Grande",
                "America/Cancun",
                "America/Caracas",
                "America/Catamarca",
                "America/Cayenne",
                "America/Cayman",
                "America/Chicago",
                "America/Chihuahua",
                "America/Ciudad_Juarez",
                "America/Coral_Harbour",
                "America/Cordoba",
                "America/Costa_Rica",
                "America/Coyhaique",
                "America/Creston",
                "America/Cuiaba",
                "America/Curacao",
                "America/Danmarkshavn",
                "America/Dawson",
                "America/Dawson_Creek",
                "America/Denver",
                "America/Detroit",
                "America/Dominica",
                "America/Edmonton",
                "America/Eirunepe",
                "America/El_Salvador",
                "America/Ensenada",
                "America/Fort_Nelson",
                "America/Fort_Wayne",
                "America/Fortaleza",
                "America/Glace_Bay",
                "America/Godthab",
                "America/Goose_Bay",
                "America/Grand_Turk",
                "America/Grenada",
                "America/Guadeloupe",
                "America/Guatemala",
                "America/Guayaquil",
                "America/Guyana",
                "America/Halifax",
                "America/Havana",
                "America/Hermosillo",
                "America/Indiana/Indianapolis",
                "America/Indiana/Knox",
                "America/Indiana/Marengo",
                "America/Indiana/Petersburg",
                "America/Indiana/Tell_City",
                "America/Indiana/Vevay",
                "America/Indiana/Vincennes",
                "America/Indiana/Winamac",
                "America/Indianapolis",
                "America/Inuvik",
                "America/Iqaluit",
                "America/Jamaica",
                "America/Jujuy",
                "America/Juneau",
                "America/Kentucky/Louisville",
                "America/Kentucky/Monticello",
                "America/Knox_IN",
                "America/Kralendijk",
                "America/La_Paz",
                "America/Lima",
                "America/Los_Angeles",
                "America/Louisville",
                "America/Lower_Princes",
                "America/Maceio",
                "America/Managua",
                "America/Manaus",
                "America/Marigot",
                "America/Martinique",
                "America/Matamoros",
                "America/Mazatlan",
                "America/Mendoza",
                "America/Menominee",
                "America/Merida",
                "America/Metlakatla",
                "America/Mexico_City",
                "America/Miquelon",
                "America/Moncton",
                "America/Monterrey",
                "America/Montevideo",
                "America/Montreal",
                "America/Montserrat",
                "America/Nassau",
                "America/New_York",
                "America/Nipigon",
                "America/Nome",
                "America/Noronha",
                "America/North_Dakota/Beulah",
                "America/North_Dakota/Center",
                "America/North_Dakota/New_Salem",
                "America/Nuuk",
                "America/Ojinaga",
                "America/Panama",
                "America/Pangnirtung",
                "America/Paramaribo",
                "America/Phoenix",
                "America/Port-au-Prince",
                "America/Port_of_Spain",
                "America/Porto_Acre",
                "America/Porto_Velho",
                "America/Puerto_Rico",
                "America/Punta_Arenas",
                "America/Rainy_River",
                "America/Rankin_Inlet",
                "America/Recife",
                "America/Regina",
                "America/Resolute",
                "America/Rio_Branco",
                "America/Rosario",
                "America/Santa_Isabel",
                "America/Santarem",
                "America/Santiago",
                "America/Santo_Domingo",
                "America/Sao_Paulo",
                "America/Scoresbysund",
                "America/Shiprock",
                "America/Sitka",
                "America/St_Barthelemy",
                "America/St_Johns",
                "America/St_Kitts",
                "America/St_Lucia",
                "America/St_Thomas",
                "America/St_Vincent",
                "America/Swift_Current",
                "America/Tegucigalpa",
                "America/Thule",
                "America/Thunder_Bay",
                "America/Tijuana",
                "America/Toronto",
                "America/Tortola",
                "America/Vancouver",
                "America/Virgin",
                "America/Whitehorse",
                "America/Winnipeg",
                "America/Yakutat",
                "America/Yellowknife",
                "Antarctica/Casey",
                "Antarctica/Davis",
                "Antarctica/DumontDUrville",
                "Antarctica/Macquarie",
                "Antarctica/Mawson",
                "Antarctica/McMurdo",
                "Antarctica/Palmer",
                "Antarctica/Rothera",
                "Antarctica/South_Pole",
                "Antarctica/Syowa",
                "Antarctica/Troll",
                "Antarctica/Vostok",
                "Arctic/Longyearbyen",
                "Asia/Aden",
                "Asia/Almaty",
                "Asia/Amman",
                "Asia/Anadyr",
                "Asia/Aqtau",
                "Asia/Aqtobe",
                "Asia/Ashgabat",
                "Asia/Ashkhabad",
                "Asia/Atyrau",
                "Asia/Baghdad",
                "Asia/Bahrain",
                "Asia/Baku",
                "Asia/Bangkok",
                "Asia/Barnaul",
                "Asia/Beirut",
                "Asia/Bishkek",
                "Asia/Brunei",
                "Asia/Calcutta",
                "Asia/Chita",
                "Asia/Choibalsan",
                "Asia/Chongqing",
                "Asia/Chungking",
                "Asia/Colombo",
                "Asia/Dacca",
                "Asia/Damascus",
                "Asia/Dhaka",
                "Asia/Dili",
                "Asia/Dubai",
                "Asia/Dushanbe",
                "Asia/Famagusta",
                "Asia/Gaza",
                "Asia/Harbin",
                "Asia/Hebron",
                "Asia/Ho_Chi_Minh",
                "Asia/Hong_Kong",
                "Asia/Hovd",
                "Asia/Irkutsk",
                "Asia/Istanbul",
                "Asia/Jakarta",
                "Asia/Jayapura",
                "Asia/Jerusalem",
                "Asia/Kabul",
                "Asia/Kamchatka",
                "Asia/Karachi",
                "Asia/Kashgar",
                "Asia/Kathmandu",
                "Asia/Katmandu",
                "Asia/Khandyga",
                "Asia/Kolkata",
                "Asia/Krasnoyarsk",
                "Asia/Kuala_Lumpur",
                "Asia/Kuching",
                "Asia/Kuwait",
                "Asia/Macao",
                "Asia/Macau",
                "Asia/Magadan",
                "Asia/Makassar",
                "Asia/Manila",
                "Asia/Muscat",
                "Asia/Nicosia",
                "Asia/Novokuznetsk",
                "Asia/Novosibirsk",
                "Asia/Omsk",
                "Asia/Oral",
                "Asia/Phnom_Penh",
                "Asia/Pontianak",
                "Asia/Pyongyang",
                "Asia/Qatar",
                "Asia/Qostanay",
                "Asia/Qyzylorda",
                "Asia/Rangoon",
                "Asia/Riyadh",
                "Asia/Saigon",
                "Asia/Sakhalin",
                "Asia/Samarkand",
                "Asia/Seoul",
                "Asia/Shanghai",
                "Asia/Singapore",
                "Asia/Srednekolymsk",
                "Asia/Taipei",
                "Asia/Tashkent",
                "Asia/Tbilisi",
                "Asia/Tehran",
                "Asia/Tel_Aviv",
                "Asia/Thimbu",
                "Asia/Thimphu",
                "Asia/Tokyo",
                "Asia/Tomsk",
                "Asia/Ujung_Pandang",
                "Asia/Ulaanbaatar",
                "Asia/Ulan_Bator",
                "Asia/Urumqi",
                "Asia/Ust-Nera",
                "Asia/Vientiane",
                "Asia/Vladivostok",
                "Asia/Yakutsk",
                "Asia/Yangon",
                "Asia/Yekaterinburg",
                "Asia/Yerevan",
                "Atlantic/Azores",
                "Atlantic/Bermuda",
                "Atlantic/Canary",
                "Atlantic/Cape_Verde",
                "Atlantic/Faeroe",
                "Atlantic/Faroe",
                "Atlantic/Jan_Mayen",
                "Atlantic/Madeira",
                "Atlantic/Reykjavik",
                "Atlantic/South_Georgia",
                "Atlantic/St_Helena",
                "Atlantic/Stanley",
                "Australia/ACT",
                "Australia/Adelaide",
                "Australia/Brisbane",
                "Australia/Broken_Hill",
                "Australia/Canberra",
                "Australia/Currie",
                "Australia/Darwin",
                "Australia/Eucla",
                "Australia/Hobart",
                "Australia/LHI",
                "Australia/Lindeman",
                "Australia/Lord_Howe",
                "Australia/Melbourne",
                "Australia/NSW",
                "Australia/North",
                "Australia/Perth",
                "Australia/Queensland",
                "Australia/South",
                "Australia/Sydney",
                "Australia/Tasmania",
                "Australia/Victoria",
                "Australia/West",
                "Australia/Yancowinna",
                "Brazil/Acre",
                "Brazil/DeNoronha",
                "Brazil/East",
                "Brazil/West",
                "CET",
                "CST6CDT",
                "Canada/Atlantic",
                "Canada/Central",
                "Canada/Eastern",
                "Canada/Mountain",
                "Canada/Newfoundland",
                "Canada/Pacific",
                "Canada/Saskatchewan",
                "Canada/Yukon",
                "Chile/Continental",
                "Chile/EasterIsland",
                "Cuba",
                "EET",
                "EST",
                "EST5EDT",
                "Egypt",
                "Eire",
                "Etc/GMT",
                "Etc/GMT+0",
                "Etc/GMT+1",
                "Etc/GMT+10",
                "Etc/GMT+11",
                "Etc/GMT+12",
                "Etc/GMT+2",
                "Etc/GMT+3",
                "Etc/GMT+4",
                "Etc/GMT+5",
                "Etc/GMT+6",
                "Etc/GMT+7",
                "Etc/GMT+8",
                "Etc/GMT+9",
                "Etc/GMT-0",
                "Etc/GMT-1",
                "Etc/GMT-10",
                "Etc/GMT-11",
                "Etc/GMT-12",
                "Etc/GMT-13",
                "Etc/GMT-14",
                "Etc/GMT-2",
                "Etc/GMT-3",
                "Etc/GMT-4",
                "Etc/GMT-5",
                "Etc/GMT-6",
                "Etc/GMT-7",
                "Etc/GMT-8",
                "Etc/GMT-9",
                "Etc/GMT0",
                "Etc/Greenwich",
                "Etc/UCT",
                "Etc/UTC",
                "Etc/Universal",
                "Etc/Zulu",
                "Europe/Amsterdam",
                "Europe/Andorra",
                "Europe/Astrakhan",
                "Europe/Athens",
                "Europe/Belfast",
                "Europe/Belgrade",
                "Europe/Berlin",
                "Europe/Bratislava",
                "Europe/Brussels",
                "Europe/Bucharest",
                "Europe/Budapest",
                "Europe/Busingen",
                "Europe/Chisinau",
                "Europe/Copenhagen",
                "Europe/Dublin",
                "Europe/Gibraltar",
                "Europe/Guernsey",
                "Europe/Helsinki",
                "Europe/Isle_of_Man",
                "Europe/Istanbul",
                "Europe/Jersey",
                "Europe/Kaliningrad",
                "Europe/Kiev",
                "Europe/Kirov",
                "Europe/Kyiv",
                "Europe/Lisbon",
                "Europe/Ljubljana",
                "Europe/London",
                "Europe/Luxembourg",
                "Europe/Madrid",
                "Europe/Malta",
                "Europe/Mariehamn",
                "Europe/Minsk",
                "Europe/Monaco",
                "Europe/Moscow",
                "Europe/Nicosia",
                "Europe/Oslo",
                "Europe/Paris",
                "Europe/Podgorica",
                "Europe/Prague",
                "Europe/Riga",
                "Europe/Rome",
                "Europe/Samara",
                "Europe/San_Marino",
                "Europe/Sarajevo",
                "Europe/Saratov",
                "Europe/Simferopol",
                "Europe/Skopje",
                "Europe/Sofia",
                "Europe/Stockholm",
                "Europe/Tallinn",
                "Europe/Tirane",
                "Europe/Tiraspol",
                "Europe/Ulyanovsk",
                "Europe/Uzhgorod",
                "Europe/Vaduz",
                "Europe/Vatican",
                "Europe/Vienna",
                "Europe/Vilnius",
                "Europe/Volgograd",
                "Europe/Warsaw",
                "Europe/Zagreb",
                "Europe/Zaporozhye",
                "Europe/Zurich",
                "Factory",
                "GB",
                "GB-Eire",
                "GMT",
                "GMT+0",
                "GMT-0",
                "GMT0",
                "Greenwich",
                "HST",
                "Hongkong",
                "Iceland",
                "Indian/Antananarivo",
                "Indian/Chagos",
                "Indian/Christmas",
                "Indian/Cocos",
                "Indian/Comoro",
                "Indian/Kerguelen",
                "Indian/Mahe",
                "Indian/Maldives",
                "Indian/Mauritius",
                "Indian/Mayotte",
                "Indian/Reunion",
                "Iran",
                "Israel",
                "Jamaica",
                "Japan",
                "Kwajalein",
                "Libya",
                "MET",
                "MST",
                "MST7MDT",
                "Mexico/BajaNorte",
                "Mexico/BajaSur",
                "Mexico/General",
                "NZ",
                "NZ-CHAT",
                "Navajo",
                "PRC",
                "PST8PDT",
                "Pacific/Apia",
                "Pacific/Auckland",
                "Pacific/Bougainville",
                "Pacific/Chatham",
                "Pacific/Chuuk",
                "Pacific/Easter",
                "Pacific/Efate",
                "Pacific/Enderbury",
                "Pacific/Fakaofo",
                "Pacific/Fiji",
                "Pacific/Funafuti",
                "Pacific/Galapagos",
                "Pacific/Gambier",
                "Pacific/Guadalcanal",
                "Pacific/Guam",
                "Pacific/Honolulu",
                "Pacific/Johnston",
                "Pacific/Kanton",
                "Pacific/Kiritimati",
                "Pacific/Kosrae",
                "Pacific/Kwajalein",
                "Pacific/Majuro",
                "Pacific/Marquesas",
                "Pacific/Midway",
                "Pacific/Nauru",
                "Pacific/Niue",
                "Pacific/Norfolk",
                "Pacific/Noumea",
                "Pacific/Pago_Pago",
                "Pacific/Palau",
                "Pacific/Pitcairn",
                "Pacific/Pohnpei",
                "Pacific/Ponape",
                "Pacific/Port_Moresby",
                "Pacific/Rarotonga",
                "Pacific/Saipan",
                "Pacific/Samoa",
                "Pacific/Tahiti",
                "Pacific/Tarawa",
                "Pacific/Tongatapu",
                "Pacific/Truk",
                "Pacific/Wake",
                "Pacific/Wallis",
                "Pacific/Yap",
                "Poland",
                "Portugal",
                "ROC",
                "ROK",
                "Singapore",
                "Turkey",
                "UCT",
                "US/Alaska",
                "US/Aleutian",
                "US/Arizona",
                "US/Central",
                "US/East-Indiana",
                "US/Eastern",
                "US/Hawaii",
                "US/Indiana-Starke",
                "US/Michigan",
                "US/Mountain",
                "US/Pacific",
                "US/Samoa",
                "UTC",
                "Universal",
                "W-SU",
                "WET",
                "Zulu"
              ],
              "default": "UTC",
              "title": "Timezone"
            },
            "description": "Timezone to use for the timestamps. Default is UTC."
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TimeInterval",
              "description": "Interval between two timestamps."
            },
            "description": "Interval between two timestamps."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "billing_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ProductBillingType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductBillingType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductBillingType Filter",
              "description": "Filter by billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."
            },
            "description": "Filter by billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Metrics",
              "description": "List of metric slugs to focus on. When provided, only the queries needed for these metrics will be executed, improving performance. If not provided, all metrics are returned."
            },
            "description": "List of metric slugs to focus on. When provided, only the queries needed for these metrics will be executed, improving performance. If not provided, all metrics are returned."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "metrics",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.get(\n    start_date='2026-01-01',\n    end_date='2026-01-01',\n    timezone='UTC',\n    interval='year',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.metrics.get(\n  {\n    \"start_date\": \"2026-01-01\",\n    \"end_date\": \"2026-01-01\",\n    \"timezone\": \"UTC\",\n    \"interval\": \"year\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/metrics/export": {
      "get": {
        "tags": [
          "metrics",
          "public"
        ],
        "summary": "Export Metrics",
        "description": "Export metrics as a CSV file.\n\n**Scopes**: `metrics:read`",
        "operationId": "metrics:export",
        "security": [
          {
            "oidc": [
              "metrics:read"
            ]
          },
          {
            "pat": [
              "metrics:read"
            ]
          },
          {
            "oat": [
              "metrics:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Start date.",
              "title": "Start Date"
            },
            "description": "Start date."
          },
          {
            "name": "end_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "End date.",
              "title": "End Date"
            },
            "description": "End date."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Timezone to use for the timestamps. Default is UTC.",
              "enum": [
                "Africa/Abidjan",
                "Africa/Accra",
                "Africa/Addis_Ababa",
                "Africa/Algiers",
                "Africa/Asmara",
                "Africa/Asmera",
                "Africa/Bamako",
                "Africa/Bangui",
                "Africa/Banjul",
                "Africa/Bissau",
                "Africa/Blantyre",
                "Africa/Brazzaville",
                "Africa/Bujumbura",
                "Africa/Cairo",
                "Africa/Casablanca",
                "Africa/Ceuta",
                "Africa/Conakry",
                "Africa/Dakar",
                "Africa/Dar_es_Salaam",
                "Africa/Djibouti",
                "Africa/Douala",
                "Africa/El_Aaiun",
                "Africa/Freetown",
                "Africa/Gaborone",
                "Africa/Harare",
                "Africa/Johannesburg",
                "Africa/Juba",
                "Africa/Kampala",
                "Africa/Khartoum",
                "Africa/Kigali",
                "Africa/Kinshasa",
                "Africa/Lagos",
                "Africa/Libreville",
                "Africa/Lome",
                "Africa/Luanda",
                "Africa/Lubumbashi",
                "Africa/Lusaka",
                "Africa/Malabo",
                "Africa/Maputo",
                "Africa/Maseru",
                "Africa/Mbabane",
                "Africa/Mogadishu",
                "Africa/Monrovia",
                "Africa/Nairobi",
                "Africa/Ndjamena",
                "Africa/Niamey",
                "Africa/Nouakchott",
                "Africa/Ouagadougou",
                "Africa/Porto-Novo",
                "Africa/Sao_Tome",
                "Africa/Timbuktu",
                "Africa/Tripoli",
                "Africa/Tunis",
                "Africa/Windhoek",
                "America/Adak",
                "America/Anchorage",
                "America/Anguilla",
                "America/Antigua",
                "America/Araguaina",
                "America/Argentina/Buenos_Aires",
                "America/Argentina/Catamarca",
                "America/Argentina/ComodRivadavia",
                "America/Argentina/Cordoba",
                "America/Argentina/Jujuy",
                "America/Argentina/La_Rioja",
                "America/Argentina/Mendoza",
                "America/Argentina/Rio_Gallegos",
                "America/Argentina/Salta",
                "America/Argentina/San_Juan",
                "America/Argentina/San_Luis",
                "America/Argentina/Tucuman",
                "America/Argentina/Ushuaia",
                "America/Aruba",
                "America/Asuncion",
                "America/Atikokan",
                "America/Atka",
                "America/Bahia",
                "America/Bahia_Banderas",
                "America/Barbados",
                "America/Belem",
                "America/Belize",
                "America/Blanc-Sablon",
                "America/Boa_Vista",
                "America/Bogota",
                "America/Boise",
                "America/Buenos_Aires",
                "America/Cambridge_Bay",
                "America/Campo_Grande",
                "America/Cancun",
                "America/Caracas",
                "America/Catamarca",
                "America/Cayenne",
                "America/Cayman",
                "America/Chicago",
                "America/Chihuahua",
                "America/Ciudad_Juarez",
                "America/Coral_Harbour",
                "America/Cordoba",
                "America/Costa_Rica",
                "America/Coyhaique",
                "America/Creston",
                "America/Cuiaba",
                "America/Curacao",
                "America/Danmarkshavn",
                "America/Dawson",
                "America/Dawson_Creek",
                "America/Denver",
                "America/Detroit",
                "America/Dominica",
                "America/Edmonton",
                "America/Eirunepe",
                "America/El_Salvador",
                "America/Ensenada",
                "America/Fort_Nelson",
                "America/Fort_Wayne",
                "America/Fortaleza",
                "America/Glace_Bay",
                "America/Godthab",
                "America/Goose_Bay",
                "America/Grand_Turk",
                "America/Grenada",
                "America/Guadeloupe",
                "America/Guatemala",
                "America/Guayaquil",
                "America/Guyana",
                "America/Halifax",
                "America/Havana",
                "America/Hermosillo",
                "America/Indiana/Indianapolis",
                "America/Indiana/Knox",
                "America/Indiana/Marengo",
                "America/Indiana/Petersburg",
                "America/Indiana/Tell_City",
                "America/Indiana/Vevay",
                "America/Indiana/Vincennes",
                "America/Indiana/Winamac",
                "America/Indianapolis",
                "America/Inuvik",
                "America/Iqaluit",
                "America/Jamaica",
                "America/Jujuy",
                "America/Juneau",
                "America/Kentucky/Louisville",
                "America/Kentucky/Monticello",
                "America/Knox_IN",
                "America/Kralendijk",
                "America/La_Paz",
                "America/Lima",
                "America/Los_Angeles",
                "America/Louisville",
                "America/Lower_Princes",
                "America/Maceio",
                "America/Managua",
                "America/Manaus",
                "America/Marigot",
                "America/Martinique",
                "America/Matamoros",
                "America/Mazatlan",
                "America/Mendoza",
                "America/Menominee",
                "America/Merida",
                "America/Metlakatla",
                "America/Mexico_City",
                "America/Miquelon",
                "America/Moncton",
                "America/Monterrey",
                "America/Montevideo",
                "America/Montreal",
                "America/Montserrat",
                "America/Nassau",
                "America/New_York",
                "America/Nipigon",
                "America/Nome",
                "America/Noronha",
                "America/North_Dakota/Beulah",
                "America/North_Dakota/Center",
                "America/North_Dakota/New_Salem",
                "America/Nuuk",
                "America/Ojinaga",
                "America/Panama",
                "America/Pangnirtung",
                "America/Paramaribo",
                "America/Phoenix",
                "America/Port-au-Prince",
                "America/Port_of_Spain",
                "America/Porto_Acre",
                "America/Porto_Velho",
                "America/Puerto_Rico",
                "America/Punta_Arenas",
                "America/Rainy_River",
                "America/Rankin_Inlet",
                "America/Recife",
                "America/Regina",
                "America/Resolute",
                "America/Rio_Branco",
                "America/Rosario",
                "America/Santa_Isabel",
                "America/Santarem",
                "America/Santiago",
                "America/Santo_Domingo",
                "America/Sao_Paulo",
                "America/Scoresbysund",
                "America/Shiprock",
                "America/Sitka",
                "America/St_Barthelemy",
                "America/St_Johns",
                "America/St_Kitts",
                "America/St_Lucia",
                "America/St_Thomas",
                "America/St_Vincent",
                "America/Swift_Current",
                "America/Tegucigalpa",
                "America/Thule",
                "America/Thunder_Bay",
                "America/Tijuana",
                "America/Toronto",
                "America/Tortola",
                "America/Vancouver",
                "America/Virgin",
                "America/Whitehorse",
                "America/Winnipeg",
                "America/Yakutat",
                "America/Yellowknife",
                "Antarctica/Casey",
                "Antarctica/Davis",
                "Antarctica/DumontDUrville",
                "Antarctica/Macquarie",
                "Antarctica/Mawson",
                "Antarctica/McMurdo",
                "Antarctica/Palmer",
                "Antarctica/Rothera",
                "Antarctica/South_Pole",
                "Antarctica/Syowa",
                "Antarctica/Troll",
                "Antarctica/Vostok",
                "Arctic/Longyearbyen",
                "Asia/Aden",
                "Asia/Almaty",
                "Asia/Amman",
                "Asia/Anadyr",
                "Asia/Aqtau",
                "Asia/Aqtobe",
                "Asia/Ashgabat",
                "Asia/Ashkhabad",
                "Asia/Atyrau",
                "Asia/Baghdad",
                "Asia/Bahrain",
                "Asia/Baku",
                "Asia/Bangkok",
                "Asia/Barnaul",
                "Asia/Beirut",
                "Asia/Bishkek",
                "Asia/Brunei",
                "Asia/Calcutta",
                "Asia/Chita",
                "Asia/Choibalsan",
                "Asia/Chongqing",
                "Asia/Chungking",
                "Asia/Colombo",
                "Asia/Dacca",
                "Asia/Damascus",
                "Asia/Dhaka",
                "Asia/Dili",
                "Asia/Dubai",
                "Asia/Dushanbe",
                "Asia/Famagusta",
                "Asia/Gaza",
                "Asia/Harbin",
                "Asia/Hebron",
                "Asia/Ho_Chi_Minh",
                "Asia/Hong_Kong",
                "Asia/Hovd",
                "Asia/Irkutsk",
                "Asia/Istanbul",
                "Asia/Jakarta",
                "Asia/Jayapura",
                "Asia/Jerusalem",
                "Asia/Kabul",
                "Asia/Kamchatka",
                "Asia/Karachi",
                "Asia/Kashgar",
                "Asia/Kathmandu",
                "Asia/Katmandu",
                "Asia/Khandyga",
                "Asia/Kolkata",
                "Asia/Krasnoyarsk",
                "Asia/Kuala_Lumpur",
                "Asia/Kuching",
                "Asia/Kuwait",
                "Asia/Macao",
                "Asia/Macau",
                "Asia/Magadan",
                "Asia/Makassar",
                "Asia/Manila",
                "Asia/Muscat",
                "Asia/Nicosia",
                "Asia/Novokuznetsk",
                "Asia/Novosibirsk",
                "Asia/Omsk",
                "Asia/Oral",
                "Asia/Phnom_Penh",
                "Asia/Pontianak",
                "Asia/Pyongyang",
                "Asia/Qatar",
                "Asia/Qostanay",
                "Asia/Qyzylorda",
                "Asia/Rangoon",
                "Asia/Riyadh",
                "Asia/Saigon",
                "Asia/Sakhalin",
                "Asia/Samarkand",
                "Asia/Seoul",
                "Asia/Shanghai",
                "Asia/Singapore",
                "Asia/Srednekolymsk",
                "Asia/Taipei",
                "Asia/Tashkent",
                "Asia/Tbilisi",
                "Asia/Tehran",
                "Asia/Tel_Aviv",
                "Asia/Thimbu",
                "Asia/Thimphu",
                "Asia/Tokyo",
                "Asia/Tomsk",
                "Asia/Ujung_Pandang",
                "Asia/Ulaanbaatar",
                "Asia/Ulan_Bator",
                "Asia/Urumqi",
                "Asia/Ust-Nera",
                "Asia/Vientiane",
                "Asia/Vladivostok",
                "Asia/Yakutsk",
                "Asia/Yangon",
                "Asia/Yekaterinburg",
                "Asia/Yerevan",
                "Atlantic/Azores",
                "Atlantic/Bermuda",
                "Atlantic/Canary",
                "Atlantic/Cape_Verde",
                "Atlantic/Faeroe",
                "Atlantic/Faroe",
                "Atlantic/Jan_Mayen",
                "Atlantic/Madeira",
                "Atlantic/Reykjavik",
                "Atlantic/South_Georgia",
                "Atlantic/St_Helena",
                "Atlantic/Stanley",
                "Australia/ACT",
                "Australia/Adelaide",
                "Australia/Brisbane",
                "Australia/Broken_Hill",
                "Australia/Canberra",
                "Australia/Currie",
                "Australia/Darwin",
                "Australia/Eucla",
                "Australia/Hobart",
                "Australia/LHI",
                "Australia/Lindeman",
                "Australia/Lord_Howe",
                "Australia/Melbourne",
                "Australia/NSW",
                "Australia/North",
                "Australia/Perth",
                "Australia/Queensland",
                "Australia/South",
                "Australia/Sydney",
                "Australia/Tasmania",
                "Australia/Victoria",
                "Australia/West",
                "Australia/Yancowinna",
                "Brazil/Acre",
                "Brazil/DeNoronha",
                "Brazil/East",
                "Brazil/West",
                "CET",
                "CST6CDT",
                "Canada/Atlantic",
                "Canada/Central",
                "Canada/Eastern",
                "Canada/Mountain",
                "Canada/Newfoundland",
                "Canada/Pacific",
                "Canada/Saskatchewan",
                "Canada/Yukon",
                "Chile/Continental",
                "Chile/EasterIsland",
                "Cuba",
                "EET",
                "EST",
                "EST5EDT",
                "Egypt",
                "Eire",
                "Etc/GMT",
                "Etc/GMT+0",
                "Etc/GMT+1",
                "Etc/GMT+10",
                "Etc/GMT+11",
                "Etc/GMT+12",
                "Etc/GMT+2",
                "Etc/GMT+3",
                "Etc/GMT+4",
                "Etc/GMT+5",
                "Etc/GMT+6",
                "Etc/GMT+7",
                "Etc/GMT+8",
                "Etc/GMT+9",
                "Etc/GMT-0",
                "Etc/GMT-1",
                "Etc/GMT-10",
                "Etc/GMT-11",
                "Etc/GMT-12",
                "Etc/GMT-13",
                "Etc/GMT-14",
                "Etc/GMT-2",
                "Etc/GMT-3",
                "Etc/GMT-4",
                "Etc/GMT-5",
                "Etc/GMT-6",
                "Etc/GMT-7",
                "Etc/GMT-8",
                "Etc/GMT-9",
                "Etc/GMT0",
                "Etc/Greenwich",
                "Etc/UCT",
                "Etc/UTC",
                "Etc/Universal",
                "Etc/Zulu",
                "Europe/Amsterdam",
                "Europe/Andorra",
                "Europe/Astrakhan",
                "Europe/Athens",
                "Europe/Belfast",
                "Europe/Belgrade",
                "Europe/Berlin",
                "Europe/Bratislava",
                "Europe/Brussels",
                "Europe/Bucharest",
                "Europe/Budapest",
                "Europe/Busingen",
                "Europe/Chisinau",
                "Europe/Copenhagen",
                "Europe/Dublin",
                "Europe/Gibraltar",
                "Europe/Guernsey",
                "Europe/Helsinki",
                "Europe/Isle_of_Man",
                "Europe/Istanbul",
                "Europe/Jersey",
                "Europe/Kaliningrad",
                "Europe/Kiev",
                "Europe/Kirov",
                "Europe/Kyiv",
                "Europe/Lisbon",
                "Europe/Ljubljana",
                "Europe/London",
                "Europe/Luxembourg",
                "Europe/Madrid",
                "Europe/Malta",
                "Europe/Mariehamn",
                "Europe/Minsk",
                "Europe/Monaco",
                "Europe/Moscow",
                "Europe/Nicosia",
                "Europe/Oslo",
                "Europe/Paris",
                "Europe/Podgorica",
                "Europe/Prague",
                "Europe/Riga",
                "Europe/Rome",
                "Europe/Samara",
                "Europe/San_Marino",
                "Europe/Sarajevo",
                "Europe/Saratov",
                "Europe/Simferopol",
                "Europe/Skopje",
                "Europe/Sofia",
                "Europe/Stockholm",
                "Europe/Tallinn",
                "Europe/Tirane",
                "Europe/Tiraspol",
                "Europe/Ulyanovsk",
                "Europe/Uzhgorod",
                "Europe/Vaduz",
                "Europe/Vatican",
                "Europe/Vienna",
                "Europe/Vilnius",
                "Europe/Volgograd",
                "Europe/Warsaw",
                "Europe/Zagreb",
                "Europe/Zaporozhye",
                "Europe/Zurich",
                "Factory",
                "GB",
                "GB-Eire",
                "GMT",
                "GMT+0",
                "GMT-0",
                "GMT0",
                "Greenwich",
                "HST",
                "Hongkong",
                "Iceland",
                "Indian/Antananarivo",
                "Indian/Chagos",
                "Indian/Christmas",
                "Indian/Cocos",
                "Indian/Comoro",
                "Indian/Kerguelen",
                "Indian/Mahe",
                "Indian/Maldives",
                "Indian/Mauritius",
                "Indian/Mayotte",
                "Indian/Reunion",
                "Iran",
                "Israel",
                "Jamaica",
                "Japan",
                "Kwajalein",
                "Libya",
                "MET",
                "MST",
                "MST7MDT",
                "Mexico/BajaNorte",
                "Mexico/BajaSur",
                "Mexico/General",
                "NZ",
                "NZ-CHAT",
                "Navajo",
                "PRC",
                "PST8PDT",
                "Pacific/Apia",
                "Pacific/Auckland",
                "Pacific/Bougainville",
                "Pacific/Chatham",
                "Pacific/Chuuk",
                "Pacific/Easter",
                "Pacific/Efate",
                "Pacific/Enderbury",
                "Pacific/Fakaofo",
                "Pacific/Fiji",
                "Pacific/Funafuti",
                "Pacific/Galapagos",
                "Pacific/Gambier",
                "Pacific/Guadalcanal",
                "Pacific/Guam",
                "Pacific/Honolulu",
                "Pacific/Johnston",
                "Pacific/Kanton",
                "Pacific/Kiritimati",
                "Pacific/Kosrae",
                "Pacific/Kwajalein",
                "Pacific/Majuro",
                "Pacific/Marquesas",
                "Pacific/Midway",
                "Pacific/Nauru",
                "Pacific/Niue",
                "Pacific/Norfolk",
                "Pacific/Noumea",
                "Pacific/Pago_Pago",
                "Pacific/Palau",
                "Pacific/Pitcairn",
                "Pacific/Pohnpei",
                "Pacific/Ponape",
                "Pacific/Port_Moresby",
                "Pacific/Rarotonga",
                "Pacific/Saipan",
                "Pacific/Samoa",
                "Pacific/Tahiti",
                "Pacific/Tarawa",
                "Pacific/Tongatapu",
                "Pacific/Truk",
                "Pacific/Wake",
                "Pacific/Wallis",
                "Pacific/Yap",
                "Poland",
                "Portugal",
                "ROC",
                "ROK",
                "Singapore",
                "Turkey",
                "UCT",
                "US/Alaska",
                "US/Aleutian",
                "US/Arizona",
                "US/Central",
                "US/East-Indiana",
                "US/Eastern",
                "US/Hawaii",
                "US/Indiana-Starke",
                "US/Michigan",
                "US/Mountain",
                "US/Pacific",
                "US/Samoa",
                "UTC",
                "Universal",
                "W-SU",
                "WET",
                "Zulu"
              ],
              "default": "UTC",
              "title": "Timezone"
            },
            "description": "Timezone to use for the timestamps. Default is UTC."
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TimeInterval",
              "description": "Interval between two timestamps."
            },
            "description": "Interval between two timestamps."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "billing_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ProductBillingType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductBillingType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductBillingType Filter",
              "description": "Filter by billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."
            },
            "description": "Filter by billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Metrics",
              "description": "List of metric slugs to include in the export. If not provided, all metrics are exported."
            },
            "description": "List of metric slugs to include in the export. If not provided, all metrics are exported."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "metrics",
        "x-speakeasy-name-override": "export",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.export(\n    start_date='2026-01-01',\n    end_date='2026-01-01',\n    timezone='UTC',\n    interval='year',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.metrics.export(\n  {\n    \"start_date\": \"2026-01-01\",\n    \"end_date\": \"2026-01-01\",\n    \"timezone\": \"UTC\",\n    \"interval\": \"year\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/metrics/limits": {
      "get": {
        "tags": [
          "metrics",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Metrics Limits",
        "description": "Get the interval limits for the metrics endpoint.\n\n**Scopes**: `metrics:read`",
        "operationId": "metrics:limits",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsLimits"
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": [
              "metrics:read"
            ]
          },
          {
            "pat": [
              "metrics:read"
            ]
          },
          {
            "oat": [
              "metrics:read"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "metrics",
        "x-speakeasy-name-override": "limits",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.limits()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.metrics.limits();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/metrics/dashboards": {
      "get": {
        "tags": [
          "metrics",
          "public"
        ],
        "summary": "List Metric Dashboards",
        "description": "List user-defined metric dashboards.\n\n**Scopes**: `metrics:read`",
        "operationId": "metrics:list_dashboards",
        "security": [
          {
            "oidc": [
              "metrics:read"
            ]
          },
          {
            "pat": [
              "metrics:read"
            ]
          },
          {
            "oat": [
              "metrics:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricDashboardSchema"
                  },
                  "title": "Response Metrics:List Dashboards"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "metrics",
        "x-speakeasy-name-override": "list_dashboards",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.list_dashboards()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.metrics.listDashboards();\nconsole.log(response);\n"
          }
        ]
      },
      "post": {
        "tags": [
          "metrics",
          "public"
        ],
        "summary": "Create Metric Dashboard",
        "description": "Create a user-defined metric dashboard.\n\n**Scopes**: `metrics:write`",
        "operationId": "metrics:create_dashboard",
        "security": [
          {
            "oidc": [
              "metrics:write"
            ]
          },
          {
            "pat": [
              "metrics:write"
            ]
          },
          {
            "oat": [
              "metrics:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDashboardCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDashboardSchema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "metrics",
        "x-speakeasy-name-override": "create_dashboard",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.create_dashboard(\n    name='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.metrics.createDashboard(\n  {\n    \"name\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/metrics/dashboards/{id}": {
      "get": {
        "tags": [
          "metrics",
          "public"
        ],
        "summary": "Get Metric Dashboard",
        "description": "Get a user-defined metric dashboard by ID.\n\n**Scopes**: `metrics:read`",
        "operationId": "metrics:get_dashboard",
        "security": [
          {
            "oidc": [
              "metrics:read"
            ]
          },
          {
            "pat": [
              "metrics:read"
            ]
          },
          {
            "oat": [
              "metrics:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The metric dashboard ID.",
              "title": "Id"
            },
            "description": "The metric dashboard ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDashboardSchema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "metrics",
        "x-speakeasy-name-override": "get_dashboard",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.get_dashboard(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.metrics.getDashboard(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "metrics",
          "public"
        ],
        "summary": "Update Metric Dashboard",
        "description": "Update a user-defined metric dashboard.\n\n**Scopes**: `metrics:write`",
        "operationId": "metrics:update_dashboard",
        "security": [
          {
            "oidc": [
              "metrics:write"
            ]
          },
          {
            "pat": [
              "metrics:write"
            ]
          },
          {
            "oat": [
              "metrics:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The metric dashboard ID.",
              "title": "Id"
            },
            "description": "The metric dashboard ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDashboardUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDashboardSchema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "metrics",
        "x-speakeasy-name-override": "update_dashboard",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.update_dashboard(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.metrics.updateDashboard(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "metrics",
          "public"
        ],
        "summary": "Delete Metric Dashboard",
        "description": "Delete a user-defined metric dashboard.\n\n**Scopes**: `metrics:write`",
        "operationId": "metrics:delete_dashboard",
        "security": [
          {
            "oidc": [
              "metrics:write"
            ]
          },
          {
            "pat": [
              "metrics:write"
            ]
          },
          {
            "oat": [
              "metrics:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The metric dashboard ID.",
              "title": "Id"
            },
            "description": "The metric dashboard ID."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "metrics",
        "x-speakeasy-name-override": "delete_dashboard",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.metrics.delete_dashboard(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.metrics.deleteDashboard(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/license-keys/": {
      "get": {
        "tags": [
          "license_keys",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List License Keys",
        "description": "Get license keys connected to the given organization & filters.\n\n**Scopes**: `license_keys:read` `license_keys:write`",
        "operationId": "license_keys:list",
        "security": [
          {
            "oidc": [
              "license_keys:read",
              "license_keys:write"
            ]
          },
          {
            "pat": [
              "license_keys:read",
              "license_keys:write"
            ]
          },
          {
            "oat": [
              "license_keys:read",
              "license_keys:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "benefit_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The benefit ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The benefit ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "BenefitID Filter",
              "description": "Filter by benefit ID."
            },
            "description": "Filter by benefit ID."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/LicenseKeyStatus"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LicenseKeyStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "LicenseKeyStatus Filter",
              "description": "Filter by license key status."
            },
            "description": "Filter by license key status."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_LicenseKeyRead_"
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to manage license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/LicenseKeyRead"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.license_keys.iter_list(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.licenseKeys.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/license-keys/{id}": {
      "get": {
        "tags": [
          "license_keys",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get License Key",
        "description": "Get a license key.\n\n**Scopes**: `license_keys:read` `license_keys:write`",
        "operationId": "license_keys:get",
        "security": [
          {
            "oidc": [
              "license_keys:read",
              "license_keys:write"
            ]
          },
          {
            "pat": [
              "license_keys:read",
              "license_keys:write"
            ]
          },
          {
            "oat": [
              "license_keys:read",
              "license_keys:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseKeyWithActivations"
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to manage license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "status",
              "label": "Status"
            },
            {
              "key": "customer_id",
              "label": "Customer ID"
            }
          ]
        },
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.license_keys.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.licenseKeys.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "license_keys",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update License Key",
        "description": "Update a license key.\n\n**Scopes**: `license_keys:write`",
        "operationId": "license_keys:update",
        "security": [
          {
            "oidc": [
              "license_keys:write"
            ]
          },
          {
            "pat": [
              "license_keys:write"
            ]
          },
          {
            "oat": [
              "license_keys:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseKeyUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseKeyRead"
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to manage license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.license_keys.update(\n    '00000000-0000-4000-8000-000000000000',\n    usage=0,\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.licenseKeys.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"usage\": 0\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/license-keys/{id}/rotate": {
      "post": {
        "tags": [
          "license_keys",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Rotate License Key",
        "description": "Rotate a license key.\n\nGenerates a new key string for the same license key record. The previous\nkey string immediately stops validating. Status, usage, limits, expiry,\nand activations are preserved.\n\n**Scopes**: `license_keys:write`",
        "operationId": "license_keys:rotate",
        "security": [
          {
            "oidc": [
              "license_keys:write"
            ]
          },
          {
            "pat": [
              "license_keys:write"
            ]
          },
          {
            "oat": [
              "license_keys:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotatedLicenseKey"
                }
              }
            }
          },
          "400": {
            "description": "License key cannot be rotated in its current status. Allowed statuses: disabled, granted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotateNotPermitted"
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to manage license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-confirm": true,
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "rotate",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.license_keys.rotate(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.licenseKeys.rotate(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/license-keys/{id}/activations/{activation_id}": {
      "get": {
        "tags": [
          "license_keys",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Activation",
        "description": "Get a license key activation.\n\n**Scopes**: `license_keys:read` `license_keys:write`",
        "operationId": "license_keys:get_activation",
        "security": [
          {
            "oidc": [
              "license_keys:read",
              "license_keys:write"
            ]
          },
          {
            "pat": [
              "license_keys:read",
              "license_keys:write"
            ]
          },
          {
            "oat": [
              "license_keys:read",
              "license_keys:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Id"
            }
          },
          {
            "name": "activation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Activation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseKeyActivationRead"
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to manage license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "License key or activation not found, or activation does not belong to the license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "get_activation",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.license_keys.get_activation(\n    '00000000-0000-4000-8000-000000000000',\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.licenseKeys.getActivation(\n  \"00000000-0000-4000-8000-000000000000\",\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/license-keys/validate": {
      "post": {
        "tags": [
          "license_keys",
          "public"
        ],
        "summary": "Validate License Key",
        "description": "Validate a license key.\n\n**Scopes**: `license_keys:write`",
        "operationId": "license_keys:validate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseKeyValidate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidatedLicenseKey"
                }
              }
            }
          },
          "400": {
            "description": "The requested usage increment exceeds the license key's remaining usage allowance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "404": {
            "description": "License key not found, revoked, disabled, or expired, or the supplied activation is missing or does not match, or the conditions, benefit, or customer do not match.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": [
              "license_keys:write"
            ]
          },
          {
            "pat": [
              "license_keys:write"
            ]
          },
          {
            "oat": [
              "license_keys:write"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "validate",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.license_keys.validate(\n    key='string',\n    organization_id='00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.licenseKeys.validate(\n  {\n    \"key\": \"string\",\n    \"organization_id\": \"00000000-0000-4000-8000-000000000000\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/license-keys/activate": {
      "post": {
        "tags": [
          "license_keys",
          "public"
        ],
        "summary": "Activate License Key",
        "description": "Activate a license key instance.\n\n**Scopes**: `license_keys:write`",
        "operationId": "license_keys:activate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseKeyActivate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseKeyActivationCreated"
                }
              }
            }
          },
          "403": {
            "description": "License key is revoked, disabled, or expired, does not support activations, or has reached its activation limit. Use /validate for licenses without activations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": [
              "license_keys:write"
            ]
          },
          {
            "pat": [
              "license_keys:write"
            ]
          },
          {
            "oat": [
              "license_keys:write"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "activate",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.license_keys.activate(\n    key='string',\n    organization_id='00000000-0000-4000-8000-000000000000',\n    label='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.licenseKeys.activate(\n  {\n    \"key\": \"string\",\n    \"organization_id\": \"00000000-0000-4000-8000-000000000000\",\n    \"label\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/license-keys/deactivate": {
      "post": {
        "tags": [
          "license_keys",
          "public"
        ],
        "summary": "Deactivate License Key",
        "description": "Deactivate a license key instance.\n\n**Scopes**: `license_keys:write`",
        "operationId": "license_keys:deactivate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseKeyDeactivate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "License key activation deactivated."
          },
          "404": {
            "description": "License key or activation not found, or activation does not belong to the license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": [
              "license_keys:write"
            ]
          },
          {
            "pat": [
              "license_keys:write"
            ]
          },
          {
            "oat": [
              "license_keys:write"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "deactivate",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.license_keys.deactivate(\n    key='string',\n    organization_id='00000000-0000-4000-8000-000000000000',\n    activation_id='00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.licenseKeys.deactivate(\n  {\n    \"key\": \"string\",\n    \"organization_id\": \"00000000-0000-4000-8000-000000000000\",\n    \"activation_id\": \"00000000-0000-4000-8000-000000000000\"\n  },\n);\n"
          }
        ]
      }
    },
    "/v1/checkout-links/": {
      "get": {
        "tags": [
          "checkout-links",
          "public",
          "mcp",
          "cli",
          "mcp",
          "cli"
        ],
        "summary": "List Checkout Links",
        "description": "List checkout links.\n\n**Scopes**: `checkout_links:read` `checkout_links:write`",
        "operationId": "checkout-links:list",
        "security": [
          {
            "oidc": [
              "checkout_links:read",
              "checkout_links:write"
            ]
          },
          {
            "pat": [
              "checkout_links:read",
              "checkout_links:write"
            ]
          },
          {
            "oat": [
              "checkout_links:read",
              "checkout_links:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CheckoutLinkSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CheckoutLink_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "checkout-links",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CheckoutLink"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.checkout_links.iter_list(\n    page=1,\n    limit=10,\n    sorting=['created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.checkoutLinks.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "checkout-links",
          "public",
          "mcp",
          "cli",
          "mcp",
          "cli"
        ],
        "summary": "Create Checkout Link",
        "description": "Create a checkout link.\n\n**Scopes**: `checkout_links:write`",
        "operationId": "checkout-links:create",
        "security": [
          {
            "oidc": [
              "checkout_links:write"
            ]
          },
          {
            "pat": [
              "checkout_links:write"
            ]
          },
          {
            "oat": [
              "checkout_links:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutLinkCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Checkout link created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutLink"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-mint": {
          "content": "<Warning>\n  Looking to create a single use checkout session? Checkout Links are probably **not** what you're looking for.\n\n  Checkout Links are shareable links that generate checkout sessions when opened. They are very handy to start a purchase from your website or social media.\n\n  However, if you want to start a checkout for one of your user **inside** your product, you should use the [Checkout Sessions API](/api-reference/checkouts/create-checkout-session).\n</Warning>"
        },
        "x-speakeasy-group": "checkout-links",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkout_links.create(\n    payment_processor='stripe',\n    allow_discount_codes=True,\n    require_billing_address=False,\n    product_price_id='00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkoutLinks.create(\n  {\n    \"payment_processor\": \"stripe\",\n    \"allow_discount_codes\": true,\n    \"require_billing_address\": false,\n    \"product_price_id\": \"00000000-0000-4000-8000-000000000000\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/checkout-links/{id}": {
      "get": {
        "tags": [
          "checkout-links",
          "public",
          "mcp",
          "cli",
          "mcp",
          "cli"
        ],
        "summary": "Get Checkout Link",
        "description": "Get a checkout link by ID.\n\n**Scopes**: `checkout_links:read` `checkout_links:write`",
        "operationId": "checkout-links:get",
        "security": [
          {
            "oidc": [
              "checkout_links:read",
              "checkout_links:write"
            ]
          },
          {
            "pat": [
              "checkout_links:read",
              "checkout_links:write"
            ]
          },
          {
            "oat": [
              "checkout_links:read",
              "checkout_links:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The checkout link ID.",
              "title": "Id"
            },
            "description": "The checkout link ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutLink"
                }
              }
            }
          },
          "404": {
            "description": "Checkout link not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "label",
              "label": "Label"
            },
            {
              "key": "url",
              "label": "URL"
            }
          ]
        },
        "x-speakeasy-group": "checkout-links",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkout_links.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkoutLinks.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "checkout-links",
          "public",
          "mcp",
          "cli",
          "mcp",
          "cli"
        ],
        "summary": "Update Checkout Link",
        "description": "Update a checkout link.\n\n**Scopes**: `checkout_links:write`",
        "operationId": "checkout-links:update",
        "security": [
          {
            "oidc": [
              "checkout_links:write"
            ]
          },
          {
            "pat": [
              "checkout_links:write"
            ]
          },
          {
            "oat": [
              "checkout_links:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The checkout link ID.",
              "title": "Id"
            },
            "description": "The checkout link ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutLinkUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout link updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutLink"
                }
              }
            }
          },
          "404": {
            "description": "Checkout link not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "checkout-links",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.checkout_links.update(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.checkoutLinks.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "checkout-links",
          "public",
          "mcp",
          "cli",
          "mcp",
          "cli"
        ],
        "summary": "Delete Checkout Link",
        "description": "Delete a checkout link.\n\n**Scopes**: `checkout_links:write`",
        "operationId": "checkout-links:delete",
        "security": [
          {
            "oidc": [
              "checkout_links:write"
            ]
          },
          {
            "pat": [
              "checkout_links:write"
            ]
          },
          {
            "oat": [
              "checkout_links:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The checkout link ID.",
              "title": "Id"
            },
            "description": "The checkout link ID."
          }
        ],
        "responses": {
          "204": {
            "description": "Checkout link deleted."
          },
          "404": {
            "description": "Checkout link not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "checkout-links",
        "x-speakeasy-name-override": "delete",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.checkout_links.delete(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.checkoutLinks.delete(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/custom-fields/": {
      "get": {
        "tags": [
          "custom-fields",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Custom Fields",
        "description": "List custom fields.\n\n**Scopes**: `custom_fields:read` `custom_fields:write`",
        "operationId": "custom-fields:list",
        "security": [
          {
            "oidc": [
              "custom_fields:read",
              "custom_fields:write"
            ]
          },
          {
            "pat": [
              "custom_fields:read",
              "custom_fields:write"
            ]
          },
          {
            "oat": [
              "custom_fields:read",
              "custom_fields:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by custom field name or slug.",
              "title": "Query"
            },
            "description": "Filter by custom field name or slug."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomFieldType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomFieldType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomFieldType Filter",
              "description": "Filter by custom field type."
            },
            "description": "Filter by custom field type."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomFieldSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "slug"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomField_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "custom-fields",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomField"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.custom_fields.iter_list(\n    page=1,\n    limit=10,\n    sorting=['slug'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customFields.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"slug\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "custom-fields",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Custom Field",
        "description": "Create a custom field.\n\n**Scopes**: `custom_fields:write`",
        "operationId": "custom-fields:create",
        "security": [
          {
            "oidc": [
              "custom_fields:write"
            ]
          },
          {
            "pat": [
              "custom_fields:write"
            ]
          },
          {
            "oat": [
              "custom_fields:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomFieldCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Custom field created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField",
                  "title": "CustomField"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "custom-fields",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.custom_fields.create(\n    type='text',\n    slug='string',\n    name='string',\n    properties={},\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customFields.create(\n  {\n    \"type\": \"text\",\n    \"slug\": \"string\",\n    \"name\": \"string\",\n    \"properties\": {}\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/custom-fields/{id}": {
      "get": {
        "tags": [
          "custom-fields",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Custom Field",
        "description": "Get a custom field by ID.\n\n**Scopes**: `custom_fields:read` `custom_fields:write`",
        "operationId": "custom-fields:get",
        "security": [
          {
            "oidc": [
              "custom_fields:read",
              "custom_fields:write"
            ]
          },
          {
            "pat": [
              "custom_fields:read",
              "custom_fields:write"
            ]
          },
          {
            "oat": [
              "custom_fields:read",
              "custom_fields:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The custom field ID.",
              "title": "Id"
            },
            "description": "The custom field ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField",
                  "title": "CustomField"
                }
              }
            }
          },
          "404": {
            "description": "Custom field not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "slug",
              "label": "Slug"
            },
            {
              "key": "type",
              "label": "Type"
            }
          ]
        },
        "x-speakeasy-group": "custom-fields",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.custom_fields.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customFields.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "custom-fields",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Custom Field",
        "description": "Update a custom field.\n\n**Scopes**: `custom_fields:write`",
        "operationId": "custom-fields:update",
        "security": [
          {
            "oidc": [
              "custom_fields:write"
            ]
          },
          {
            "pat": [
              "custom_fields:write"
            ]
          },
          {
            "oat": [
              "custom_fields:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The custom field ID.",
              "title": "Id"
            },
            "description": "The custom field ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomFieldUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Custom field updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField",
                  "title": "CustomField"
                }
              }
            }
          },
          "404": {
            "description": "Custom field not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "custom-fields",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.custom_fields.update(\n    '00000000-0000-4000-8000-000000000000',\n    type='text',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customFields.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"type\": \"text\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "custom-fields",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Custom Field",
        "description": "Delete a custom field.\n\n**Scopes**: `custom_fields:write`",
        "operationId": "custom-fields:delete",
        "security": [
          {
            "oidc": [
              "custom_fields:write"
            ]
          },
          {
            "pat": [
              "custom_fields:write"
            ]
          },
          {
            "oat": [
              "custom_fields:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The custom field ID.",
              "title": "Id"
            },
            "description": "The custom field ID."
          }
        ],
        "responses": {
          "204": {
            "description": "Custom field deleted."
          },
          "404": {
            "description": "Custom field not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "custom-fields",
        "x-speakeasy-name-override": "delete",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.custom_fields.delete(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customFields.delete(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/discounts/": {
      "get": {
        "tags": [
          "discounts",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Discounts",
        "description": "List discounts.\n\n**Scopes**: `discounts:read` `discounts:write`",
        "operationId": "discounts:list",
        "security": [
          {
            "oidc": [
              "discounts:read",
              "discounts:write"
            ]
          },
          {
            "pat": [
              "discounts:read",
              "discounts:write"
            ]
          },
          {
            "oat": [
              "discounts:read",
              "discounts:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by name.",
              "title": "Query"
            },
            "description": "Filter by name."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiscountSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Discount_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "discounts",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Discount"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.discounts.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.discounts.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "discounts",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Discount",
        "description": "Create a discount.\n\n**Scopes**: `discounts:write`",
        "operationId": "discounts:create",
        "security": [
          {
            "oidc": [
              "discounts:write"
            ]
          },
          {
            "pat": [
              "discounts:write"
            ]
          },
          {
            "oat": [
              "discounts:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscountCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Discount created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Discount",
                  "title": "Discount"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "discounts",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.discounts.create(\n    name='string',\n    type='fixed',\n    duration='once',\n    currency='usd',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.discounts.create(\n  {\n    \"name\": \"string\",\n    \"type\": \"fixed\",\n    \"duration\": \"once\",\n    \"currency\": \"usd\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/discounts/{id}": {
      "get": {
        "tags": [
          "discounts",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Discount",
        "description": "Get a discount by ID.\n\n**Scopes**: `discounts:read` `discounts:write`",
        "operationId": "discounts:get",
        "security": [
          {
            "oidc": [
              "discounts:read",
              "discounts:write"
            ]
          },
          {
            "pat": [
              "discounts:read",
              "discounts:write"
            ]
          },
          {
            "oat": [
              "discounts:read",
              "discounts:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The discount ID.",
              "title": "Id"
            },
            "description": "The discount ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Discount",
                  "title": "Discount"
                }
              }
            }
          },
          "404": {
            "description": "Discount not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "code",
              "label": "Code"
            },
            {
              "key": "type",
              "label": "Type"
            },
            {
              "key": "duration",
              "label": "Duration"
            }
          ]
        },
        "x-speakeasy-group": "discounts",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.discounts.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.discounts.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "discounts",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Discount",
        "description": "Update a discount.\n\n**Scopes**: `discounts:write`",
        "operationId": "discounts:update",
        "security": [
          {
            "oidc": [
              "discounts:write"
            ]
          },
          {
            "pat": [
              "discounts:write"
            ]
          },
          {
            "oat": [
              "discounts:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The discount ID.",
              "title": "Id"
            },
            "description": "The discount ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscountUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Discount updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Discount",
                  "title": "Discount"
                }
              }
            }
          },
          "404": {
            "description": "Discount not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "discounts",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.discounts.update(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.discounts.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "discounts",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Discount",
        "description": "Delete a discount.\n\n**Scopes**: `discounts:write`",
        "operationId": "discounts:delete",
        "security": [
          {
            "oidc": [
              "discounts:write"
            ]
          },
          {
            "pat": [
              "discounts:write"
            ]
          },
          {
            "oat": [
              "discounts:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The discount ID.",
              "title": "Id"
            },
            "description": "The discount ID."
          }
        ],
        "responses": {
          "204": {
            "description": "Discount deleted."
          },
          "404": {
            "description": "Discount not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "discounts",
        "x-speakeasy-name-override": "delete",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.discounts.delete(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.discounts.delete(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/customers/": {
      "get": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Customers",
        "description": "List customers.\n\n**Scopes**: `customers:read` `customers:write`",
        "operationId": "customers:list",
        "security": [
          {
            "oidc": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:read",
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by exact email.",
              "title": "Email"
            },
            "description": "Filter by exact email."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by name, email, or external ID.",
              "title": "Query"
            },
            "description": "Filter by name, email, or external ID."
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active customers, i.e. customers with at least one trialing, active or past_due subscription.",
              "title": "Active"
            },
            "description": "Filter by active customers, i.e. customers with at least one trialing, active or past_due subscription."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "schema": {
              "$ref": "#/components/schemas/MetadataQuery"
            },
            "description": "Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Customer_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Customer"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customers.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customers.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Customer",
        "description": "Create a customer.\n\n**Scopes**: `customers:write`",
        "operationId": "customers:create",
        "security": [
          {
            "oidc": [
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Customer created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.create(\n    external_id='usr_1337',\n    type='individual',\n    email='customer@example.com',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.create(\n  {\n    \"external_id\": \"usr_1337\",\n    \"type\": \"individual\",\n    \"email\": \"customer@example.com\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customers/export": {
      "get": {
        "tags": [
          "customers",
          "public"
        ],
        "summary": "Export Customers",
        "description": "Export customers as a CSV file.\n\n**Scopes**: `customers:read` `customers:write`",
        "operationId": "customers:export",
        "security": [
          {
            "oidc": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:read",
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by organization ID.",
              "title": "Organization Id"
            },
            "description": "Filter by organization ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "export",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.export()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.export();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customers/{id}": {
      "get": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Customer",
        "description": "Get a customer by ID.\n\n**Scopes**: `customers:read` `customers:write`",
        "operationId": "customers:get",
        "security": [
          {
            "oidc": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:read",
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "email",
              "label": "Email"
            },
            {
              "key": "external_id",
              "label": "External ID"
            }
          ]
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Customer",
        "description": "Update a customer.\n\n**Scopes**: `customers:write`",
        "operationId": "customers:update",
        "security": [
          {
            "oidc": [
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Customer updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.update(\n    '00000000-0000-4000-8000-000000000000',\n    email='customer@example.com',\n    external_id='usr_1337',\n    type='team',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"email\": \"customer@example.com\",\n    \"external_id\": \"usr_1337\",\n    \"type\": \"team\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Customer",
        "description": "Delete a customer.\n\nThis action cannot be undone and will immediately:\n- Cancel any active subscriptions for the customer\n- Revoke all their benefits\n- Clear any `external_id`\n\nUse it only in the context of deleting a user within your\nown service. Otherwise, use more granular API endpoints to cancel\na specific subscription or revoke certain benefits.\n\nNote: The customers information will nonetheless be retained for historic\norders and subscriptions.\n\nSet `anonymize=true` to also anonymize PII for GDPR compliance.\n\n**Scopes**: `customers:write`",
        "operationId": "customers:delete",
        "security": [
          {
            "oidc": [
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          },
          {
            "name": "anonymize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, also anonymize the customer's personal data for GDPR compliance. This replaces email with a hashed version, hashes name and billing name (name preserved for businesses with tax_id), clears billing address, and removes OAuth account data.",
              "default": false,
              "title": "Anonymize"
            },
            "description": "If true, also anonymize the customer's personal data for GDPR compliance. This replaces email with a hashed version, hashes name and billing name (name preserved for businesses with tax_id), clears billing address, and removes OAuth account data."
          }
        ],
        "responses": {
          "204": {
            "description": "Customer deleted."
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "delete",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.customers.delete(\n    '00000000-0000-4000-8000-000000000000',\n    anonymize=False,\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customers.delete(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"anonymize\": false\n  },\n);\n"
          }
        ]
      }
    },
    "/v1/customers/external/{external_id}": {
      "get": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Customer by External ID",
        "description": "Get a customer by external ID.\n\n**Scopes**: `customers:read` `customers:write`",
        "operationId": "customers:get_external",
        "security": [
          {
            "oidc": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:read",
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "email",
              "label": "Email"
            },
            {
              "key": "external_id",
              "label": "External ID"
            }
          ]
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "get_external",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.get_external(\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.getExternal(\n  \"string\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Customer by External ID",
        "description": "Update a customer by external ID.\n\n**Scopes**: `customers:write`",
        "operationId": "customers:update_external",
        "security": [
          {
            "oidc": [
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerUpdateExternalID"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Customer updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "update_external",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.update_external(\n    'string',\n    email='customer@example.com',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.updateExternal(\n  \"string\",\n  {\n    \"email\": \"customer@example.com\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Customer by External ID",
        "description": "Delete a customer by external ID.\n\nImmediately cancels any active subscriptions and revokes any active benefits.\n\nSet `anonymize=true` to also anonymize PII for GDPR compliance.\n\n**Scopes**: `customers:write`",
        "operationId": "customers:delete_external",
        "security": [
          {
            "oidc": [
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          },
          {
            "name": "anonymize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true, also anonymize the customer's personal data for GDPR compliance.",
              "default": false,
              "title": "Anonymize"
            },
            "description": "If true, also anonymize the customer's personal data for GDPR compliance."
          }
        ],
        "responses": {
          "204": {
            "description": "Customer deleted."
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "delete_external",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.customers.delete_external(\n    'string',\n    anonymize=False,\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customers.deleteExternal(\n  \"string\",\n  {\n    \"anonymize\": false\n  },\n);\n"
          }
        ]
      }
    },
    "/v1/customers/{id}/state": {
      "get": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Customer State",
        "description": "Get a customer state by ID.\n\nThe customer state includes information about\nthe customer's active subscriptions and benefits.\n\nIt's the ideal endpoint to use when you need to get a full overview\nof a customer's status.\n\n**Scopes**: `customers:read` `customers:write`",
        "operationId": "customers:get_state",
        "security": [
          {
            "oidc": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:read",
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerState"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "get_state",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.get_state(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.getState(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customers/external/{external_id}/state": {
      "get": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Customer State by External ID",
        "description": "Get a customer state by external ID.\n\nThe customer state includes information about\nthe customer's active subscriptions and benefits.\n\nIt's the ideal endpoint to use when you need to get a full overview\nof a customer's status.\n\n**Scopes**: `customers:read` `customers:write`",
        "operationId": "customers:get_state_external",
        "security": [
          {
            "oidc": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:read",
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerState"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "get_state_external",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.get_state_external(\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.getStateExternal(\n  \"string\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customers/{id}/payment-methods": {
      "get": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Customer Payment Methods",
        "description": "Get saved payment methods of a customer.\n\n**Scopes**: `customers:read` `customers:write`",
        "operationId": "customers:list_payment_methods",
        "security": [
          {
            "oidc": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:read",
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_PaymentMethod_"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "list_payment_methods",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/PaymentMethod"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customers.iter_list_payment_methods(\n    '00000000-0000-4000-8000-000000000000',\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customers.iterListPaymentMethods(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customers/external/{external_id}/payment-methods": {
      "get": {
        "tags": [
          "customers",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Customer Payment Methods by External ID",
        "description": "Get saved payment methods of a customer by external ID.\n\n**Scopes**: `customers:read` `customers:write`",
        "operationId": "customers:list_payment_methods_external",
        "security": [
          {
            "oidc": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "pat": [
              "customers:read",
              "customers:write"
            ]
          },
          {
            "oat": [
              "customers:read",
              "customers:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_PaymentMethod_"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "list_payment_methods_external",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/PaymentMethod"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customers.iter_list_payment_methods_external(\n    'string',\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customers.iterListPaymentMethodsExternal(\n  \"string\",\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customers/{id}/members": {
      "get": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli",
          "mcp",
          "cli"
        ],
        "summary": "List Members",
        "description": "List the members of a customer.\n\n**Scopes**: `members:read` `members:write`",
        "operationId": "customers:members:list",
        "security": [
          {
            "oidc": [
              "members:read",
              "members:write"
            ]
          },
          {
            "pat": [
              "members:read",
              "members:write"
            ]
          },
          {
            "oat": [
              "members:read",
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MemberRole"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by member role.",
              "title": "Role"
            },
            "description": "Filter by member role."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MemberSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Members retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Member_"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customers.members.iter_list(\n    '00000000-0000-4000-8000-000000000000',\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customers.members.iterList(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Member",
        "description": "Create a new member for a customer.\n\nOnly B2B customers with the member management feature enabled can add members.\nThe authenticated user or organization must have access to the customer's organization.\n\n**Scopes**: `members:write`",
        "operationId": "customers:members:create",
        "security": [
          {
            "oidc": [
              "members:write"
            ]
          },
          {
            "pat": [
              "members:write"
            ]
          },
          {
            "oat": [
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberCreateFromCustomer"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Member created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          },
          "403": {
            "description": "Not permitted to add members.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.members.create(\n    '00000000-0000-4000-8000-000000000000',\n    email='member@example.com',\n    external_id='usr_1337',\n    role='member',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.members.create(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"email\": \"member@example.com\",\n    \"external_id\": \"usr_1337\",\n    \"role\": \"member\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customers/external/{external_id}/members": {
      "get": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Members by Customer External ID",
        "description": "List the members of a customer identified by its external ID.\n\n**Scopes**: `members:read` `members:write`",
        "operationId": "customers:members:list_external",
        "security": [
          {
            "oidc": [
              "members:read",
              "members:write"
            ]
          },
          {
            "pat": [
              "members:read",
              "members:write"
            ]
          },
          {
            "oat": [
              "members:read",
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MemberRole"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by member role.",
              "title": "Role"
            },
            "description": "Filter by member role."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MemberSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Members retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Member_"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "The external customer ID matches customers in several accessible organizations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AmbiguousExternalCustomerID"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "list_external",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customers.members.iter_list_external(\n    'string',\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customers.members.iterListExternal(\n  \"string\",\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Member by Customer External ID",
        "description": "Create a new member for a customer identified by its external ID.\n\n**Scopes**: `members:write`",
        "operationId": "customers:members:create_external",
        "security": [
          {
            "oidc": [
              "members:write"
            ]
          },
          {
            "pat": [
              "members:write"
            ]
          },
          {
            "oat": [
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberCreateFromCustomer"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Member created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          },
          "403": {
            "description": "Not permitted to add members.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "The external customer ID matches customers in several accessible organizations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AmbiguousExternalCustomerID"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "create_external",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.members.create_external(\n    'string',\n    email='member@example.com',\n    external_id='usr_1337',\n    role='member',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.members.createExternal(\n  \"string\",\n  {\n    \"email\": \"member@example.com\",\n    \"external_id\": \"usr_1337\",\n    \"role\": \"member\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customers/{id}/members/{member_id}": {
      "get": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Member",
        "description": "Get a member of a customer by its ID.\n\n**Scopes**: `members:read` `members:write`",
        "operationId": "customers:members:get",
        "security": [
          {
            "oidc": [
              "members:read",
              "members:write"
            ]
          },
          {
            "pat": [
              "members:read",
              "members:write"
            ]
          },
          {
            "oat": [
              "members:read",
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Member Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          },
          "404": {
            "description": "Member not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "email",
              "label": "Email"
            },
            {
              "key": "external_id",
              "label": "External ID"
            },
            {
              "key": "role",
              "label": "Role"
            }
          ]
        },
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.members.get(\n    '00000000-0000-4000-8000-000000000000',\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.members.get(\n  \"00000000-0000-4000-8000-000000000000\",\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Member",
        "description": "Update a member of a customer.\n\nOnly name, email and role can be updated.\n\n**Scopes**: `members:write`",
        "operationId": "customers:members:update",
        "security": [
          {
            "oidc": [
              "members:write"
            ]
          },
          {
            "pat": [
              "members:write"
            ]
          },
          {
            "oat": [
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Member Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Member updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          },
          "404": {
            "description": "Member not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.members.update(\n    '00000000-0000-4000-8000-000000000000',\n    '00000000-0000-4000-8000-000000000000',\n    role='member',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.members.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"role\": \"member\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Member",
        "description": "Delete a member of a customer.\n\n**Scopes**: `members:write`",
        "operationId": "customers:members:delete",
        "security": [
          {
            "oidc": [
              "members:write"
            ]
          },
          {
            "pat": [
              "members:write"
            ]
          },
          {
            "oat": [
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer ID.",
              "title": "Id"
            },
            "description": "The customer ID."
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Member Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Member deleted."
          },
          "404": {
            "description": "Member not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "delete",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.customers.members.delete(\n    '00000000-0000-4000-8000-000000000000',\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customers.members.delete(\n  \"00000000-0000-4000-8000-000000000000\",\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/customers/external/{external_id}/members/{member_external_id}": {
      "get": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Member by External ID",
        "description": "Get a member by external ID for a customer identified by its external ID.\n\n**Scopes**: `members:read` `members:write`",
        "operationId": "customers:members:get_external",
        "security": [
          {
            "oidc": [
              "members:read",
              "members:write"
            ]
          },
          {
            "pat": [
              "members:read",
              "members:write"
            ]
          },
          {
            "oat": [
              "members:read",
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          },
          {
            "name": "member_external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The member external ID.",
              "title": "Member External Id"
            },
            "description": "The member external ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Member retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          },
          "404": {
            "description": "Member not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "The external customer ID matches customers in several accessible organizations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AmbiguousExternalCustomerID"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "email",
              "label": "Email"
            },
            {
              "key": "external_id",
              "label": "External ID"
            },
            {
              "key": "role",
              "label": "Role"
            }
          ]
        },
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "get_external",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.members.get_external(\n    'string',\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.members.getExternal(\n  \"string\",\n  \"string\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Member by External ID",
        "description": "Update a member by external ID for a customer identified by its external ID.\n\n**Scopes**: `members:write`",
        "operationId": "customers:members:update_external",
        "security": [
          {
            "oidc": [
              "members:write"
            ]
          },
          {
            "pat": [
              "members:write"
            ]
          },
          {
            "oat": [
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          },
          {
            "name": "member_external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The member external ID.",
              "title": "Member External Id"
            },
            "description": "The member external ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Member updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          },
          "404": {
            "description": "Member not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "The external customer ID matches customers in several accessible organizations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AmbiguousExternalCustomerID"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "update_external",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.members.update_external(\n    'string',\n    'string',\n    role='member',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customers.members.updateExternal(\n  \"string\",\n  \"string\",\n  {\n    \"role\": \"member\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "customers",
          "members",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Delete Member by External ID",
        "description": "Delete a member by external ID for a customer identified by its external ID.\n\n**Scopes**: `members:write`",
        "operationId": "customers:members:delete_external",
        "security": [
          {
            "oidc": [
              "members:write"
            ]
          },
          {
            "pat": [
              "members:write"
            ]
          },
          {
            "oat": [
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The customer external ID.",
              "title": "External Id"
            },
            "description": "The customer external ID."
          },
          {
            "name": "member_external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The member external ID.",
              "title": "Member External Id"
            },
            "description": "The member external ID."
          }
        ],
        "responses": {
          "204": {
            "description": "Member deleted."
          },
          "404": {
            "description": "Member not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "The external customer ID matches customers in several accessible organizations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AmbiguousExternalCustomerID"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "delete_external",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.customers.members.delete_external(\n    'string',\n    'string',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customers.members.deleteExternal(\n  \"string\",\n  \"string\",\n);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/benefit-grants/": {
      "get": {
        "tags": [
          "customer_portal",
          "benefit-grants",
          "public"
        ],
        "summary": "List Benefit Grants",
        "description": "List benefits grants of the authenticated customer.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:benefit-grants:list",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by benefit description.",
              "title": "Query"
            },
            "description": "Filter by benefit description."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/BenefitType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BenefitType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "BenefitType Filter",
              "description": "Filter by benefit type."
            },
            "description": "Filter by benefit type."
          },
          {
            "name": "benefit_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "BenefitID Filter",
              "description": "Filter by benefit ID."
            },
            "description": "Filter by benefit ID."
          },
          {
            "name": "checkout_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CheckoutID Filter",
              "description": "Filter by checkout ID."
            },
            "description": "Filter by checkout ID."
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The order ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The order ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrderID Filter",
              "description": "Filter by order ID."
            },
            "description": "Filter by order ID."
          },
          {
            "name": "subscription_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The subscription ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The subscription ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "SubscriptionID Filter",
              "description": "Filter by subscription ID."
            },
            "description": "Filter by subscription ID."
          },
          {
            "name": "member_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "MemberID Filter",
              "description": "Filter by member ID."
            },
            "description": "Filter by member ID."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerBenefitGrantSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "product_benefit",
                "-granted_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerBenefitGrant_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "benefit-grants",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerBenefitGrant"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.benefit_grants.iter_list(\n    page=1,\n    limit=10,\n    sorting=['product_benefit', '-granted_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.benefitGrants.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"product_benefit\",\n      \"-granted_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-portal/benefit-grants/{id}": {
      "get": {
        "tags": [
          "customer_portal",
          "benefit-grants",
          "public"
        ],
        "summary": "Get Benefit Grant",
        "description": "Get a benefit grant by ID for the authenticated customer.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:benefit-grants:get",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The benefit grant ID.",
              "title": "Id"
            },
            "description": "The benefit grant ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerBenefitGrant",
                  "title": "CustomerBenefitGrant"
                }
              }
            }
          },
          "404": {
            "description": "Benefit grant not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "benefit-grants",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.benefit_grants.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.benefitGrants.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "customer_portal",
          "benefit-grants",
          "public"
        ],
        "summary": "Update Benefit Grant",
        "description": "Update a benefit grant for the authenticated customer.\n\n**Scopes**: `customer_portal:write`",
        "operationId": "customer_portal:benefit-grants:update",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The benefit grant ID.",
              "title": "Id"
            },
            "description": "The benefit grant ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerBenefitGrantUpdate",
                "title": "CustomerBenefitGrantUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Benefit grant updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerBenefitGrant",
                  "title": "CustomerBenefitGrant"
                }
              }
            }
          },
          "403": {
            "description": "The benefit grant is revoked and cannot be updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "Benefit grant not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "benefit-grants",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.benefit_grants.update(\n    '00000000-0000-4000-8000-000000000000',\n    benefit_type='discord',\n    properties={'account_id': 'string'},\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.benefitGrants.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"benefit_type\": \"discord\",\n    \"properties\": {\n      \"account_id\": \"string\"\n    }\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customers/me": {
      "get": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "Get Customer",
        "description": "Get authenticated customer.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:customers:get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPortalCustomer"
                }
              }
            }
          }
        },
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customers.get()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customers.get();\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "Update Customer",
        "description": "Update authenticated customer.",
        "operationId": "customer_portal:customers:update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerPortalCustomerUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Customer updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPortalCustomer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customers.update()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customers.update(\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customers/me/payment-methods": {
      "get": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "List Customer Payment Methods",
        "description": "Get saved payment methods of the authenticated customer.",
        "operationId": "customer_portal:customers:list_payment_methods",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerPaymentMethod_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>\n  To change the default payment method, call the [`PATCH /v1/customer-portal/customers/me`](/api-reference/customer_portal/update-customer) endpoint with the desired `default_payment_method_id`.\n</Note>"
        },
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "list_payment_methods",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerPaymentMethod"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.customers.iter_list_payment_methods(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.customers.iterListPaymentMethods(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "Add Customer Payment Method",
        "description": "Add a payment method to the authenticated customer.",
        "operationId": "customer_portal:customers:add_payment_method",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerPaymentMethodCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Payment method created or setup initiated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPaymentMethodCreateResponse",
                  "title": "CustomerPaymentMethodCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "The card was declined while setting up the payment method.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodSetupFailed"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "add_payment_method",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customers.add_payment_method(\n    confirmation_token_id='string',\n    set_default=True,\n    return_url='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customers.addPaymentMethod(\n  {\n    \"confirmation_token_id\": \"string\",\n    \"set_default\": true,\n    \"return_url\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customers/me/payment-methods/confirm": {
      "post": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "Confirm Customer Payment Method",
        "description": "Confirm a payment method for the authenticated customer.",
        "operationId": "customer_portal:customers:confirm_payment_method",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerPaymentMethodConfirm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Payment method created or setup initiated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPaymentMethodCreateResponse",
                  "title": "CustomerPaymentMethodCreateResponse"
                }
              }
            }
          },
          "403": {
            "description": "Customer is not ready to confirm a payment method.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerNotReady"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "confirm_payment_method",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customers.confirm_payment_method(\n    setup_intent_id='string',\n    set_default=True,\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customers.confirmPaymentMethod(\n  {\n    \"setup_intent_id\": \"string\",\n    \"set_default\": true\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customers/me/payment-methods/{id}": {
      "delete": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "Delete Customer Payment Method",
        "description": "Delete a payment method from the authenticated customer.",
        "operationId": "customer_portal:customers:delete_payment_method",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Payment method deleted."
          },
          "400": {
            "description": "Payment method is still needed to bill a subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodInUseByActiveSubscription"
                }
              }
            }
          },
          "404": {
            "description": "Payment method not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "delete_payment_method",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.customer_portal.customers.delete_payment_method(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customerPortal.customers.deletePaymentMethod(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customers/me/email-update/request": {
      "post": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "Request Email Change",
        "description": "Request an email change for the authenticated customer.",
        "operationId": "customer_portal:customers:request_email_update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEmailUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Verification email sent.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "request_email_update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customers.request_email_update(\n    email='customer@example.com',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customers.requestEmailUpdate(\n  {\n    \"email\": \"customer@example.com\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customers/me/email-update/check": {
      "get": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "Check Email Change Token",
        "description": "Check if an email change verification token is still valid.",
        "operationId": "customer_portal:customers:check_email_update",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Token is valid."
          },
          "401": {
            "description": "Invalid or expired verification token."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "check_email_update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.customer_portal.customers.check_email_update(\n    token='string',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customerPortal.customers.checkEmailUpdate(\n  {\n    \"token\": \"string\"\n  },\n);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customers/me/email-update/verify": {
      "post": {
        "tags": [
          "customer_portal",
          "customers",
          "public"
        ],
        "summary": "Verify Email Change",
        "description": "Verify an email change using the token from the verification email.",
        "operationId": "customer_portal:customers:verify_email_update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEmailUpdateVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Email updated successfully. Returns a new session token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerEmailUpdateVerifyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired verification token."
          },
          "422": {
            "description": "Email address is already in use."
          }
        },
        "x-speakeasy-group": "customers",
        "x-speakeasy-name-override": "verify_email_update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customers.verify_email_update(\n    token='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customers.verifyEmailUpdate(\n  {\n    \"token\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/meters/": {
      "get": {
        "tags": [
          "customer_portal",
          "customer_meters",
          "public"
        ],
        "summary": "List Meters",
        "description": "List meters of the authenticated customer.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:customer_meters:list",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "meter_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The meter ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The meter ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "MeterID Filter",
              "description": "Filter by meter ID."
            },
            "description": "Filter by meter ID."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by meter name.",
              "title": "Query"
            },
            "description": "Filter by meter name."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerCustomerMeterSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-modified_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerCustomerMeter_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "customer_meters",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerCustomerMeter"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.customer_meters.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-modified_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.customerMeters.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-modified_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-portal/meters/{id}": {
      "get": {
        "tags": [
          "customer_portal",
          "customer_meters",
          "public"
        ],
        "summary": "Get Customer Meter",
        "description": "Get a meter by ID for the authenticated customer.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:customer_meters:get",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer meter ID.",
              "title": "Id"
            },
            "description": "The customer meter ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerCustomerMeter"
                }
              }
            }
          },
          "404": {
            "description": "Customer meter not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "customer_meters",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customer_meters.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customerMeters.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/seats": {
      "get": {
        "tags": [
          "customer_portal",
          "seats",
          "public"
        ],
        "summary": "List Seats",
        "description": "**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:seats:list_seats",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "subscription_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Subscription ID",
              "title": "Subscription Id"
            },
            "description": "Subscription ID"
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Order ID",
              "title": "Order Id"
            },
            "description": "Order ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatsList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted"
          },
          "404": {
            "description": "Subscription or order not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "seats",
        "x-speakeasy-name-override": "list_seats",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.seats.list_seats()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.seats.listSeats();\nconsole.log(response);\n"
          }
        ]
      },
      "post": {
        "tags": [
          "customer_portal",
          "seats",
          "public"
        ],
        "summary": "Assign Seat",
        "operationId": "customer_portal:seats:assign_seat",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerSeatAssign"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSeat"
                }
              }
            }
          },
          "400": {
            "description": "No available seats or customer already has a seat"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted"
          },
          "404": {
            "description": "Subscription, order, or customer not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "seats",
        "x-speakeasy-name-override": "assign_seat",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.seats.assign_seat(\n    immediate_claim=False,\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.seats.assignSeat(\n  {\n    \"immediate_claim\": false\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/seats/{seat_id}": {
      "delete": {
        "tags": [
          "customer_portal",
          "seats",
          "public"
        ],
        "summary": "Revoke Seat",
        "operationId": "customer_portal:seats:revoke_seat",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "seat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Seat Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSeat"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted"
          },
          "404": {
            "description": "Seat not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "seats",
        "x-speakeasy-name-override": "revoke_seat",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.seats.revoke_seat(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.seats.revokeSeat(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/seats/{seat_id}/resend": {
      "post": {
        "tags": [
          "customer_portal",
          "seats",
          "public"
        ],
        "summary": "Resend Invitation",
        "operationId": "customer_portal:seats:resend_invitation",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "seat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Seat Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSeat"
                }
              }
            }
          },
          "400": {
            "description": "Seat is not pending or already claimed"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted"
          },
          "404": {
            "description": "Seat not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "seats",
        "x-speakeasy-name-override": "resend_invitation",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.seats.resend_invitation(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.seats.resendInvitation(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/seats/subscriptions": {
      "get": {
        "tags": [
          "customer_portal",
          "seats",
          "public"
        ],
        "summary": "List Claimed Subscriptions",
        "description": "List all subscriptions where the authenticated customer has claimed a seat.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:seats:list_claimed_subscriptions",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerSubscription_"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "seats",
        "x-speakeasy-name-override": "list_claimed_subscriptions",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerSubscription"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.seats.iter_list_claimed_subscriptions(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.seats.iterListClaimedSubscriptions(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customer-session/introspect": {
      "get": {
        "tags": [
          "customer_portal",
          "customer-session",
          "public"
        ],
        "summary": "Introspect Customer Session",
        "description": "Introspect the current session and return its information.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:customer-session:introspect",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerCustomerSession"
                }
              }
            }
          }
        },
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "customer-session",
        "x-speakeasy-name-override": "introspect",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customer_session.introspect()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customerSession.introspect();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/customer-session/user": {
      "get": {
        "tags": [
          "customer_portal",
          "customer-session",
          "public"
        ],
        "summary": "Get Authenticated Portal User",
        "description": "Get information about the currently authenticated portal user.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:customer-session:get_authenticated_user",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalAuthenticatedUser"
                }
              }
            }
          }
        },
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "customer-session",
        "x-speakeasy-name-override": "get_authenticated_user",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.customer_session.get_authenticated_user()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.customerSession.getAuthenticatedUser();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/downloadables/": {
      "get": {
        "tags": [
          "customer_portal",
          "downloadables",
          "public"
        ],
        "summary": "List Downloadables",
        "description": "**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:downloadables:list",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "benefit_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The benefit ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The benefit ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "BenefitID Filter",
              "description": "Filter by benefit ID."
            },
            "description": "Filter by benefit ID."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_DownloadableRead_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "downloadables",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/DownloadableRead"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.downloadables.iter_list(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.downloadables.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-portal/license-keys/": {
      "get": {
        "tags": [
          "customer_portal",
          "license_keys",
          "public"
        ],
        "summary": "List License Keys",
        "description": "**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:license_keys:list",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "benefit_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The benefit ID."
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by a specific benefit",
              "title": "Benefit Id"
            },
            "description": "Filter by a specific benefit"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_LicenseKeyRead_"
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to manage license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/LicenseKeyRead"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.license_keys.iter_list(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.licenseKeys.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-portal/license-keys/{id}": {
      "get": {
        "tags": [
          "customer_portal",
          "license_keys",
          "public"
        ],
        "summary": "Get License Key",
        "description": "Get a license key.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:license_keys:get",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseKeyWithActivations"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.license_keys.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.licenseKeys.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/license-keys/{id}/rotate": {
      "post": {
        "tags": [
          "customer_portal",
          "license_keys",
          "public"
        ],
        "summary": "Rotate License Key",
        "description": "Rotate a license key.\n\nGenerates a new key string for the same license key record. The previous\nkey string immediately stops validating. Status, usage, limits, expiry,\nand activations are preserved.\n\n**Scopes**: `customer_portal:write`",
        "operationId": "customer_portal:license_keys:rotate",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotatedLicenseKey"
                }
              }
            }
          },
          "400": {
            "description": "License key cannot be rotated in its current status. Allowed statuses: disabled, granted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotateNotPermitted"
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to manage license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "rotate",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.license_keys.rotate(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.licenseKeys.rotate(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/license-keys/validate": {
      "post": {
        "tags": [
          "customer_portal",
          "license_keys",
          "public"
        ],
        "summary": "Validate License Key",
        "description": "Validate a license key.\n\n> This endpoint doesn't require authentication and can be safely used on a public\n> client, like a desktop application or a mobile app.\n> If you plan to validate a license key on a server, use the `/v1/license-keys/validate`\n> endpoint instead.",
        "operationId": "customer_portal:license_keys:validate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseKeyValidate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidatedLicenseKey"
                }
              }
            }
          },
          "400": {
            "description": "The requested usage increment exceeds the license key's remaining usage allowance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "404": {
            "description": "License key not found, revoked, disabled, or expired, or the supplied activation is missing or does not match, or the conditions, benefit, or customer do not match.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "validate",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.license_keys.validate(\n    key='string',\n    organization_id='00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.licenseKeys.validate(\n  {\n    \"key\": \"string\",\n    \"organization_id\": \"00000000-0000-4000-8000-000000000000\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/license-keys/activate": {
      "post": {
        "tags": [
          "customer_portal",
          "license_keys",
          "public"
        ],
        "summary": "Activate License Key",
        "description": "Activate a license key instance.\n\n> This endpoint doesn't require authentication and can be safely used on a public\n> client, like a desktop application or a mobile app.\n> If you plan to validate a license key on a server, use the `/v1/license-keys/activate`\n> endpoint instead.",
        "operationId": "customer_portal:license_keys:activate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseKeyActivate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseKeyActivationCreated"
                }
              }
            }
          },
          "403": {
            "description": "License key is revoked, disabled, or expired, does not support activations, or has reached its activation limit. Use /validate for licenses without activations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "404": {
            "description": "License key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Tip>\n  You only need to use this endpoint if you have device **activations** enabled on the license key benefit. You then use this endpoint to reserve an allocation for a specific device. Store the unique activation ID from the response on the device and use it as extra validation in the [/validate](/api-reference/customer_portal/validate-license-key) endpoint.\n\n  Not using **activations**? Just use the [/validate](/api-reference/customer_portal/validate-license-key) endpoint directly instead.\n</Tip>"
        },
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "activate",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.license_keys.activate(\n    key='string',\n    organization_id='00000000-0000-4000-8000-000000000000',\n    label='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.licenseKeys.activate(\n  {\n    \"key\": \"string\",\n    \"organization_id\": \"00000000-0000-4000-8000-000000000000\",\n    \"label\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/license-keys/deactivate": {
      "post": {
        "tags": [
          "customer_portal",
          "license_keys",
          "public"
        ],
        "summary": "Deactivate License Key",
        "description": "Deactivate a license key instance.\n\n> This endpoint doesn't require authentication and can be safely used on a public\n> client, like a desktop application or a mobile app.\n> If you plan to validate a license key on a server, use the `/v1/license-keys/deactivate`\n> endpoint instead.",
        "operationId": "customer_portal:license_keys:deactivate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseKeyDeactivate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "License key activation deactivated."
          },
          "404": {
            "description": "License key or activation not found, or activation does not belong to the license key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "deactivate",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.customer_portal.license_keys.deactivate(\n    key='string',\n    organization_id='00000000-0000-4000-8000-000000000000',\n    activation_id='00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customerPortal.licenseKeys.deactivate(\n  {\n    \"key\": \"string\",\n    \"organization_id\": \"00000000-0000-4000-8000-000000000000\",\n    \"activation_id\": \"00000000-0000-4000-8000-000000000000\"\n  },\n);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/members": {
      "get": {
        "tags": [
          "customer_portal",
          "members",
          "public"
        ],
        "summary": "List Members",
        "description": "List all members of the customer's team.\n\nOnly available to owners and billing managers of team customers.",
        "operationId": "customer_portal:members:list_members",
        "security": [
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerPortalMember_"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted - requires owner or billing manager role"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "members",
        "x-speakeasy-name-override": "list_members",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerPortalMember"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.members.iter_list_members(\n    page=1,\n    limit=10,\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.members.iterListMembers(\n  {\n    \"page\": 1,\n    \"limit\": 10\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "customer_portal",
          "members",
          "public"
        ],
        "summary": "Add Member",
        "description": "Add a new member to the customer's team.\n\nOnly available to owners and billing managers of team customers.\n\nRules:\n- Cannot add a member with the owner role (there must be exactly one owner)\n- If a member with this email already exists, the existing member is returned",
        "operationId": "customer_portal:members:add_member",
        "security": [
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerPortalMemberCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Member added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPortalMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or member already exists."
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted - requires owner or billing manager role"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "members",
        "x-speakeasy-name-override": "add_member",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.members.add_member(\n    email='customer@example.com',\n    role='billing_manager',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.members.addMember(\n  {\n    \"email\": \"customer@example.com\",\n    \"role\": \"billing_manager\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/members/{id}": {
      "patch": {
        "tags": [
          "customer_portal",
          "members",
          "public"
        ],
        "summary": "Update Member",
        "description": "Update a member's name or role.\n\nOnly available to owners and billing managers of team customers.\n\nRules:\n- Cannot modify your own role (to prevent self-demotion)\n- Customer must have exactly one owner at all times",
        "operationId": "customer_portal:members:update_member",
        "security": [
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerPortalMemberUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Member updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPortalMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid role change."
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted - requires owner or billing manager role"
          },
          "404": {
            "description": "Member not found."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "members",
        "x-speakeasy-name-override": "update_member",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.members.update_member(\n    '00000000-0000-4000-8000-000000000000',\n    role='billing_manager',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.members.updateMember(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"role\": \"billing_manager\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "customer_portal",
          "members",
          "public"
        ],
        "summary": "Remove Member",
        "description": "Remove a member from the team.\n\nOnly available to owners and billing managers of team customers.\n\nRules:\n- Cannot remove yourself\n- Cannot remove the only owner",
        "operationId": "customer_portal:members:remove_member",
        "security": [
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Member removed."
          },
          "400": {
            "description": "Cannot remove the only owner."
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted - requires owner or billing manager role"
          },
          "404": {
            "description": "Member not found."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "members",
        "x-speakeasy-name-override": "remove_member",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\npolar.customer_portal.members.remove_member(\n    '00000000-0000-4000-8000-000000000000',\n)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nawait polar.customerPortal.members.removeMember(\n  \"00000000-0000-4000-8000-000000000000\",\n);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/orders/": {
      "get": {
        "tags": [
          "customer_portal",
          "orders",
          "public"
        ],
        "summary": "List Orders",
        "description": "List orders of the authenticated customer.",
        "operationId": "customer_portal:orders:list",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "product_billing_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ProductBillingType"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductBillingType"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductBillingType Filter",
              "description": "Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."
            },
            "description": "Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."
          },
          {
            "name": "subscription_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The subscription ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The subscription ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "SubscriptionID Filter",
              "description": "Filter by subscription ID."
            },
            "description": "Filter by subscription ID."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Search by product or organization name.",
              "title": "Query"
            },
            "description": "Search by product or organization name."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerOrderSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerOrder_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerOrder"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.orders.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.orders.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-portal/orders/{id}": {
      "get": {
        "tags": [
          "customer_portal",
          "orders",
          "public"
        ],
        "summary": "Get Order",
        "description": "Get an order by ID for the authenticated customer.",
        "operationId": "customer_portal:orders:get",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerOrder"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.orders.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.orders.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "customer_portal",
          "orders",
          "public"
        ],
        "summary": "Update Order",
        "description": "Update an order for the authenticated customer.",
        "operationId": "customer_portal:orders:update",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerOrderUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerOrder"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.orders.update(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.orders.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/orders/{id}/invoice": {
      "post": {
        "tags": [
          "customer_portal",
          "orders",
          "public"
        ],
        "summary": "Generate Order Invoice",
        "description": "Trigger generation of an order's invoice.",
        "operationId": "customer_portal:orders:generate_invoice",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "Order is not eligible for invoice generation (invalid status).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderNotEligibleForInvoice"
                }
              }
            }
          },
          "422": {
            "description": "Order is missing billing name or address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MissingInvoiceBillingDetails"
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Warning>\n  Once the invoice is generated, it's permanent and cannot be modified.\n\n  Make sure the billing details (name and address) are correct before generating the invoice. You can update them before generating the invoice by calling the [`PATCH /v1/customer-portal/orders/{id}`](/api-reference/customer_portal/update-order) endpoint.\n</Warning>\n\n<Note>\n  After successfully calling this endpoint, you get a `202` response, meaning the generation of the invoice has been scheduled. It usually only takes a few seconds before you can retrieve the invoice using the [`GET /v1/customer-portal/orders/{id}/invoice`](/api-reference/customer_portal/get-order-invoice) endpoint.\n\n  If you want a reliable notification when the invoice is ready, you can listen to the [`order.updated`](/api-reference/orderupdated) webhook and check the [`is_invoice_generated` field](/api-reference/orderupdated#schema-data-is-invoice-generated).\n</Note>"
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "generate_invoice",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.orders.generate_invoice(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.orders.generateInvoice(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "get": {
        "tags": [
          "customer_portal",
          "orders",
          "public"
        ],
        "summary": "Get Order Invoice",
        "description": "Get an order's invoice data.",
        "operationId": "customer_portal:orders:invoice",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerOrderInvoice"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "content": "<Note>\n  The invoice must be generated first before it can be retrieved. You should call the [`POST /v1/customer-portal/orders/{id}/invoice`](/api-reference/customer_portal/generate-order-invoice) endpoint to generate the invoice.\n\n  If the invoice is not generated, you will receive a `404` error.\n</Note>"
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "invoice",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.orders.invoice(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.orders.invoice(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/orders/{id}/receipt": {
      "get": {
        "tags": [
          "customer_portal",
          "orders",
          "public"
        ],
        "summary": "Get Order Receipt",
        "description": "Get a presigned URL to download an order's receipt PDF.",
        "operationId": "customer_portal:orders:receipt",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerOrderReceipt"
                }
              }
            }
          },
          "202": {
            "description": "Receipt generation in progress."
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "receipt",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.orders.receipt(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.orders.receipt(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/orders/{id}/payment-status": {
      "get": {
        "tags": [
          "customer_portal",
          "orders",
          "public"
        ],
        "summary": "Get Order Payment Status",
        "description": "Get the current payment status for an order.",
        "operationId": "customer_portal:orders:get_payment_status",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerOrderPaymentStatus"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "get_payment_status",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.orders.get_payment_status(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.orders.getPaymentStatus(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/orders/{id}/confirm-payment": {
      "post": {
        "tags": [
          "customer_portal",
          "orders",
          "public"
        ],
        "summary": "Confirm Retry Payment",
        "description": "Confirm a retry payment using a Stripe confirmation token.",
        "operationId": "customer_portal:orders:confirm_retry_payment",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The order ID.",
              "title": "Id"
            },
            "description": "The order ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerOrderConfirmPayment"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerOrderPaymentConfirmation"
                }
              }
            }
          },
          "404": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "Payment already in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentAlreadyInProgress"
                }
              }
            }
          },
          "422": {
            "description": "Order not eligible for retry or payment confirmation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderNotEligibleForRetry"
                }
              }
            }
          },
          "429": {
            "description": "Manual retry limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualRetryLimitExceeded"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "orders",
        "x-speakeasy-name-override": "confirm_retry_payment",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.orders.confirm_retry_payment(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.orders.confirmRetryPayment(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/organizations/{slug}": {
      "get": {
        "tags": [
          "customer_portal",
          "organizations",
          "public"
        ],
        "summary": "Get Organization",
        "description": "Get a customer portal's organization by slug.",
        "operationId": "customer_portal:organizations:get",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The organization slug.",
              "title": "Slug"
            },
            "description": "The organization slug."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerOrganizationData"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "organizations",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.organizations.get(\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.organizations.get(\n  \"string\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/subscriptions/": {
      "get": {
        "tags": [
          "customer_portal",
          "subscriptions",
          "public"
        ],
        "summary": "List Subscriptions",
        "description": "List subscriptions of the authenticated customer.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:subscriptions:list",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ProductID Filter",
              "description": "Filter by product ID."
            },
            "description": "Filter by product ID."
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active or cancelled subscription.",
              "title": "Active"
            },
            "description": "Filter by active or cancelled subscription."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Search by product or organization name.",
              "title": "Query"
            },
            "description": "Search by product or organization name."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerSubscriptionSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-started_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerSubscription_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerSubscription"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.subscriptions.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-started_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.subscriptions.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-started_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-portal/subscriptions/{id}": {
      "get": {
        "tags": [
          "customer_portal",
          "subscriptions",
          "public"
        ],
        "summary": "Get Subscription",
        "description": "Get a subscription for the authenticated customer.\n\n**Scopes**: `customer_portal:read` `customer_portal:write`",
        "operationId": "customer_portal:subscriptions:get",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The subscription ID.",
              "title": "Id"
            },
            "description": "The subscription ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSubscription"
                }
              }
            }
          },
          "404": {
            "description": "Customer subscription was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Customer",
          "Member"
        ],
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.subscriptions.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.subscriptions.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "customer_portal",
          "subscriptions",
          "public"
        ],
        "summary": "Update Subscription",
        "description": "Update a subscription of the authenticated customer.",
        "operationId": "customer_portal:subscriptions:update",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The subscription ID.",
              "title": "Id"
            },
            "description": "The subscription ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerSubscriptionUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Customer subscription updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSubscription"
                }
              }
            }
          },
          "402": {
            "description": "Payment required to apply the subscription update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentFailed"
                }
              }
            }
          },
          "403": {
            "description": "Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AlreadyCanceledSubscription"
                    },
                    {
                      "$ref": "#/components/schemas/PauseResumeNotAllowed"
                    },
                    {
                      "$ref": "#/components/schemas/UpdateSubscriptionPlanNotAllowed"
                    },
                    {
                      "$ref": "#/components/schemas/UpdateSubscriptionSeatsNotAllowed"
                    },
                    {
                      "$ref": "#/components/schemas/UpdateSubscriptionUnitsNotAllowed"
                    }
                  ],
                  "title": "Response 403 Customer Portal:Subscriptions:Update"
                }
              }
            }
          },
          "404": {
            "description": "Customer subscription was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "409": {
            "description": "The subscription has no payment method to charge, or is not scheduled to be canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PaymentMethodRequired"
                    },
                    {
                      "$ref": "#/components/schemas/SubscriptionNotScheduledToCancel"
                    }
                  ],
                  "title": "Response 409 Customer Portal:Subscriptions:Update"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.subscriptions.update(\n    '00000000-0000-4000-8000-000000000000',\n    product_id='00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.subscriptions.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"product_id\": \"00000000-0000-4000-8000-000000000000\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "customer_portal",
          "subscriptions",
          "public"
        ],
        "summary": "Cancel Subscription",
        "description": "Cancel a subscription of the authenticated customer.",
        "operationId": "customer_portal:subscriptions:cancel",
        "security": [
          {
            "customer_session": [
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The subscription ID.",
              "title": "Id"
            },
            "description": "The subscription ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Customer subscription is canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSubscription"
                }
              }
            }
          },
          "403": {
            "description": "Customer subscription is already canceled or will be at the end of the period, or the user lacks billing permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlreadyCanceledSubscription"
                }
              }
            }
          },
          "404": {
            "description": "Customer subscription was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "cancel",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.subscriptions.cancel(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.subscriptions.cancel(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-portal/wallets/": {
      "get": {
        "tags": [
          "customer_portal",
          "wallets",
          "public"
        ],
        "summary": "List Wallets",
        "description": "List wallets of the authenticated customer.",
        "operationId": "customer_portal:wallets:list",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerWalletSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerWallet_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "wallets",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerWallet"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_portal.wallets.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerPortal.wallets.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-portal/wallets/{id}": {
      "get": {
        "tags": [
          "customer_portal",
          "wallets",
          "public"
        ],
        "summary": "Get Wallet",
        "description": "Get a wallet by ID for the authenticated customer.",
        "operationId": "customer_portal:wallets:get",
        "security": [
          {
            "customer_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          },
          {
            "member_session": [
              "customer_portal:read",
              "customer_portal:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The wallet ID.",
              "title": "Id"
            },
            "description": "The wallet ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerWallet"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "wallets",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_portal.wallets.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerPortal.wallets.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-seats": {
      "post": {
        "tags": [
          "customer-seats",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Assign Seat",
        "description": "**Scopes**: `customer_seats:write`",
        "operationId": "customer-seats:assign_seat",
        "security": [
          {
            "oidc": [
              "customer_seats:write"
            ]
          },
          {
            "pat": [
              "customer_seats:write"
            ]
          },
          {
            "oat": [
              "customer_seats:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SeatAssign"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSeat"
                }
              }
            }
          },
          "400": {
            "description": "No available seats or customer already has a seat"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted"
          },
          "404": {
            "description": "Subscription, order, or customer not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customer-seats",
        "x-speakeasy-name-override": "assign_seat",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_seats.assign_seat(\n    immediate_claim=False,\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerSeats.assignSeat(\n  {\n    \"immediate_claim\": false\n  },\n);\nconsole.log(response);\n"
          }
        ]
      },
      "get": {
        "tags": [
          "customer-seats",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Seats",
        "description": "**Scopes**: `customer_seats:read`",
        "operationId": "customer-seats:list_seats",
        "security": [
          {
            "oidc": [
              "customer_seats:read"
            ]
          },
          {
            "pat": [
              "customer_seats:read"
            ]
          },
          {
            "oat": [
              "customer_seats:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "subscription_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Subscription Id"
            }
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Order Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatsList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted"
          },
          "404": {
            "description": "Subscription or order not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customer-seats",
        "x-speakeasy-name-override": "list_seats",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_seats.list_seats()\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerSeats.listSeats();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-seats/{seat_id}": {
      "delete": {
        "tags": [
          "customer-seats",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Revoke Seat",
        "description": "**Scopes**: `customer_seats:write`",
        "operationId": "customer-seats:revoke_seat",
        "security": [
          {
            "oidc": [
              "customer_seats:write"
            ]
          },
          {
            "pat": [
              "customer_seats:write"
            ]
          },
          {
            "oat": [
              "customer_seats:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "seat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Seat Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSeat"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted"
          },
          "404": {
            "description": "Seat not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customer-seats",
        "x-speakeasy-name-override": "revoke_seat",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_seats.revoke_seat(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerSeats.revokeSeat(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-seats/{seat_id}/resend": {
      "post": {
        "tags": [
          "customer-seats",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Resend Invitation",
        "description": "**Scopes**: `customer_seats:write`",
        "operationId": "customer-seats:resend_invitation",
        "security": [
          {
            "oidc": [
              "customer_seats:write"
            ]
          },
          {
            "pat": [
              "customer_seats:write"
            ]
          },
          {
            "oat": [
              "customer_seats:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "seat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Seat Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSeat"
                }
              }
            }
          },
          "400": {
            "description": "Seat is not pending or already claimed"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not permitted"
          },
          "404": {
            "description": "Seat not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customer-seats",
        "x-speakeasy-name-override": "resend_invitation",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_seats.resend_invitation(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerSeats.resendInvitation(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-seats/claim/{invitation_token}": {
      "get": {
        "tags": [
          "customer-seats",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Claim Info",
        "operationId": "customer-seats:get_claim_info",
        "parameters": [
          {
            "name": "invitation_token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Invitation Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatClaimInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired invitation token"
          },
          "403": {
            "description": "Seat-based pricing not enabled for organization"
          },
          "404": {
            "description": "Seat not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "customer-seats",
        "x-speakeasy-name-override": "get_claim_info",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_seats.get_claim_info(\n    'string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerSeats.getClaimInfo(\n  \"string\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-seats/claim": {
      "post": {
        "tags": [
          "customer-seats",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Claim Seat",
        "operationId": "customer-seats:claim_seat",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SeatClaim"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSeatClaimResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid, expired, or already claimed token"
          },
          "403": {
            "description": "Seat-based pricing not enabled for organization"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "customer-seats",
        "x-speakeasy-name-override": "claim_seat",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_seats.claim_seat(\n    invitation_token='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerSeats.claimSeat(\n  {\n    \"invitation_token\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-sessions/": {
      "post": {
        "tags": [
          "customer-sessions",
          "public"
        ],
        "summary": "Create Customer Session",
        "description": "Create a customer session.\n\nFor organizations with `member_model_enabled`, this will automatically\ncreate a member session for the owner member of the customer.\n\n**Scopes**: `customer_sessions:write`",
        "operationId": "customer-sessions:create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CustomerSessionCustomerIDCreate"
                  },
                  {
                    "$ref": "#/components/schemas/CustomerSessionCustomerExternalIDCreate"
                  }
                ],
                "title": "Customer Session Create"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Customer session created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSession"
                }
              }
            }
          },
          "409": {
            "description": "The external customer ID matches customers in several accessible organizations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AmbiguousExternalCustomerID"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": [
              "customer_sessions:write"
            ]
          },
          {
            "pat": [
              "customer_sessions:write"
            ]
          },
          {
            "oat": [
              "customer_sessions:write"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customer-sessions",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_sessions.create(\n    return_url='https://example.com/account',\n    customer_id='00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerSessions.create(\n  {\n    \"return_url\": \"https://example.com/account\",\n    \"customer_id\": \"00000000-0000-4000-8000-000000000000\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/events/": {
      "get": {
        "tags": [
          "events",
          "public"
        ],
        "summary": "List Events",
        "description": "List events.\n\n**Scopes**: `events:read` `events:write`",
        "operationId": "events:list",
        "security": [
          {
            "oidc": [
              "events:read",
              "events:write"
            ]
          },
          {
            "pat": [
              "events:read",
              "events:write"
            ]
          },
          {
            "oat": [
              "events:read",
              "events:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter events following filter clauses. JSON string following the same schema a meter filter clause. ",
              "title": "Filter"
            },
            "description": "Filter events following filter clauses. JSON string following the same schema a meter filter clause. "
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter events after this timestamp.",
              "title": "Start Timestamp"
            },
            "description": "Filter events after this timestamp."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter events before this timestamp.",
              "title": "End Timestamp"
            },
            "description": "Filter events before this timestamp."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by external customer ID."
            },
            "description": "Filter by external customer ID."
          },
          {
            "name": "meter_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The meter ID."
                },
                {
                  "type": "null"
                }
              ],
              "title": "MeterID Filter",
              "description": "Filter by a meter filter clause."
            },
            "description": "Filter by a meter filter clause."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Name Filter",
              "description": "Filter by event name."
            },
            "description": "Filter by event name."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/EventSource"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventSource"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Filter",
              "description": "Filter by event source."
            },
            "description": "Filter by event source."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query",
              "description": "Query to filter events."
            },
            "description": "Query to filter events."
          },
          {
            "name": "parent_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The event ID."
                },
                {
                  "type": "null"
                }
              ],
              "description": "When combined with depth, use this event as the anchor instead of root events.",
              "title": "Parent Id"
            },
            "description": "When combined with depth, use this event as the anchor instead of root events."
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 5,
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "description": "Fetch descendants up to this depth. When set: 0=root events only, 1=roots+children, etc. Max 5. When not set, returns all events.",
              "title": "Depth"
            },
            "description": "Fetch descendants up to this depth. When set: 0=root events only, 1=roots+children, etc. Max 5. When not set, returns all events."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-timestamp"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "schema": {
              "$ref": "#/components/schemas/MetadataQuery"
            },
            "description": "Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ListResource_Event_"
                    },
                    {
                      "$ref": "#/components/schemas/ListResourceWithCursorPagination_Event_"
                    }
                  ],
                  "title": "Response Events:List"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "events",
        "x-speakeasy-name-override": "list",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.events.list(\n    page=1,\n    limit=10,\n    sorting=['-timestamp'],\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.events.list(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-timestamp\"\n    ]\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/events/names": {
      "get": {
        "tags": [
          "events",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Event Names",
        "description": "List event names.\n\n**Scopes**: `events:read` `events:write`",
        "operationId": "events:list_names",
        "security": [
          {
            "oidc": [
              "events:read",
              "events:write"
            ]
          },
          {
            "pat": [
              "events:read",
              "events:write"
            ]
          },
          {
            "oat": [
              "events:read",
              "events:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by external customer ID."
            },
            "description": "Filter by external customer ID."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/EventSource"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventSource"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Filter",
              "description": "Filter by event source."
            },
            "description": "Filter by event source."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query",
              "description": "Query to filter event names."
            },
            "description": "Query to filter event names."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventNamesSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-last_seen"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_EventName_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "events",
        "x-speakeasy-name-override": "list_names",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/EventName"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.events.iter_list_names(\n    page=1,\n    limit=10,\n    sorting=['-last_seen'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.events.iterListNames(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-last_seen\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/events/{id}": {
      "get": {
        "tags": [
          "events",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Event",
        "description": "Get an event by ID.\n\n**Scopes**: `events:read` `events:write`",
        "operationId": "events:get",
        "security": [
          {
            "oidc": [
              "events:read",
              "events:write"
            ]
          },
          {
            "pat": [
              "events:read",
              "events:write"
            ]
          },
          {
            "oat": [
              "events:read",
              "events:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The event ID.",
              "title": "Id"
            },
            "description": "The event ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "404": {
            "description": "Event not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "events",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.events.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.events.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/events/ingest": {
      "post": {
        "tags": [
          "events",
          "public"
        ],
        "summary": "Ingest Events",
        "description": "Ingest batch of events.\n\n**Scopes**: `events:write`",
        "operationId": "events:ingest",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventsIngest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventsIngestResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "oidc": [
              "events:write"
            ]
          },
          {
            "pat": [
              "events:write"
            ]
          },
          {
            "oat": [
              "events:write"
            ]
          }
        ],
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "events",
        "x-speakeasy-name-override": "ingest",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.events.ingest(\n    events=[{'timestamp': '2026-01-01T00:00:00.000000Z',\n      'name': 'string',\n      'customer_id': '00000000-0000-4000-8000-000000000000'}],\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.events.ingest(\n  {\n    \"events\": [\n      {\n        \"timestamp\": \"2026-01-01T00:00:00.000000Z\",\n        \"name\": \"string\",\n        \"customer_id\": \"00000000-0000-4000-8000-000000000000\"\n      }\n    ]\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/event-types/": {
      "get": {
        "tags": [
          "event-types",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Event Types",
        "description": "List event types with aggregated statistics.\n\n**Scopes**: `events:read` `events:write`",
        "operationId": "event-types:list",
        "security": [
          {
            "oidc": [
              "events:read",
              "events:write"
            ]
          },
          {
            "pat": [
              "events:read",
              "events:write"
            ]
          },
          {
            "oat": [
              "events:read",
              "events:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by external customer ID."
            },
            "description": "Filter by external customer ID."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query",
              "description": "Query to filter event types by name or label."
            },
            "description": "Query to filter event types by name or label."
          },
          {
            "name": "root_events",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "title": "Root Events Filter",
              "description": "When true, only return event types with root events (parent_id IS NULL).",
              "default": false
            },
            "description": "When true, only return event types with root events (parent_id IS NULL)."
          },
          {
            "name": "parent_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "ParentID Filter",
              "description": "Filter by specific parent event ID."
            },
            "description": "Filter by specific parent event ID."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/EventSource"
                },
                {
                  "type": "null"
                }
              ],
              "title": "EventSource Filter",
              "description": "Filter by event source (system or user)."
            },
            "description": "Filter by event source (system or user)."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventTypesSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-last_seen"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_EventTypeWithStats_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "event-types",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/EventTypeWithStats"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.event_types.iter_list(\n    root_events=False,\n    page=1,\n    limit=10,\n    sorting=['-last_seen'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.eventTypes.iterList(\n  {\n    \"root_events\": false,\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-last_seen\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/event-types/{id}": {
      "patch": {
        "tags": [
          "event-types",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Event Type",
        "description": "Update an event type's label.\n\n**Scopes**: `events:write`",
        "operationId": "event-types:update",
        "security": [
          {
            "oidc": [
              "events:write"
            ]
          },
          {
            "pat": [
              "events:write"
            ]
          },
          {
            "oat": [
              "events:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The event type ID.",
              "title": "Id"
            },
            "description": "The event type ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventTypeUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventType"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "event-types",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.event_types.update(\n    '00000000-0000-4000-8000-000000000000',\n    label='string',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.eventTypes.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"label\": \"string\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/meters/": {
      "get": {
        "tags": [
          "meters",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Meters",
        "description": "List meters.\n\n**Scopes**: `meters:read` `meters:write`",
        "operationId": "meters:list",
        "security": [
          {
            "oidc": [
              "meters:read",
              "meters:write"
            ]
          },
          {
            "pat": [
              "meters:read",
              "meters:write"
            ]
          },
          {
            "oat": [
              "meters:read",
              "meters:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by name.",
              "title": "Query"
            },
            "description": "Filter by name."
          },
          {
            "name": "is_archived",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on archived meters.",
              "title": "Is Archived"
            },
            "description": "Filter on archived meters."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MeterSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "name"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "schema": {
              "$ref": "#/components/schemas/MetadataQuery"
            },
            "description": "Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Meter_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "meters",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Meter"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.meters.iter_list(\n    page=1,\n    limit=10,\n    sorting=['name'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.meters.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"name\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      },
      "post": {
        "tags": [
          "meters",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Create Meter",
        "description": "Create a meter.\n\n**Scopes**: `meters:write`",
        "operationId": "meters:create",
        "security": [
          {
            "oidc": [
              "meters:write"
            ]
          },
          {
            "pat": [
              "meters:write"
            ]
          },
          {
            "oat": [
              "meters:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeterCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Meter created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meter"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "meters",
        "x-speakeasy-name-override": "create",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.meters.create(\n    name='string',\n    filter={'conjunction': 'and',\n     'clauses': [{'property': 'string',\n                  'operator': 'eq',\n                  'value': 'string'}]},\n    aggregation={'func': 'count'},\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.meters.create(\n  {\n    \"name\": \"string\",\n    \"filter\": {\n      \"conjunction\": \"and\",\n      \"clauses\": [\n        {\n          \"property\": \"string\",\n          \"operator\": \"eq\",\n          \"value\": \"string\"\n        }\n      ]\n    },\n    \"aggregation\": {\n      \"func\": \"count\"\n    }\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/meters/{id}": {
      "get": {
        "tags": [
          "meters",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Meter",
        "description": "Get a meter by ID.\n\n**Scopes**: `meters:read` `meters:write`",
        "operationId": "meters:get",
        "security": [
          {
            "oidc": [
              "meters:read",
              "meters:write"
            ]
          },
          {
            "pat": [
              "meters:read",
              "meters:write"
            ]
          },
          {
            "oat": [
              "meters:read",
              "meters:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The meter ID.",
              "title": "Id"
            },
            "description": "The meter ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meter"
                }
              }
            }
          },
          "404": {
            "description": "Meter not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-polar-cli-preview": {
          "fields": [
            {
              "key": "id",
              "label": "ID"
            },
            {
              "key": "name",
              "label": "Name"
            },
            {
              "key": "unit",
              "label": "Unit"
            }
          ]
        },
        "x-speakeasy-group": "meters",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.meters.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.meters.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "meters",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Update Meter",
        "description": "Update a meter.\n\n**Scopes**: `meters:write`",
        "operationId": "meters:update",
        "security": [
          {
            "oidc": [
              "meters:write"
            ]
          },
          {
            "pat": [
              "meters:write"
            ]
          },
          {
            "oat": [
              "meters:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The meter ID.",
              "title": "Id"
            },
            "description": "The meter ID."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeterUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Meter updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meter"
                }
              }
            }
          },
          "404": {
            "description": "Meter not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "meters",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.meters.update(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.meters.update(\n  \"00000000-0000-4000-8000-000000000000\",\n  {},\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/meters/{id}/quantities": {
      "get": {
        "tags": [
          "meters",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Meter Quantities",
        "description": "Get quantities of a meter over a time period.\n\n**Scopes**: `meters:read` `meters:write`",
        "operationId": "meters:quantities",
        "security": [
          {
            "oidc": [
              "meters:read",
              "meters:write"
            ]
          },
          {
            "pat": [
              "meters:read",
              "meters:write"
            ]
          },
          {
            "oat": [
              "meters:read",
              "meters:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The meter ID.",
              "title": "Id"
            },
            "description": "The meter ID."
          },
          {
            "name": "start_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Start timestamp.",
              "title": "Start Timestamp"
            },
            "description": "Start timestamp."
          },
          {
            "name": "end_timestamp",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "End timestamp.",
              "title": "End Timestamp"
            },
            "description": "End timestamp."
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TimeInterval",
              "description": "Interval between two timestamps."
            },
            "description": "Interval between two timestamps."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Timezone to use for the timestamps. Default is UTC.",
              "enum": [
                "Africa/Abidjan",
                "Africa/Accra",
                "Africa/Addis_Ababa",
                "Africa/Algiers",
                "Africa/Asmara",
                "Africa/Asmera",
                "Africa/Bamako",
                "Africa/Bangui",
                "Africa/Banjul",
                "Africa/Bissau",
                "Africa/Blantyre",
                "Africa/Brazzaville",
                "Africa/Bujumbura",
                "Africa/Cairo",
                "Africa/Casablanca",
                "Africa/Ceuta",
                "Africa/Conakry",
                "Africa/Dakar",
                "Africa/Dar_es_Salaam",
                "Africa/Djibouti",
                "Africa/Douala",
                "Africa/El_Aaiun",
                "Africa/Freetown",
                "Africa/Gaborone",
                "Africa/Harare",
                "Africa/Johannesburg",
                "Africa/Juba",
                "Africa/Kampala",
                "Africa/Khartoum",
                "Africa/Kigali",
                "Africa/Kinshasa",
                "Africa/Lagos",
                "Africa/Libreville",
                "Africa/Lome",
                "Africa/Luanda",
                "Africa/Lubumbashi",
                "Africa/Lusaka",
                "Africa/Malabo",
                "Africa/Maputo",
                "Africa/Maseru",
                "Africa/Mbabane",
                "Africa/Mogadishu",
                "Africa/Monrovia",
                "Africa/Nairobi",
                "Africa/Ndjamena",
                "Africa/Niamey",
                "Africa/Nouakchott",
                "Africa/Ouagadougou",
                "Africa/Porto-Novo",
                "Africa/Sao_Tome",
                "Africa/Timbuktu",
                "Africa/Tripoli",
                "Africa/Tunis",
                "Africa/Windhoek",
                "America/Adak",
                "America/Anchorage",
                "America/Anguilla",
                "America/Antigua",
                "America/Araguaina",
                "America/Argentina/Buenos_Aires",
                "America/Argentina/Catamarca",
                "America/Argentina/ComodRivadavia",
                "America/Argentina/Cordoba",
                "America/Argentina/Jujuy",
                "America/Argentina/La_Rioja",
                "America/Argentina/Mendoza",
                "America/Argentina/Rio_Gallegos",
                "America/Argentina/Salta",
                "America/Argentina/San_Juan",
                "America/Argentina/San_Luis",
                "America/Argentina/Tucuman",
                "America/Argentina/Ushuaia",
                "America/Aruba",
                "America/Asuncion",
                "America/Atikokan",
                "America/Atka",
                "America/Bahia",
                "America/Bahia_Banderas",
                "America/Barbados",
                "America/Belem",
                "America/Belize",
                "America/Blanc-Sablon",
                "America/Boa_Vista",
                "America/Bogota",
                "America/Boise",
                "America/Buenos_Aires",
                "America/Cambridge_Bay",
                "America/Campo_Grande",
                "America/Cancun",
                "America/Caracas",
                "America/Catamarca",
                "America/Cayenne",
                "America/Cayman",
                "America/Chicago",
                "America/Chihuahua",
                "America/Ciudad_Juarez",
                "America/Coral_Harbour",
                "America/Cordoba",
                "America/Costa_Rica",
                "America/Coyhaique",
                "America/Creston",
                "America/Cuiaba",
                "America/Curacao",
                "America/Danmarkshavn",
                "America/Dawson",
                "America/Dawson_Creek",
                "America/Denver",
                "America/Detroit",
                "America/Dominica",
                "America/Edmonton",
                "America/Eirunepe",
                "America/El_Salvador",
                "America/Ensenada",
                "America/Fort_Nelson",
                "America/Fort_Wayne",
                "America/Fortaleza",
                "America/Glace_Bay",
                "America/Godthab",
                "America/Goose_Bay",
                "America/Grand_Turk",
                "America/Grenada",
                "America/Guadeloupe",
                "America/Guatemala",
                "America/Guayaquil",
                "America/Guyana",
                "America/Halifax",
                "America/Havana",
                "America/Hermosillo",
                "America/Indiana/Indianapolis",
                "America/Indiana/Knox",
                "America/Indiana/Marengo",
                "America/Indiana/Petersburg",
                "America/Indiana/Tell_City",
                "America/Indiana/Vevay",
                "America/Indiana/Vincennes",
                "America/Indiana/Winamac",
                "America/Indianapolis",
                "America/Inuvik",
                "America/Iqaluit",
                "America/Jamaica",
                "America/Jujuy",
                "America/Juneau",
                "America/Kentucky/Louisville",
                "America/Kentucky/Monticello",
                "America/Knox_IN",
                "America/Kralendijk",
                "America/La_Paz",
                "America/Lima",
                "America/Los_Angeles",
                "America/Louisville",
                "America/Lower_Princes",
                "America/Maceio",
                "America/Managua",
                "America/Manaus",
                "America/Marigot",
                "America/Martinique",
                "America/Matamoros",
                "America/Mazatlan",
                "America/Mendoza",
                "America/Menominee",
                "America/Merida",
                "America/Metlakatla",
                "America/Mexico_City",
                "America/Miquelon",
                "America/Moncton",
                "America/Monterrey",
                "America/Montevideo",
                "America/Montreal",
                "America/Montserrat",
                "America/Nassau",
                "America/New_York",
                "America/Nipigon",
                "America/Nome",
                "America/Noronha",
                "America/North_Dakota/Beulah",
                "America/North_Dakota/Center",
                "America/North_Dakota/New_Salem",
                "America/Nuuk",
                "America/Ojinaga",
                "America/Panama",
                "America/Pangnirtung",
                "America/Paramaribo",
                "America/Phoenix",
                "America/Port-au-Prince",
                "America/Port_of_Spain",
                "America/Porto_Acre",
                "America/Porto_Velho",
                "America/Puerto_Rico",
                "America/Punta_Arenas",
                "America/Rainy_River",
                "America/Rankin_Inlet",
                "America/Recife",
                "America/Regina",
                "America/Resolute",
                "America/Rio_Branco",
                "America/Rosario",
                "America/Santa_Isabel",
                "America/Santarem",
                "America/Santiago",
                "America/Santo_Domingo",
                "America/Sao_Paulo",
                "America/Scoresbysund",
                "America/Shiprock",
                "America/Sitka",
                "America/St_Barthelemy",
                "America/St_Johns",
                "America/St_Kitts",
                "America/St_Lucia",
                "America/St_Thomas",
                "America/St_Vincent",
                "America/Swift_Current",
                "America/Tegucigalpa",
                "America/Thule",
                "America/Thunder_Bay",
                "America/Tijuana",
                "America/Toronto",
                "America/Tortola",
                "America/Vancouver",
                "America/Virgin",
                "America/Whitehorse",
                "America/Winnipeg",
                "America/Yakutat",
                "America/Yellowknife",
                "Antarctica/Casey",
                "Antarctica/Davis",
                "Antarctica/DumontDUrville",
                "Antarctica/Macquarie",
                "Antarctica/Mawson",
                "Antarctica/McMurdo",
                "Antarctica/Palmer",
                "Antarctica/Rothera",
                "Antarctica/South_Pole",
                "Antarctica/Syowa",
                "Antarctica/Troll",
                "Antarctica/Vostok",
                "Arctic/Longyearbyen",
                "Asia/Aden",
                "Asia/Almaty",
                "Asia/Amman",
                "Asia/Anadyr",
                "Asia/Aqtau",
                "Asia/Aqtobe",
                "Asia/Ashgabat",
                "Asia/Ashkhabad",
                "Asia/Atyrau",
                "Asia/Baghdad",
                "Asia/Bahrain",
                "Asia/Baku",
                "Asia/Bangkok",
                "Asia/Barnaul",
                "Asia/Beirut",
                "Asia/Bishkek",
                "Asia/Brunei",
                "Asia/Calcutta",
                "Asia/Chita",
                "Asia/Choibalsan",
                "Asia/Chongqing",
                "Asia/Chungking",
                "Asia/Colombo",
                "Asia/Dacca",
                "Asia/Damascus",
                "Asia/Dhaka",
                "Asia/Dili",
                "Asia/Dubai",
                "Asia/Dushanbe",
                "Asia/Famagusta",
                "Asia/Gaza",
                "Asia/Harbin",
                "Asia/Hebron",
                "Asia/Ho_Chi_Minh",
                "Asia/Hong_Kong",
                "Asia/Hovd",
                "Asia/Irkutsk",
                "Asia/Istanbul",
                "Asia/Jakarta",
                "Asia/Jayapura",
                "Asia/Jerusalem",
                "Asia/Kabul",
                "Asia/Kamchatka",
                "Asia/Karachi",
                "Asia/Kashgar",
                "Asia/Kathmandu",
                "Asia/Katmandu",
                "Asia/Khandyga",
                "Asia/Kolkata",
                "Asia/Krasnoyarsk",
                "Asia/Kuala_Lumpur",
                "Asia/Kuching",
                "Asia/Kuwait",
                "Asia/Macao",
                "Asia/Macau",
                "Asia/Magadan",
                "Asia/Makassar",
                "Asia/Manila",
                "Asia/Muscat",
                "Asia/Nicosia",
                "Asia/Novokuznetsk",
                "Asia/Novosibirsk",
                "Asia/Omsk",
                "Asia/Oral",
                "Asia/Phnom_Penh",
                "Asia/Pontianak",
                "Asia/Pyongyang",
                "Asia/Qatar",
                "Asia/Qostanay",
                "Asia/Qyzylorda",
                "Asia/Rangoon",
                "Asia/Riyadh",
                "Asia/Saigon",
                "Asia/Sakhalin",
                "Asia/Samarkand",
                "Asia/Seoul",
                "Asia/Shanghai",
                "Asia/Singapore",
                "Asia/Srednekolymsk",
                "Asia/Taipei",
                "Asia/Tashkent",
                "Asia/Tbilisi",
                "Asia/Tehran",
                "Asia/Tel_Aviv",
                "Asia/Thimbu",
                "Asia/Thimphu",
                "Asia/Tokyo",
                "Asia/Tomsk",
                "Asia/Ujung_Pandang",
                "Asia/Ulaanbaatar",
                "Asia/Ulan_Bator",
                "Asia/Urumqi",
                "Asia/Ust-Nera",
                "Asia/Vientiane",
                "Asia/Vladivostok",
                "Asia/Yakutsk",
                "Asia/Yangon",
                "Asia/Yekaterinburg",
                "Asia/Yerevan",
                "Atlantic/Azores",
                "Atlantic/Bermuda",
                "Atlantic/Canary",
                "Atlantic/Cape_Verde",
                "Atlantic/Faeroe",
                "Atlantic/Faroe",
                "Atlantic/Jan_Mayen",
                "Atlantic/Madeira",
                "Atlantic/Reykjavik",
                "Atlantic/South_Georgia",
                "Atlantic/St_Helena",
                "Atlantic/Stanley",
                "Australia/ACT",
                "Australia/Adelaide",
                "Australia/Brisbane",
                "Australia/Broken_Hill",
                "Australia/Canberra",
                "Australia/Currie",
                "Australia/Darwin",
                "Australia/Eucla",
                "Australia/Hobart",
                "Australia/LHI",
                "Australia/Lindeman",
                "Australia/Lord_Howe",
                "Australia/Melbourne",
                "Australia/NSW",
                "Australia/North",
                "Australia/Perth",
                "Australia/Queensland",
                "Australia/South",
                "Australia/Sydney",
                "Australia/Tasmania",
                "Australia/Victoria",
                "Australia/West",
                "Australia/Yancowinna",
                "Brazil/Acre",
                "Brazil/DeNoronha",
                "Brazil/East",
                "Brazil/West",
                "CET",
                "CST6CDT",
                "Canada/Atlantic",
                "Canada/Central",
                "Canada/Eastern",
                "Canada/Mountain",
                "Canada/Newfoundland",
                "Canada/Pacific",
                "Canada/Saskatchewan",
                "Canada/Yukon",
                "Chile/Continental",
                "Chile/EasterIsland",
                "Cuba",
                "EET",
                "EST",
                "EST5EDT",
                "Egypt",
                "Eire",
                "Etc/GMT",
                "Etc/GMT+0",
                "Etc/GMT+1",
                "Etc/GMT+10",
                "Etc/GMT+11",
                "Etc/GMT+12",
                "Etc/GMT+2",
                "Etc/GMT+3",
                "Etc/GMT+4",
                "Etc/GMT+5",
                "Etc/GMT+6",
                "Etc/GMT+7",
                "Etc/GMT+8",
                "Etc/GMT+9",
                "Etc/GMT-0",
                "Etc/GMT-1",
                "Etc/GMT-10",
                "Etc/GMT-11",
                "Etc/GMT-12",
                "Etc/GMT-13",
                "Etc/GMT-14",
                "Etc/GMT-2",
                "Etc/GMT-3",
                "Etc/GMT-4",
                "Etc/GMT-5",
                "Etc/GMT-6",
                "Etc/GMT-7",
                "Etc/GMT-8",
                "Etc/GMT-9",
                "Etc/GMT0",
                "Etc/Greenwich",
                "Etc/UCT",
                "Etc/UTC",
                "Etc/Universal",
                "Etc/Zulu",
                "Europe/Amsterdam",
                "Europe/Andorra",
                "Europe/Astrakhan",
                "Europe/Athens",
                "Europe/Belfast",
                "Europe/Belgrade",
                "Europe/Berlin",
                "Europe/Bratislava",
                "Europe/Brussels",
                "Europe/Bucharest",
                "Europe/Budapest",
                "Europe/Busingen",
                "Europe/Chisinau",
                "Europe/Copenhagen",
                "Europe/Dublin",
                "Europe/Gibraltar",
                "Europe/Guernsey",
                "Europe/Helsinki",
                "Europe/Isle_of_Man",
                "Europe/Istanbul",
                "Europe/Jersey",
                "Europe/Kaliningrad",
                "Europe/Kiev",
                "Europe/Kirov",
                "Europe/Kyiv",
                "Europe/Lisbon",
                "Europe/Ljubljana",
                "Europe/London",
                "Europe/Luxembourg",
                "Europe/Madrid",
                "Europe/Malta",
                "Europe/Mariehamn",
                "Europe/Minsk",
                "Europe/Monaco",
                "Europe/Moscow",
                "Europe/Nicosia",
                "Europe/Oslo",
                "Europe/Paris",
                "Europe/Podgorica",
                "Europe/Prague",
                "Europe/Riga",
                "Europe/Rome",
                "Europe/Samara",
                "Europe/San_Marino",
                "Europe/Sarajevo",
                "Europe/Saratov",
                "Europe/Simferopol",
                "Europe/Skopje",
                "Europe/Sofia",
                "Europe/Stockholm",
                "Europe/Tallinn",
                "Europe/Tirane",
                "Europe/Tiraspol",
                "Europe/Ulyanovsk",
                "Europe/Uzhgorod",
                "Europe/Vaduz",
                "Europe/Vatican",
                "Europe/Vienna",
                "Europe/Vilnius",
                "Europe/Volgograd",
                "Europe/Warsaw",
                "Europe/Zagreb",
                "Europe/Zaporozhye",
                "Europe/Zurich",
                "Factory",
                "GB",
                "GB-Eire",
                "GMT",
                "GMT+0",
                "GMT-0",
                "GMT0",
                "Greenwich",
                "HST",
                "Hongkong",
                "Iceland",
                "Indian/Antananarivo",
                "Indian/Chagos",
                "Indian/Christmas",
                "Indian/Cocos",
                "Indian/Comoro",
                "Indian/Kerguelen",
                "Indian/Mahe",
                "Indian/Maldives",
                "Indian/Mauritius",
                "Indian/Mayotte",
                "Indian/Reunion",
                "Iran",
                "Israel",
                "Jamaica",
                "Japan",
                "Kwajalein",
                "Libya",
                "MET",
                "MST",
                "MST7MDT",
                "Mexico/BajaNorte",
                "Mexico/BajaSur",
                "Mexico/General",
                "NZ",
                "NZ-CHAT",
                "Navajo",
                "PRC",
                "PST8PDT",
                "Pacific/Apia",
                "Pacific/Auckland",
                "Pacific/Bougainville",
                "Pacific/Chatham",
                "Pacific/Chuuk",
                "Pacific/Easter",
                "Pacific/Efate",
                "Pacific/Enderbury",
                "Pacific/Fakaofo",
                "Pacific/Fiji",
                "Pacific/Funafuti",
                "Pacific/Galapagos",
                "Pacific/Gambier",
                "Pacific/Guadalcanal",
                "Pacific/Guam",
                "Pacific/Honolulu",
                "Pacific/Johnston",
                "Pacific/Kanton",
                "Pacific/Kiritimati",
                "Pacific/Kosrae",
                "Pacific/Kwajalein",
                "Pacific/Majuro",
                "Pacific/Marquesas",
                "Pacific/Midway",
                "Pacific/Nauru",
                "Pacific/Niue",
                "Pacific/Norfolk",
                "Pacific/Noumea",
                "Pacific/Pago_Pago",
                "Pacific/Palau",
                "Pacific/Pitcairn",
                "Pacific/Pohnpei",
                "Pacific/Ponape",
                "Pacific/Port_Moresby",
                "Pacific/Rarotonga",
                "Pacific/Saipan",
                "Pacific/Samoa",
                "Pacific/Tahiti",
                "Pacific/Tarawa",
                "Pacific/Tongatapu",
                "Pacific/Truk",
                "Pacific/Wake",
                "Pacific/Wallis",
                "Pacific/Yap",
                "Poland",
                "Portugal",
                "ROC",
                "ROK",
                "Singapore",
                "Turkey",
                "UCT",
                "US/Alaska",
                "US/Aleutian",
                "US/Arizona",
                "US/Central",
                "US/East-Indiana",
                "US/Eastern",
                "US/Hawaii",
                "US/Indiana-Starke",
                "US/Michigan",
                "US/Mountain",
                "US/Pacific",
                "US/Samoa",
                "UTC",
                "Universal",
                "W-SU",
                "WET",
                "Zulu"
              ],
              "default": "UTC",
              "title": "Timezone"
            },
            "description": "Timezone to use for the timestamps. Default is UTC."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by external customer ID."
            },
            "description": "Filter by external customer ID."
          },
          {
            "name": "customer_aggregation_function",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AggregationFunction"
                },
                {
                  "type": "null"
                }
              ],
              "description": "If set, will first compute the quantities per customer before aggregating them using the given function. If not set, the quantities will be aggregated across all events.",
              "title": "Customer Aggregation Function"
            },
            "description": "If set, will first compute the quantities per customer before aggregating them using the given function. If not set, the quantities will be aggregated across all events."
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "schema": {
              "$ref": "#/components/schemas/MetadataQuery"
            },
            "description": "Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterQuantities"
                }
              }
            }
          },
          "404": {
            "description": "Meter not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "meters",
        "x-speakeasy-name-override": "quantities",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.meters.quantities(\n    '00000000-0000-4000-8000-000000000000',\n    start_timestamp='2026-01-01T00:00:00Z',\n    end_timestamp='2026-01-01T00:00:00Z',\n    interval='year',\n    timezone='UTC',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.meters.quantities(\n  \"00000000-0000-4000-8000-000000000000\",\n  {\n    \"start_timestamp\": \"2026-01-01T00:00:00Z\",\n    \"end_timestamp\": \"2026-01-01T00:00:00Z\",\n    \"interval\": \"year\",\n    \"timezone\": \"UTC\"\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/customer-meters/": {
      "get": {
        "tags": [
          "customer_meters",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Customer Meters",
        "description": "List customer meters.\n\n**Scopes**: `customer_meters:read`",
        "operationId": "customer_meters:list",
        "security": [
          {
            "oidc": [
              "customer_meters:read"
            ]
          },
          {
            "pat": [
              "customer_meters:read"
            ]
          },
          {
            "oat": [
              "customer_meters:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "external_customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "ExternalCustomerID Filter",
              "description": "Filter by external customer ID."
            },
            "description": "Filter by external customer ID."
          },
          {
            "name": "meter_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The meter ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The meter ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "MeterID Filter",
              "description": "Filter by meter ID."
            },
            "description": "Filter by meter ID."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerMeterSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-modified_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_CustomerMeter_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "customer_meters",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerMeter"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.customer_meters.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-modified_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.customerMeters.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-modified_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customer-meters/{id}": {
      "get": {
        "tags": [
          "customer_meters",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Customer Meter",
        "description": "Get a customer meter by ID.\n\n**Scopes**: `customer_meters:read`",
        "operationId": "customer_meters:get",
        "security": [
          {
            "oidc": [
              "customer_meters:read"
            ]
          },
          {
            "pat": [
              "customer_meters:read"
            ]
          },
          {
            "oat": [
              "customer_meters:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The customer meter ID.",
              "title": "Id"
            },
            "description": "The customer meter ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerMeter"
                }
              }
            }
          },
          "404": {
            "description": "Customer meter not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "customer_meters",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customer_meters.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.customerMeters.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/payments/": {
      "get": {
        "tags": [
          "payments",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "List Payments",
        "description": "List payments.\n\n**Scopes**: `payments:read`",
        "operationId": "payments:list",
        "security": [
          {
            "oidc": [
              "payments:read"
            ]
          },
          {
            "pat": [
              "payments:read"
            ]
          },
          {
            "oat": [
              "payments:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "examples": [
                    "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                  ],
                  "description": "The organization ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "examples": [
                      "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                    ],
                    "description": "The organization ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrganizationID Filter",
              "description": "Filter by organization ID."
            },
            "description": "Filter by organization ID."
          },
          {
            "name": "checkout_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CheckoutID Filter",
              "description": "Filter by checkout ID."
            },
            "description": "Filter by checkout ID."
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "OrderID Filter",
              "description": "Filter by order ID."
            },
            "description": "Filter by order ID."
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid4",
                  "description": "The customer ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The customer ID."
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerID Filter",
              "description": "Filter by customer ID."
            },
            "description": "Filter by customer ID."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PaymentStatus"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter",
              "description": "Filter by payment status."
            },
            "description": "Filter by payment status."
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Method Filter",
              "description": "Filter by payment method."
            },
            "description": "Filter by payment method."
          },
          {
            "name": "customer_email",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "CustomerEmail Filter",
              "description": "Filter by customer email."
            },
            "description": "Filter by customer email."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Page number, defaults to 1.",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number, defaults to 1."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Size of a page, defaults to 10. Maximum is 100.",
              "default": 10,
              "title": "Limit"
            },
            "description": "Size of a page, defaults to 10. Maximum is 100."
          },
          {
            "name": "sorting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentSortProperty"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.",
              "default": [
                "-created_at"
              ],
              "title": "Sorting"
            },
            "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Payment_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-pagination": {
          "type": "offsetLimit",
          "inputs": [
            {
              "name": "page",
              "in": "parameters",
              "type": "page"
            },
            {
              "name": "limit",
              "in": "parameters",
              "type": "limit"
            }
          ],
          "outputs": {
            "results": "$.items",
            "numPages": "$.pagination.max_page"
          }
        },
        "x-speakeasy-group": "payments",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Payment"
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.payments.iter_list(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nfor await (const item of polar.payments.iterList(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/payments/{id}": {
      "get": {
        "tags": [
          "payments",
          "public",
          "mcp",
          "cli"
        ],
        "summary": "Get Payment",
        "description": "Get a payment by ID.\n\n**Scopes**: `payments:read`",
        "operationId": "payments:get",
        "security": [
          {
            "oidc": [
              "payments:read"
            ]
          },
          {
            "pat": [
              "payments:read"
            ]
          },
          {
            "oat": [
              "payments:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "description": "The payment ID.",
              "title": "Id"
            },
            "description": "The payment ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "404": {
            "description": "Payment not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFound"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-polar-allowed-subjects": [
          "Organization",
          "User"
        ],
        "x-speakeasy-group": "payments",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "python",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.payments.get(\n    '00000000-0000-4000-8000-000000000000',\n)\nprint(response)\n"
          },
          {
            "lang": "typescript",
            "source": "import { createPolar } from \"@polar-sh/sdk/2026-04\";\n\nconst polar = createPolar({\n  accessToken: \"polar_oat_xxx\",\n});\n\nconst response = await polar.payments.get(\n  \"00000000-0000-4000-8000-000000000000\",\n);\nconsole.log(response);\n"
          }
        ]
      }
    }
  },
  "webhooks": {
    "checkout.created": {
      "post": {
        "summary": "checkout_created",
        "description": "Sent when a new checkout is created.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointcheckout_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCheckoutCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "checkout.created",
            "sidebarTitle": "checkout.created"
          }
        }
      }
    },
    "checkout.updated": {
      "post": {
        "summary": "checkout_updated",
        "description": "Sent when a checkout is updated.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointcheckout_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCheckoutUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "checkout.updated",
            "sidebarTitle": "checkout.updated"
          }
        }
      }
    },
    "checkout.expired": {
      "post": {
        "summary": "checkout_expired",
        "description": "Sent when a checkout expires.\n\nThis event fires when a checkout reaches its expiration time without being completed.\nDevelopers can use this to send reminder emails or track checkout abandonment.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointcheckout_expired_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCheckoutExpiredPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "checkout.expired",
            "sidebarTitle": "checkout.expired"
          }
        }
      }
    },
    "customer.created": {
      "post": {
        "summary": "customer_created",
        "description": "Sent when a new customer is created.\n\nA customer can be created:\n\n* After a successful checkout.\n* Programmatically via the API.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointcustomer_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCustomerCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "customer.created",
            "sidebarTitle": "customer.created"
          }
        }
      }
    },
    "customer.updated": {
      "post": {
        "summary": "customer_updated",
        "description": "Sent when a customer is updated.\n\nThis event is fired when the customer details are updated.\n\nIf you want to be notified when a customer subscription or benefit state changes, you should listen to the `customer_state_changed` event.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointcustomer_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCustomerUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "customer.updated",
            "sidebarTitle": "customer.updated"
          }
        }
      }
    },
    "customer.deleted": {
      "post": {
        "summary": "customer_deleted",
        "description": "Sent when a customer is deleted.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointcustomer_deleted_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCustomerDeletedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "customer.deleted",
            "sidebarTitle": "customer.deleted"
          }
        }
      }
    },
    "customer.state_changed": {
      "post": {
        "summary": "customer_state_changed",
        "description": "Sent when a customer state has changed.\n\nIt's triggered when:\n\n* Customer is created, updated or deleted.\n* A subscription is created or updated.\n* A benefit is granted or revoked.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointcustomer_state_changed_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCustomerStateChangedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "customer.state_changed",
            "sidebarTitle": "customer.state_changed"
          }
        }
      }
    },
    "customer_seat.assigned": {
      "post": {
        "summary": "customer_seat_assigned",
        "description": "Sent when a new customer seat is assigned.\n\nThis event is triggered when a seat is assigned to a customer by the organization.\nThe customer will receive an invitation email to claim the seat.",
        "operationId": "_endpointcustomer_seat_assigned_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCustomerSeatAssignedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "customer_seat.assigned",
            "sidebarTitle": "customer_seat.assigned"
          }
        }
      }
    },
    "customer_seat.claimed": {
      "post": {
        "summary": "customer_seat_claimed",
        "description": "Sent when a customer seat is claimed.\n\nThis event is triggered when a customer accepts the seat invitation and claims their access.",
        "operationId": "_endpointcustomer_seat_claimed_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCustomerSeatClaimedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "customer_seat.claimed",
            "sidebarTitle": "customer_seat.claimed"
          }
        }
      }
    },
    "customer_seat.revoked": {
      "post": {
        "summary": "customer_seat_revoked",
        "description": "Sent when a customer seat is revoked.\n\nThis event is triggered when access to a seat is revoked, either manually by the organization or automatically when a subscription is canceled.",
        "operationId": "_endpointcustomer_seat_revoked_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCustomerSeatRevokedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "customer_seat.revoked",
            "sidebarTitle": "customer_seat.revoked"
          }
        }
      }
    },
    "member.created": {
      "post": {
        "summary": "member_created",
        "description": "Sent when a new member is created.\n\nA member represents an individual within a customer (team).\nThis event is triggered when a member is added to a customer,\neither programmatically via the API or when an owner is automatically\ncreated for a new customer.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointmember_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookMemberCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "member.created",
            "sidebarTitle": "member.created"
          }
        }
      }
    },
    "member.updated": {
      "post": {
        "summary": "member_updated",
        "description": "Sent when a member is updated.\n\nThis event is triggered when member details are updated,\nsuch as their name or role within the customer.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointmember_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookMemberUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "member.updated",
            "sidebarTitle": "member.updated"
          }
        }
      }
    },
    "member.deleted": {
      "post": {
        "summary": "member_deleted",
        "description": "Sent when a member is deleted.\n\nThis event is triggered when a member is removed from a customer.\nAny active seats assigned to the member will be automatically revoked.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointmember_deleted_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookMemberDeletedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "member.deleted",
            "sidebarTitle": "member.deleted"
          }
        }
      }
    },
    "order.created": {
      "post": {
        "summary": "order_created",
        "description": "Sent when a new order is created.\n\nA new order is created when:\n\n* A customer purchases a one-time product. In this case, `billing_reason` is set to `purchase`.\n* A customer starts a subscription. In this case, `billing_reason` is set to `subscription_create`.\n* A subscription is renewed. In this case, `billing_reason` is set to `subscription_cycle`.\n* A subscription is upgraded or downgraded with an immediate proration invoice. In this case, `billing_reason` is set to `subscription_update`.\n\n> [!WARNING]\n> The order might not be paid yet, so the `status` field might be `pending`.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointorder_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrderCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "order.created",
            "sidebarTitle": "order.created"
          }
        }
      }
    },
    "order.updated": {
      "post": {
        "summary": "order_updated",
        "description": "Sent when an order is updated.\n\nAn order is updated when:\n\n* Its status changes, e.g. from `pending` to `paid`.\n* It's refunded, partially or fully.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointorder_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrderUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "order.updated",
            "sidebarTitle": "order.updated"
          }
        }
      }
    },
    "order.paid": {
      "post": {
        "summary": "order_paid",
        "description": "Sent when an order is paid.\n\nWhen you receive this event, the order is fully processed and payment has been received.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointorder_paid_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrderPaidPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "order.paid",
            "sidebarTitle": "order.paid"
          }
        }
      }
    },
    "order.refunded": {
      "post": {
        "summary": "order_refunded",
        "description": "Sent when an order is fully or partially refunded.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointorder_refunded_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrderRefundedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "order.refunded",
            "sidebarTitle": "order.refunded"
          }
        }
      }
    },
    "subscription.created": {
      "post": {
        "summary": "subscription_created",
        "description": "Sent when a new subscription is created.\n\nWhen this event occurs, the subscription `status` might not be `active` yet, as we can still have to wait for the first payment to be processed.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointsubscription_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.created",
            "sidebarTitle": "subscription.created"
          }
        }
      }
    },
    "subscription.updated": {
      "post": {
        "summary": "subscription_updated",
        "description": "Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, `subscription.past_due`, and `subscription.revoked`.\n\nTo listen specifically for renewals, listen to `subscription.cycled`.\n\n**Discord & Slack support:** On cancellation, past due, and revocation. Renewals are skipped.",
        "operationId": "_endpointsubscription_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.updated",
            "sidebarTitle": "subscription.updated"
          }
        }
      }
    },
    "subscription.active": {
      "post": {
        "summary": "subscription_active",
        "description": "Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointsubscription_active_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionActivePayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.active",
            "sidebarTitle": "subscription.active"
          }
        }
      }
    },
    "subscription.canceled": {
      "post": {
        "summary": "subscription_canceled",
        "description": "Sent when a subscription is canceled.\nCustomers might still have access until the end of the current period.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointsubscription_canceled_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionCanceledPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.canceled",
            "sidebarTitle": "subscription.canceled"
          }
        }
      }
    },
    "subscription.uncanceled": {
      "post": {
        "summary": "subscription_uncanceled",
        "description": "Sent when a customer revokes a pending cancellation.\n\nWhen a customer cancels with \"at period end\", they retain access until the\nsubscription would renew. During this time, they can change their mind and\nundo the cancellation. This event is triggered when they do so.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointsubscription_uncanceled_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionUncanceledPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.uncanceled",
            "sidebarTitle": "subscription.uncanceled"
          }
        }
      }
    },
    "subscription.cycled": {
      "post": {
        "summary": "subscription_cycled",
        "description": "Sent when a subscription enters a new billing period.\n\nThe payload carries the new `current_period_start` and `current_period_end`.\nIt fires when the period rolls over, before the renewal order exists and\nregardless of whether the renewal payment succeeds \u2014 listen to `order.paid`\nif you need the payment.\n\nA trial converting to a paid subscription starts a new period, so it fires\nthere too. Read `status` to tell the two apart.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointsubscription_cycled_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionCycledPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.cycled",
            "sidebarTitle": "subscription.cycled"
          }
        }
      }
    },
    "subscription.revoked": {
      "post": {
        "summary": "subscription_revoked",
        "description": "Sent when a subscription is revoked and the user loses access immediately.\nHappens when the subscription is canceled or payment retries are exhausted (status becomes `unpaid`).\n\nFor payment failures that can still be recovered, see `subscription.past_due`.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointsubscription_revoked_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionRevokedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.revoked",
            "sidebarTitle": "subscription.revoked"
          }
        }
      }
    },
    "subscription.past_due": {
      "post": {
        "summary": "subscription_past_due",
        "description": "Sent when a subscription payment fails and the subscription enters `past_due` status.\n\nThis is a recoverable state - the customer can update their payment method to restore the subscription.\nBenefits may be revoked depending on the organization's grace period settings.\n\nIf payment retries are exhausted, a `subscription.revoked` event will be sent.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointsubscription_past_due_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionPastDuePayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.past_due",
            "sidebarTitle": "subscription.past_due"
          }
        }
      }
    },
    "subscription.paused": {
      "post": {
        "summary": "subscription_paused",
        "description": "Sent when a subscription is paused and the customer temporarily loses access.\n\nNo order is created while paused. The subscription resumes either on its\nscheduled resume date or when resumed manually, starting a new billing period.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointsubscription_paused_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionPausedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.paused",
            "sidebarTitle": "subscription.paused"
          }
        }
      }
    },
    "subscription.resumed": {
      "post": {
        "summary": "subscription_resumed",
        "description": "Sent when a paused subscription resumes, restoring the customer's access.\n\nResuming starts a new billing period and charges the customer immediately.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointsubscription_resumed_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionResumedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.resumed",
            "sidebarTitle": "subscription.resumed"
          }
        }
      }
    },
    "subscription.migrated": {
      "post": {
        "summary": "subscription_migrated",
        "description": "Sent when Polar takes over billing of a subscription migrated from another provider.\n\nThis fires at cutover, once the subscription is live on Polar. `provider`\nand `provider_subscription_id` identify the subscription on the billing\nprovider so you can correlate the two.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointsubscription_migrated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionMigratedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "subscription.migrated",
            "sidebarTitle": "subscription.migrated"
          }
        }
      }
    },
    "refund.created": {
      "post": {
        "summary": "refund_created",
        "description": "Sent when a refund is created regardless of status.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointrefund_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRefundCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "refund.created",
            "sidebarTitle": "refund.created"
          }
        }
      }
    },
    "refund.updated": {
      "post": {
        "summary": "refund_updated",
        "description": "Sent when a refund is updated.\n\n**Discord & Slack support:** Full",
        "operationId": "_endpointrefund_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRefundUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "refund.updated",
            "sidebarTitle": "refund.updated"
          }
        }
      }
    },
    "product.created": {
      "post": {
        "summary": "product_created",
        "description": "Sent when a new product is created.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointproduct_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookProductCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "product.created",
            "sidebarTitle": "product.created"
          }
        }
      }
    },
    "product.updated": {
      "post": {
        "summary": "product_updated",
        "description": "Sent when a product is updated.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointproduct_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookProductUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "product.updated",
            "sidebarTitle": "product.updated"
          }
        }
      }
    },
    "discount.created": {
      "post": {
        "summary": "discount_created",
        "description": "Sent when a new discount is created.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointdiscount_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDiscountCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "discount.created",
            "sidebarTitle": "discount.created"
          }
        }
      }
    },
    "discount.updated": {
      "post": {
        "summary": "discount_updated",
        "description": "Sent when a discount is updated.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointdiscount_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDiscountUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "discount.updated",
            "sidebarTitle": "discount.updated"
          }
        }
      }
    },
    "discount.deleted": {
      "post": {
        "summary": "discount_deleted",
        "description": "Sent when a discount is deleted.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointdiscount_deleted_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDiscountDeletedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "discount.deleted",
            "sidebarTitle": "discount.deleted"
          }
        }
      }
    },
    "organization.updated": {
      "post": {
        "summary": "organization_updated",
        "description": "Sent when a organization is updated.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointorganization_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookOrganizationUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "organization.updated",
            "sidebarTitle": "organization.updated"
          }
        }
      }
    },
    "benefit.created": {
      "post": {
        "summary": "benefit_created",
        "description": "Sent when a new benefit is created.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointbenefit_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBenefitCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "benefit.created",
            "sidebarTitle": "benefit.created"
          }
        }
      }
    },
    "benefit.updated": {
      "post": {
        "summary": "benefit_updated",
        "description": "Sent when a benefit is updated.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointbenefit_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBenefitUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "benefit.updated",
            "sidebarTitle": "benefit.updated"
          }
        }
      }
    },
    "benefit_grant.created": {
      "post": {
        "summary": "benefit_grant_created",
        "description": "Sent when a new benefit grant is created.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointbenefit_grant_created_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBenefitGrantCreatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "benefit_grant.created",
            "sidebarTitle": "benefit_grant.created"
          }
        }
      }
    },
    "benefit_grant.updated": {
      "post": {
        "summary": "benefit_grant_updated",
        "description": "Sent when a benefit grant is updated.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointbenefit_grant_updated_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBenefitGrantUpdatedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "benefit_grant.updated",
            "sidebarTitle": "benefit_grant.updated"
          }
        }
      }
    },
    "benefit_grant.cycled": {
      "post": {
        "summary": "benefit_grant_cycled",
        "description": "Sent when a benefit grant is cycled,\nmeaning the related subscription has been renewed for another period.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointbenefit_grant_cycled_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBenefitGrantCycledPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "benefit_grant.cycled",
            "sidebarTitle": "benefit_grant.cycled"
          }
        }
      }
    },
    "benefit_grant.revoked": {
      "post": {
        "summary": "benefit_grant_revoked",
        "description": "Sent when a benefit grant is revoked.\n\n**Discord & Slack support:** Basic",
        "operationId": "_endpointbenefit_grant_revoked_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBenefitGrantRevokedPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "benefit_grant.revoked",
            "sidebarTitle": "benefit_grant.revoked"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "properties": {
          "line1": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line1"
          },
          "line2": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line2"
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Postal Code"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "country": {
            "type": "string",
            "enum": [
              "AD",
              "AE",
              "AF",
              "AG",
              "AI",
              "AL",
              "AM",
              "AO",
              "AQ",
              "AR",
              "AS",
              "AT",
              "AU",
              "AW",
              "AX",
              "AZ",
              "BA",
              "BB",
              "BD",
              "BE",
              "BF",
              "BG",
              "BH",
              "BI",
              "BJ",
              "BL",
              "BM",
              "BN",
              "BO",
              "BQ",
              "BR",
              "BS",
              "BT",
              "BV",
              "BW",
              "BY",
              "BZ",
              "CA",
              "CC",
              "CD",
              "CF",
              "CG",
              "CH",
              "CI",
              "CK",
              "CL",
              "CM",
              "CN",
              "CO",
              "CR",
              "CU",
              "CV",
              "CW",
              "CX",
              "CY",
              "CZ",
              "DE",
              "DJ",
              "DK",
              "DM",
              "DO",
              "DZ",
              "EC",
              "EE",
              "EG",
              "EH",
              "ER",
              "ES",
              "ET",
              "FI",
              "FJ",
              "FK",
              "FM",
              "FO",
              "FR",
              "GA",
              "GB",
              "GD",
              "GE",
              "GF",
              "GG",
              "GH",
              "GI",
              "GL",
              "GM",
              "GN",
              "GP",
              "GQ",
              "GR",
              "GS",
              "GT",
              "GU",
              "GW",
              "GY",
              "HK",
              "HM",
              "HN",
              "HR",
              "HT",
              "HU",
              "ID",
              "IE",
              "IL",
              "IM",
              "IN",
              "IO",
              "IQ",
              "IR",
              "IS",
              "IT",
              "JE",
              "JM",
              "JO",
              "JP",
              "KE",
              "KG",
              "KH",
              "KI",
              "KM",
              "KN",
              "KP",
              "KR",
              "KW",
              "KY",
              "KZ",
              "LA",
              "LB",
              "LC",
              "LI",
              "LK",
              "LR",
              "LS",
              "LT",
              "LU",
              "LV",
              "LY",
              "MA",
              "MC",
              "MD",
              "ME",
              "MF",
              "MG",
              "MH",
              "MK",
              "ML",
              "MM",
              "MN",
              "MO",
              "MP",
              "MQ",
              "MR",
              "MS",
              "MT",
              "MU",
              "MV",
              "MW",
              "MX",
              "MY",
              "MZ",
              "NA",
              "NC",
              "NE",
              "NF",
              "NG",
              "NI",
              "NL",
              "NO",
              "NP",
              "NR",
              "NU",
              "NZ",
              "OM",
              "PA",
              "PE",
              "PF",
              "PG",
              "PH",
              "PK",
              "PL",
              "PM",
              "PN",
              "PR",
              "PS",
              "PT",
              "PW",
              "PY",
              "QA",
              "RE",
              "RO",
              "RS",
              "RU",
              "RW",
              "SA",
              "SB",
              "SC",
              "SD",
              "SE",
              "SG",
              "SH",
              "SI",
              "SJ",
              "SK",
              "SL",
              "SM",
              "SN",
              "SO",
              "SR",
              "SS",
              "ST",
              "SV",
              "SX",
              "SY",
              "SZ",
              "TC",
              "TD",
              "TF",
              "TG",
              "TH",
              "TJ",
              "TK",
              "TL",
              "TM",
              "TN",
              "TO",
              "TR",
              "TT",
              "TV",
              "TW",
              "TZ",
              "UA",
              "UG",
              "UM",
              "US",
              "UY",
              "UZ",
              "VA",
              "VC",
              "VE",
              "VG",
              "VI",
              "VN",
              "VU",
              "WF",
              "WS",
              "YE",
              "YT",
              "ZA",
              "ZM",
              "ZW"
            ],
            "title": "CountryAlpha2",
            "examples": [
              "US",
              "SE",
              "FR"
            ],
            "x-speakeasy-enums": [
              "AD",
              "AE",
              "AF",
              "AG",
              "AI",
              "AL",
              "AM",
              "AO",
              "AQ",
              "AR",
              "AS",
              "AT",
              "AU",
              "AW",
              "AX",
              "AZ",
              "BA",
              "BB",
              "BD",
              "BE",
              "BF",
              "BG",
              "BH",
              "BI",
              "BJ",
              "BL",
              "BM",
              "BN",
              "BO",
              "BQ",
              "BR",
              "BS",
              "BT",
              "BV",
              "BW",
              "BY",
              "BZ",
              "CA",
              "CC",
              "CD",
              "CF",
              "CG",
              "CH",
              "CI",
              "CK",
              "CL",
              "CM",
              "CN",
              "CO",
              "CR",
              "CU",
              "CV",
              "CW",
              "CX",
              "CY",
              "CZ",
              "DE",
              "DJ",
              "DK",
              "DM",
              "DO",
              "DZ",
              "EC",
              "EE",
              "EG",
              "EH",
              "ER",
              "ES",
              "ET",
              "FI",
              "FJ",
              "FK",
              "FM",
              "FO",
              "FR",
              "GA",
              "GB",
              "GD",
              "GE",
              "GF",
              "GG",
              "GH",
              "GI",
              "GL",
              "GM",
              "GN",
              "GP",
              "GQ",
              "GR",
              "GS",
              "GT",
              "GU",
              "GW",
              "GY",
              "HK",
              "HM",
              "HN",
              "HR",
              "HT",
              "HU",
              "ID",
              "IE",
              "IL",
              "IM",
              "IN",
              "IO",
              "IQ",
              "IR",
              "IS",
              "IT",
              "JE",
              "JM",
              "JO",
              "JP",
              "KE",
              "KG",
              "KH",
              "KI",
              "KM",
              "KN",
              "KP",
              "KR",
              "KW",
              "KY",
              "KZ",
              "LA",
              "LB",
              "LC",
              "LI",
              "LK",
              "LR",
              "LS",
              "LT",
              "LU",
              "LV",
              "LY",
              "MA",
              "MC",
              "MD",
              "ME",
              "MF",
              "MG",
              "MH",
              "MK",
              "ML",
              "MM",
              "MN",
              "MO",
              "MP",
              "MQ",
              "MR",
              "MS",
              "MT",
              "MU",
              "MV",
              "MW",
              "MX",
              "MY",
              "MZ",
              "NA",
              "NC",
              "NE",
              "NF",
              "NG",
              "NI",
              "NL",
              "NO",
              "NP",
              "NR",
              "NU",
              "NZ",
              "OM",
              "PA",
              "PE",
              "PF",
              "PG",
              "PH",
              "PK",
              "PL",
              "PM",
              "PN",
              "PR",
              "PS",
              "PT",
              "PW",
              "PY",
              "QA",
              "RE",
              "RO",
              "RS",
              "RU",
              "RW",
              "SA",
              "SB",
              "SC",
              "SD",
              "SE",
              "SG",
              "SH",
              "SI",
              "SJ",
              "SK",
              "SL",
              "SM",
              "SN",
              "SO",
              "SR",
              "SS",
              "ST",
              "SV",
              "SX",
              "SY",
              "SZ",
              "TC",
              "TD",
              "TF",
              "TG",
              "TH",
              "TJ",
              "TK",
              "TL",
              "TM",
              "TN",
              "TO",
              "TR",
              "TT",
              "TV",
              "TW",
              "TZ",
              "UA",
              "UG",
              "UM",
              "US",
              "UY",
              "UZ",
              "VA",
              "VC",
              "VE",
              "VG",
              "VI",
              "VN",
              "VU",
              "WF",
              "WS",
              "YE",
              "YT",
              "ZA",
              "ZM",
              "ZW"
            ]
          }
        },
        "type": "object",
        "required": [
          "country"
        ],
        "title": "Address"
      },
      "AddressDict": {
        "properties": {
          "line1": {
            "type": "string",
            "title": "Line1"
          },
          "line2": {
            "type": "string",
            "title": "Line2"
          },
          "postal_code": {
            "type": "string",
            "title": "Postal Code"
          },
          "city": {
            "type": "string",
            "title": "City"
          },
          "state": {
            "type": "string",
            "title": "State"
          },
          "country": {
            "type": "string",
            "title": "Country"
          }
        },
        "type": "object",
        "required": [
          "country"
        ],
        "title": "AddressDict"
      },
      "AddressInput": {
        "properties": {
          "line1": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line1"
          },
          "line2": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line2"
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Postal Code"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "country": {
            "type": "string",
            "enum": [
              "AD",
              "AE",
              "AF",
              "AG",
              "AI",
              "AL",
              "AM",
              "AO",
              "AQ",
              "AR",
              "AS",
              "AT",
              "AU",
              "AW",
              "AX",
              "AZ",
              "BA",
              "BB",
              "BD",
              "BE",
              "BF",
              "BG",
              "BH",
              "BI",
              "BJ",
              "BL",
              "BM",
              "BN",
              "BO",
              "BQ",
              "BR",
              "BS",
              "BT",
              "BV",
              "BW",
              "BY",
              "BZ",
              "CA",
              "CC",
              "CD",
              "CF",
              "CG",
              "CH",
              "CI",
              "CK",
              "CL",
              "CM",
              "CN",
              "CO",
              "CR",
              "CV",
              "CW",
              "CX",
              "CY",
              "CZ",
              "DE",
              "DJ",
              "DK",
              "DM",
              "DO",
              "DZ",
              "EC",
              "EE",
              "EG",
              "EH",
              "ER",
              "ES",
              "ET",
              "FI",
              "FJ",
              "FK",
              "FM",
              "FO",
              "FR",
              "GA",
              "GB",
              "GD",
              "GE",
              "GF",
              "GG",
              "GH",
              "GI",
              "GL",
              "GM",
              "GN",
              "GP",
              "GQ",
              "GR",
              "GS",
              "GT",
              "GU",
              "GW",
              "GY",
              "HK",
              "HM",
              "HN",
              "HR",
              "HT",
              "HU",
              "ID",
              "IE",
              "IL",
              "IM",
              "IN",
              "IO",
              "IQ",
              "IS",
              "IT",
              "JE",
              "JM",
              "JO",
              "JP",
              "KE",
              "KG",
              "KH",
              "KI",
              "KM",
              "KN",
              "KR",
              "KW",
              "KY",
              "KZ",
              "LA",
              "LB",
              "LC",
              "LI",
              "LK",
              "LR",
              "LS",
              "LT",
              "LU",
              "LV",
              "LY",
              "MA",
              "MC",
              "MD",
              "ME",
              "MF",
              "MG",
              "MH",
              "MK",
              "ML",
              "MM",
              "MN",
              "MO",
              "MP",
              "MQ",
              "MR",
              "MS",
              "MT",
              "MU",
              "MV",
              "MW",
              "MX",
              "MY",
              "MZ",
              "NA",
              "NC",
              "NE",
              "NF",
              "NG",
              "NI",
              "NL",
              "NO",
              "NP",
              "NR",
              "NU",
              "NZ",
              "OM",
              "PA",
              "PE",
              "PF",
              "PG",
              "PH",
              "PK",
              "PL",
              "PM",
              "PN",
              "PR",
              "PS",
              "PT",
              "PW",
              "PY",
              "QA",
              "RE",
              "RO",
              "RS",
              "RW",
              "SA",
              "SB",
              "SC",
              "SD",
              "SE",
              "SG",
              "SH",
              "SI",
              "SJ",
              "SK",
              "SL",
              "SM",
              "SN",
              "SO",
              "SR",
              "SS",
              "ST",
              "SV",
              "SX",
              "SZ",
              "TC",
              "TD",
              "TF",
              "TG",
              "TH",
              "TJ",
              "TK",
              "TL",
              "TM",
              "TN",
              "TO",
              "TR",
              "TT",
              "TV",
              "TW",
              "TZ",
              "UA",
              "UG",
              "UM",
              "US",
              "UY",
              "UZ",
              "VA",
              "VC",
              "VE",
              "VG",
              "VI",
              "VN",
              "VU",
              "WF",
              "WS",
              "YE",
              "YT",
              "ZA",
              "ZM",
              "ZW"
            ],
            "title": "CountryAlpha2Input",
            "examples": [
              "US",
              "SE",
              "FR"
            ],
            "x-speakeasy-enums": [
              "AD",
              "AE",
              "AF",
              "AG",
              "AI",
              "AL",
              "AM",
              "AO",
              "AQ",
              "AR",
              "AS",
              "AT",
              "AU",
              "AW",
              "AX",
              "AZ",
              "BA",
              "BB",
              "BD",
              "BE",
              "BF",
              "BG",
              "BH",
              "BI",
              "BJ",
              "BL",
              "BM",
              "BN",
              "BO",
              "BQ",
              "BR",
              "BS",
              "BT",
              "BV",
              "BW",
              "BY",
              "BZ",
              "CA",
              "CC",
              "CD",
              "CF",
              "CG",
              "CH",
              "CI",
              "CK",
              "CL",
              "CM",
              "CN",
              "CO",
              "CR",
              "CV",
              "CW",
              "CX",
              "CY",
              "CZ",
              "DE",
              "DJ",
              "DK",
              "DM",
              "DO",
              "DZ",
              "EC",
              "EE",
              "EG",
              "EH",
              "ER",
              "ES",
              "ET",
              "FI",
              "FJ",
              "FK",
              "FM",
              "FO",
              "FR",
              "GA",
              "GB",
              "GD",
              "GE",
              "GF",
              "GG",
              "GH",
              "GI",
              "GL",
              "GM",
              "GN",
              "GP",
              "GQ",
              "GR",
              "GS",
              "GT",
              "GU",
              "GW",
              "GY",
              "HK",
              "HM",
              "HN",
              "HR",
              "HT",
              "HU",
              "ID",
              "IE",
              "IL",
              "IM",
              "IN",
              "IO",
              "IQ",
              "IS",
              "IT",
              "JE",
              "JM",
              "JO",
              "JP",
              "KE",
              "KG",
              "KH",
              "KI",
              "KM",
              "KN",
              "KR",
              "KW",
              "KY",
              "KZ",
              "LA",
              "LB",
              "LC",
              "LI",
              "LK",
              "LR",
              "LS",
              "LT",
              "LU",
              "LV",
              "LY",
              "MA",
              "MC",
              "MD",
              "ME",
              "MF",
              "MG",
              "MH",
              "MK",
              "ML",
              "MM",
              "MN",
              "MO",
              "MP",
              "MQ",
              "MR",
              "MS",
              "MT",
              "MU",
              "MV",
              "MW",
              "MX",
              "MY",
              "MZ",
              "NA",
              "NC",
              "NE",
              "NF",
              "NG",
              "NI",
              "NL",
              "NO",
              "NP",
              "NR",
              "NU",
              "NZ",
              "OM",
              "PA",
              "PE",
              "PF",
              "PG",
              "PH",
              "PK",
              "PL",
              "PM",
              "PN",
              "PR",
              "PS",
              "PT",
              "PW",
              "PY",
              "QA",
              "RE",
              "RO",
              "RS",
              "RW",
              "SA",
              "SB",
              "SC",
              "SD",
              "SE",
              "SG",
              "SH",
              "SI",
              "SJ",
              "SK",
              "SL",
              "SM",
              "SN",
              "SO",
              "SR",
              "SS",
              "ST",
              "SV",
              "SX",
              "SZ",
              "TC",
              "TD",
              "TF",
              "TG",
              "TH",
              "TJ",
              "TK",
              "TL",
              "TM",
              "TN",
              "TO",
              "TR",
              "TT",
              "TV",
              "TW",
              "TZ",
              "UA",
              "UG",
              "UM",
              "US",
              "UY",
              "UZ",
              "VA",
              "VC",
              "VE",
              "VG",
              "VI",
              "VN",
              "VU",
              "WF",
              "WS",
              "YE",
              "YT",
              "ZA",
              "ZM",
              "ZW"
            ]
          }
        },
        "type": "object",
        "required": [
          "country"
        ],
        "title": "AddressInput"
      },
      "AggregateField": {
        "type": "string",
        "maxLength": 255,
        "minLength": 1
      },
      "AggregationFunction": {
        "type": "string",
        "enum": [
          "count",
          "sum",
          "max",
          "min",
          "avg",
          "unique"
        ],
        "title": "AggregationFunction"
      },
      "AlreadyActiveSubscriptionError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "AlreadyActiveSubscriptionError",
            "title": "Error",
            "examples": [
              "AlreadyActiveSubscriptionError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "AlreadyActiveSubscriptionError"
      },
      "AlreadyCanceledSubscription": {
        "properties": {
          "error": {
            "type": "string",
            "const": "AlreadyCanceledSubscription",
            "title": "Error",
            "examples": [
              "AlreadyCanceledSubscription"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "AlreadyCanceledSubscription"
      },
      "AmbiguousExternalCustomerID": {
        "properties": {
          "error": {
            "type": "string",
            "const": "AmbiguousExternalCustomerID",
            "title": "Error",
            "examples": [
              "AmbiguousExternalCustomerID"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "AmbiguousExternalCustomerID"
      },
      "AttachedCustomField": {
        "properties": {
          "custom_field_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Custom Field Id",
            "description": "ID of the custom field."
          },
          "custom_field": {
            "$ref": "#/components/schemas/CustomField",
            "title": "CustomField"
          },
          "order": {
            "type": "integer",
            "title": "Order",
            "description": "Order of the custom field in the resource."
          },
          "required": {
            "type": "boolean",
            "title": "Required",
            "description": "Whether the value is required for this custom field."
          }
        },
        "type": "object",
        "required": [
          "custom_field_id",
          "custom_field",
          "order",
          "required"
        ],
        "title": "AttachedCustomField",
        "description": "Schema of a custom field attached to a resource."
      },
      "AttachedCustomFieldCreate": {
        "properties": {
          "custom_field_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Custom Field Id",
            "description": "ID of the custom field to attach."
          },
          "required": {
            "type": "boolean",
            "title": "Required",
            "description": "Whether the value is required for this custom field."
          }
        },
        "type": "object",
        "required": [
          "custom_field_id",
          "required"
        ],
        "title": "AttachedCustomFieldCreate",
        "description": "Schema to attach a custom field to a resource."
      },
      "AuthorizeOrganization": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "avatar_url"
        ],
        "title": "AuthorizeOrganization"
      },
      "AuthorizeResponseOrganization": {
        "properties": {
          "client": {
            "$ref": "#/components/schemas/OAuth2ClientPublic"
          },
          "sub_type": {
            "type": "string",
            "const": "organization",
            "title": "Sub Type"
          },
          "sub": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuthorizeOrganization"
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Scope"
            },
            "type": "array",
            "title": "Scopes"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/AuthorizeOrganization"
            },
            "type": "array",
            "title": "Organizations"
          },
          "requires_single_organization": {
            "type": "boolean",
            "title": "Requires Single Organization",
            "default": false
          },
          "scope_display_names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Scope Display Names",
            "default": {
              "openid": "OpenID",
              "profile": "Read your profile",
              "email": "Read your email address",
              "user:read": "Read your user account",
              "user:write": "Manage your user account",
              "organizations:read": "Read your organizations",
              "organizations:write": "Create or modify organizations",
              "custom_fields:read": "Read custom fields",
              "custom_fields:write": "Create or modify custom fields",
              "discounts:read": "Read discounts",
              "discounts:write": "Create or modify discounts",
              "checkout_links:read": "Read checkout links",
              "checkout_links:write": "Create or modify checkout links",
              "checkouts:read": "Read checkout sessions",
              "checkouts:write": "Create or modify checkout sessions",
              "transactions:read": "Read transactions",
              "transactions:write": "Create or modify transactions",
              "payouts:read": "Read payouts",
              "payouts:write": "Create or modify payouts",
              "products:read": "Read products",
              "products:write": "Create or modify products",
              "benefits:read": "Read benefits",
              "benefits:write": "Create or modify benefits",
              "events:read": "Read events",
              "events:write": "Create events",
              "meters:read": "Read meters",
              "meters:write": "Create or modify meters",
              "files:read": "Read file uploads",
              "files:write": "Create or modify file uploads",
              "subscriptions:read": "Read subscriptions made on your organizations",
              "subscriptions:write": "Create or modify subscriptions made on your organizations",
              "customers:read": "Read customers",
              "customers:write": "Create or modify customers",
              "members:read": "Read members",
              "members:write": "Create or modify members",
              "wallets:read": "Read wallets",
              "wallets:write": "Create or modify wallets",
              "disputes:read": "Read disputes",
              "disputes:write": "Create or modify disputes",
              "customer_meters:read": "Read customer meters",
              "customer_sessions:write": "Create or modify customer sessions",
              "member_sessions:write": "Create or modify member sessions",
              "customer_seats:read": "Read customer seats",
              "customer_seats:write": "Create or modify customer seats",
              "orders:read": "Read orders made on your organizations",
              "orders:write": "Modify orders made on your organizations",
              "refunds:read": "Read refunds made on your organizations",
              "refunds:write": "Create or modify refunds",
              "payments:read": "Read payments made on your organizations",
              "metrics:read": "Read metrics",
              "metrics:write": "Create or modify metric definitions",
              "webhooks:read": "Read webhooks",
              "webhooks:write": "Create or modify webhooks",
              "license_keys:read": "Read license keys",
              "license_keys:write": "Modify license keys",
              "customer_portal:read": "Read your orders, subscriptions and benefits",
              "customer_portal:write": "Create or modify your orders, subscriptions and benefits",
              "notifications:read": "Read notifications",
              "notifications:write": "Mark notifications as read",
              "notification_recipients:read": "Read notification recipients",
              "notification_recipients:write": "Create or modify notification recipients",
              "organization_access_tokens:read": "Read organization access tokens",
              "organization_access_tokens:write": "Create or modify organization access tokens"
            }
          }
        },
        "type": "object",
        "required": [
          "client",
          "sub_type",
          "sub",
          "scopes",
          "organizations"
        ],
        "title": "AuthorizeResponseOrganization"
      },
      "AuthorizeResponseUser": {
        "properties": {
          "client": {
            "$ref": "#/components/schemas/OAuth2ClientPublic"
          },
          "sub_type": {
            "type": "string",
            "const": "user",
            "title": "Sub Type"
          },
          "sub": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuthorizeUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Scope"
            },
            "type": "array",
            "title": "Scopes"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/AuthorizeOrganization"
            },
            "type": "array",
            "title": "Organizations"
          },
          "requires_single_organization": {
            "type": "boolean",
            "title": "Requires Single Organization",
            "default": false
          },
          "scope_display_names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Scope Display Names",
            "default": {
              "openid": "OpenID",
              "profile": "Read your profile",
              "email": "Read your email address",
              "user:read": "Read your user account",
              "user:write": "Manage your user account",
              "organizations:read": "Read your organizations",
              "organizations:write": "Create or modify organizations",
              "custom_fields:read": "Read custom fields",
              "custom_fields:write": "Create or modify custom fields",
              "discounts:read": "Read discounts",
              "discounts:write": "Create or modify discounts",
              "checkout_links:read": "Read checkout links",
              "checkout_links:write": "Create or modify checkout links",
              "checkouts:read": "Read checkout sessions",
              "checkouts:write": "Create or modify checkout sessions",
              "transactions:read": "Read transactions",
              "transactions:write": "Create or modify transactions",
              "payouts:read": "Read payouts",
              "payouts:write": "Create or modify payouts",
              "products:read": "Read products",
              "products:write": "Create or modify products",
              "benefits:read": "Read benefits",
              "benefits:write": "Create or modify benefits",
              "events:read": "Read events",
              "events:write": "Create events",
              "meters:read": "Read meters",
              "meters:write": "Create or modify meters",
              "files:read": "Read file uploads",
              "files:write": "Create or modify file uploads",
              "subscriptions:read": "Read subscriptions made on your organizations",
              "subscriptions:write": "Create or modify subscriptions made on your organizations",
              "customers:read": "Read customers",
              "customers:write": "Create or modify customers",
              "members:read": "Read members",
              "members:write": "Create or modify members",
              "wallets:read": "Read wallets",
              "wallets:write": "Create or modify wallets",
              "disputes:read": "Read disputes",
              "disputes:write": "Create or modify disputes",
              "customer_meters:read": "Read customer meters",
              "customer_sessions:write": "Create or modify customer sessions",
              "member_sessions:write": "Create or modify member sessions",
              "customer_seats:read": "Read customer seats",
              "customer_seats:write": "Create or modify customer seats",
              "orders:read": "Read orders made on your organizations",
              "orders:write": "Modify orders made on your organizations",
              "refunds:read": "Read refunds made on your organizations",
              "refunds:write": "Create or modify refunds",
              "payments:read": "Read payments made on your organizations",
              "metrics:read": "Read metrics",
              "metrics:write": "Create or modify metric definitions",
              "webhooks:read": "Read webhooks",
              "webhooks:write": "Create or modify webhooks",
              "license_keys:read": "Read license keys",
              "license_keys:write": "Modify license keys",
              "customer_portal:read": "Read your orders, subscriptions and benefits",
              "customer_portal:write": "Create or modify your orders, subscriptions and benefits",
              "notifications:read": "Read notifications",
              "notifications:write": "Mark notifications as read",
              "notification_recipients:read": "Read notification recipients",
              "notification_recipients:write": "Create or modify notification recipients",
              "organization_access_tokens:read": "Read organization access tokens",
              "organization_access_tokens:write": "Create or modify organization access tokens"
            }
          }
        },
        "type": "object",
        "required": [
          "client",
          "sub_type",
          "sub",
          "scopes",
          "organizations"
        ],
        "title": "AuthorizeResponseUser"
      },
      "AuthorizeUser": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "avatar_url"
        ],
        "title": "AuthorizeUser"
      },
      "BadRequest": {
        "properties": {
          "error": {
            "type": "string",
            "const": "BadRequest",
            "title": "Error",
            "examples": [
              "BadRequest"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "BadRequest"
      },
      "BalanceCreditOrderEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "balance.credit_order",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BalanceCreditOrderMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BalanceCreditOrderEvent",
        "description": "An event created by Polar when an order is paid via customer balance."
      },
      "BalanceCreditOrderMetadata": {
        "properties": {
          "order_id": {
            "type": "string",
            "title": "Order Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount"
          },
          "tax_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax State"
          },
          "tax_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Country"
          },
          "fee": {
            "type": "integer",
            "title": "Fee"
          },
          "exchange_rate": {
            "type": "number",
            "title": "Exchange Rate"
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "amount",
          "currency",
          "tax_amount",
          "fee"
        ],
        "title": "BalanceCreditOrderMetadata"
      },
      "BalanceDisputeEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "balance.dispute",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BalanceDisputeMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BalanceDisputeEvent",
        "description": "An event created by Polar when an order is disputed."
      },
      "BalanceDisputeMetadata": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "title": "Transaction Id"
          },
          "dispute_id": {
            "type": "string",
            "title": "Dispute Id"
          },
          "order_id": {
            "type": "string",
            "title": "Order Id"
          },
          "order_created_at": {
            "type": "string",
            "title": "Order Created At"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "presentment_amount": {
            "type": "integer",
            "title": "Presentment Amount"
          },
          "presentment_currency": {
            "type": "string",
            "title": "Presentment Currency"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount"
          },
          "tax_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax State"
          },
          "tax_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Country"
          },
          "fee": {
            "type": "integer",
            "title": "Fee"
          },
          "exchange_rate": {
            "type": "number",
            "title": "Exchange Rate"
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "dispute_id",
          "amount",
          "currency",
          "presentment_amount",
          "presentment_currency",
          "tax_amount",
          "fee"
        ],
        "title": "BalanceDisputeMetadata"
      },
      "BalanceDisputeReversalEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "balance.dispute_reversal",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BalanceDisputeMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BalanceDisputeReversalEvent",
        "description": "An event created by Polar when a dispute is won and funds are reinstated."
      },
      "BalanceOrderEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "balance.order",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BalanceOrderMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BalanceOrderEvent",
        "description": "An event created by Polar when an order is paid."
      },
      "BalanceOrderMetadata": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "title": "Transaction Id"
          },
          "order_id": {
            "type": "string",
            "title": "Order Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "presentment_amount": {
            "type": "integer",
            "title": "Presentment Amount"
          },
          "presentment_currency": {
            "type": "string",
            "title": "Presentment Currency"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount"
          },
          "tax_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax State"
          },
          "tax_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Country"
          },
          "fee": {
            "type": "integer",
            "title": "Fee"
          },
          "exchange_rate": {
            "type": "number",
            "title": "Exchange Rate"
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "order_id",
          "amount",
          "currency",
          "presentment_amount",
          "presentment_currency",
          "tax_amount",
          "fee"
        ],
        "title": "BalanceOrderMetadata"
      },
      "BalanceRefundEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "balance.refund",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BalanceRefundMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BalanceRefundEvent",
        "description": "An event created by Polar when an order is refunded."
      },
      "BalanceRefundMetadata": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "title": "Transaction Id"
          },
          "refund_id": {
            "type": "string",
            "title": "Refund Id"
          },
          "order_id": {
            "type": "string",
            "title": "Order Id"
          },
          "order_created_at": {
            "type": "string",
            "title": "Order Created At"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "presentment_amount": {
            "type": "integer",
            "title": "Presentment Amount"
          },
          "presentment_currency": {
            "type": "string",
            "title": "Presentment Currency"
          },
          "refundable_amount": {
            "type": "integer",
            "title": "Refundable Amount"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount"
          },
          "tax_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax State"
          },
          "tax_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Country"
          },
          "fee": {
            "type": "integer",
            "title": "Fee"
          },
          "exchange_rate": {
            "type": "number",
            "title": "Exchange Rate"
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "refund_id",
          "amount",
          "currency",
          "presentment_amount",
          "presentment_currency",
          "tax_amount",
          "fee"
        ],
        "title": "BalanceRefundMetadata"
      },
      "BalanceRefundReversalEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "balance.refund_reversal",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BalanceRefundMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BalanceRefundReversalEvent",
        "description": "An event created by Polar when a refund is reverted."
      },
      "Benefit": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/BenefitCustom"
          },
          {
            "$ref": "#/components/schemas/BenefitDiscord"
          },
          {
            "$ref": "#/components/schemas/BenefitGitHubRepository"
          },
          {
            "$ref": "#/components/schemas/BenefitDownloadables"
          },
          {
            "$ref": "#/components/schemas/BenefitLicenseKeys"
          },
          {
            "$ref": "#/components/schemas/BenefitMeterCredit"
          },
          {
            "$ref": "#/components/schemas/BenefitFeatureFlag"
          },
          {
            "$ref": "#/components/schemas/BenefitSlackSharedChannel"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "custom": "#/components/schemas/BenefitCustom",
            "discord": "#/components/schemas/BenefitDiscord",
            "downloadables": "#/components/schemas/BenefitDownloadables",
            "feature_flag": "#/components/schemas/BenefitFeatureFlag",
            "github_repository": "#/components/schemas/BenefitGitHubRepository",
            "license_keys": "#/components/schemas/BenefitLicenseKeys",
            "meter_credit": "#/components/schemas/BenefitMeterCredit",
            "slack_shared_channel": "#/components/schemas/BenefitSlackSharedChannel"
          }
        }
      },
      "BenefitCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/BenefitCustomCreate"
          },
          {
            "$ref": "#/components/schemas/BenefitDiscordCreate"
          },
          {
            "$ref": "#/components/schemas/BenefitGitHubRepositoryCreate"
          },
          {
            "$ref": "#/components/schemas/BenefitDownloadablesCreate"
          },
          {
            "$ref": "#/components/schemas/BenefitLicenseKeysCreate"
          },
          {
            "$ref": "#/components/schemas/BenefitMeterCreditCreate"
          },
          {
            "$ref": "#/components/schemas/BenefitFeatureFlagCreate"
          },
          {
            "$ref": "#/components/schemas/BenefitSlackSharedChannelCreate"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "custom": "#/components/schemas/BenefitCustomCreate",
            "discord": "#/components/schemas/BenefitDiscordCreate",
            "downloadables": "#/components/schemas/BenefitDownloadablesCreate",
            "feature_flag": "#/components/schemas/BenefitFeatureFlagCreate",
            "github_repository": "#/components/schemas/BenefitGitHubRepositoryCreate",
            "license_keys": "#/components/schemas/BenefitLicenseKeysCreate",
            "meter_credit": "#/components/schemas/BenefitMeterCreditCreate",
            "slack_shared_channel": "#/components/schemas/BenefitSlackSharedChannelCreate"
          }
        }
      },
      "BenefitCustom": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "custom",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "visibility": {
            "$ref": "#/components/schemas/BenefitVisibility",
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitCustomProperties"
          },
          "visibility_configurable": {
            "type": "boolean",
            "title": "Visibility Configurable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "metadata",
          "visibility",
          "properties",
          "visibility_configurable"
        ],
        "title": "BenefitCustom",
        "description": "A benefit of type `custom`.\n\nUse it to grant any kind of benefit that doesn't fit in the other types."
      },
      "BenefitCustomCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "custom",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "maxLength": 42,
            "minLength": 3,
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitCustomCreateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description",
          "properties"
        ],
        "title": "BenefitCustomCreate",
        "description": "Schema to create a benefit of type `custom`."
      },
      "BenefitCustomCreateProperties": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Private note to be shared with customers who have this benefit granted."
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "type": "object",
        "title": "BenefitCustomCreateProperties",
        "description": "Properties for creating a benefit of type `custom`."
      },
      "BenefitCustomProperties": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Private note to be shared with customers who have this benefit granted."
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "type": "object",
        "required": [
          "note"
        ],
        "title": "BenefitCustomProperties",
        "description": "Properties for a benefit of type `custom`."
      },
      "BenefitCustomPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "custom",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id"
        ],
        "title": "BenefitCustomPublic"
      },
      "BenefitCustomSubscriber": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "custom",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "organization": {
            "$ref": "#/components/schemas/BenefitSubscriberOrganization"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitCustomSubscriberProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "organization",
          "properties"
        ],
        "title": "BenefitCustomSubscriber"
      },
      "BenefitCustomSubscriberProperties": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Private note to be shared with customers who have this benefit granted."
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "type": "object",
        "required": [
          "note"
        ],
        "title": "BenefitCustomSubscriberProperties",
        "description": "Properties available to subscribers for a benefit of type `custom`."
      },
      "BenefitCustomUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 42,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "type": {
            "type": "string",
            "const": "custom",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitCustomProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BenefitCustomUpdate"
      },
      "BenefitCycledEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "benefit.cycled",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BenefitGrantMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BenefitCycledEvent",
        "description": "An event created by Polar when a benefit is cycled."
      },
      "BenefitDiscord": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "discord",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "visibility": {
            "$ref": "#/components/schemas/BenefitVisibility",
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitDiscordProperties"
          },
          "visibility_configurable": {
            "type": "boolean",
            "title": "Visibility Configurable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "metadata",
          "visibility",
          "properties",
          "visibility_configurable"
        ],
        "title": "BenefitDiscord",
        "description": "A benefit of type `discord`.\n\nUse it to automatically invite your backers to a Discord server."
      },
      "BenefitDiscordCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "discord",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "maxLength": 42,
            "minLength": 3,
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitDiscordCreateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description",
          "properties"
        ],
        "title": "BenefitDiscordCreate"
      },
      "BenefitDiscordCreateProperties": {
        "properties": {
          "guild_id": {
            "type": "string",
            "title": "Guild Id",
            "description": "The ID of the Discord server."
          },
          "role_id": {
            "type": "string",
            "title": "Role Id",
            "description": "The ID of the Discord role to grant."
          },
          "kick_member": {
            "type": "boolean",
            "title": "Kick Member",
            "description": "Whether to kick the member from the Discord server on revocation."
          }
        },
        "type": "object",
        "required": [
          "guild_id",
          "role_id",
          "kick_member"
        ],
        "title": "BenefitDiscordCreateProperties",
        "description": "Properties to create a benefit of type `discord`."
      },
      "BenefitDiscordProperties": {
        "properties": {
          "guild_id": {
            "type": "string",
            "title": "Guild Id",
            "description": "The ID of the Discord server."
          },
          "role_id": {
            "type": "string",
            "title": "Role Id",
            "description": "The ID of the Discord role to grant."
          },
          "kick_member": {
            "type": "boolean",
            "title": "Kick Member",
            "description": "Whether to kick the member from the Discord server on revocation."
          }
        },
        "type": "object",
        "required": [
          "guild_id",
          "role_id",
          "kick_member"
        ],
        "title": "BenefitDiscordProperties",
        "description": "Properties for a benefit of type `discord`."
      },
      "BenefitDiscordPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "discord",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id"
        ],
        "title": "BenefitDiscordPublic"
      },
      "BenefitDiscordSubscriber": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "discord",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "organization": {
            "$ref": "#/components/schemas/BenefitSubscriberOrganization"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitDiscordSubscriberProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "organization",
          "properties"
        ],
        "title": "BenefitDiscordSubscriber"
      },
      "BenefitDiscordSubscriberProperties": {
        "properties": {
          "guild_id": {
            "type": "string",
            "title": "Guild Id",
            "description": "The ID of the Discord server."
          }
        },
        "type": "object",
        "required": [
          "guild_id"
        ],
        "title": "BenefitDiscordSubscriberProperties",
        "description": "Properties available to subscribers for a benefit of type `discord`."
      },
      "BenefitDiscordUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 42,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "type": {
            "type": "string",
            "const": "discord",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitDiscordCreateProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BenefitDiscordUpdate"
      },
      "BenefitDownloadableFile": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "storage_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Version"
          },
          "checksum_etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Etag"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "checksum_sha256_hex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Hex"
          },
          "last_modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified At"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "service": {
            "type": "string",
            "const": "downloadable",
            "title": "Service"
          },
          "is_uploaded": {
            "type": "boolean",
            "title": "Is Uploaded"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "flagged_malicious_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Flagged Malicious At"
          },
          "downloaders": {
            "type": "integer",
            "title": "Downloaders",
            "description": "Number of distinct customers or members who downloaded the file."
          },
          "downloads": {
            "type": "integer",
            "title": "Downloads",
            "description": "Total number of downloads for the file."
          },
          "size_readable": {
            "type": "string",
            "title": "Size Readable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "name",
          "path",
          "mime_type",
          "size",
          "storage_version",
          "checksum_etag",
          "checksum_sha256_base64",
          "checksum_sha256_hex",
          "last_modified_at",
          "version",
          "service",
          "is_uploaded",
          "created_at",
          "flagged_malicious_at",
          "downloaders",
          "downloads",
          "size_readable"
        ],
        "title": "BenefitDownloadableFile"
      },
      "BenefitDownloadables": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "downloadables",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "visibility": {
            "$ref": "#/components/schemas/BenefitVisibility",
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitDownloadablesProperties"
          },
          "visibility_configurable": {
            "type": "boolean",
            "title": "Visibility Configurable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "metadata",
          "visibility",
          "properties",
          "visibility_configurable"
        ],
        "title": "BenefitDownloadables"
      },
      "BenefitDownloadablesCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "downloadables",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "maxLength": 42,
            "minLength": 3,
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitDownloadablesCreateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description",
          "properties"
        ],
        "title": "BenefitDownloadablesCreate"
      },
      "BenefitDownloadablesCreateProperties": {
        "properties": {
          "archived": {
            "additionalProperties": {
              "type": "boolean"
            },
            "propertyNames": {
              "format": "uuid4"
            },
            "type": "object",
            "title": "Archived",
            "default": {}
          },
          "files": {
            "items": {
              "type": "string",
              "format": "uuid4"
            },
            "type": "array",
            "minItems": 1,
            "title": "Files"
          }
        },
        "type": "object",
        "required": [
          "files"
        ],
        "title": "BenefitDownloadablesCreateProperties"
      },
      "BenefitDownloadablesProperties": {
        "properties": {
          "archived": {
            "additionalProperties": {
              "type": "boolean"
            },
            "propertyNames": {
              "format": "uuid4"
            },
            "type": "object",
            "title": "Archived"
          },
          "files": {
            "items": {
              "type": "string",
              "format": "uuid4"
            },
            "type": "array",
            "title": "Files"
          }
        },
        "type": "object",
        "required": [
          "archived",
          "files"
        ],
        "title": "BenefitDownloadablesProperties"
      },
      "BenefitDownloadablesPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "downloadables",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id"
        ],
        "title": "BenefitDownloadablesPublic"
      },
      "BenefitDownloadablesSubscriber": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "downloadables",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "organization": {
            "$ref": "#/components/schemas/BenefitSubscriberOrganization"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitDownloadablesSubscriberProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "organization",
          "properties"
        ],
        "title": "BenefitDownloadablesSubscriber"
      },
      "BenefitDownloadablesSubscriberProperties": {
        "properties": {
          "active_files": {
            "items": {
              "type": "string",
              "format": "uuid4"
            },
            "type": "array",
            "title": "Active Files"
          }
        },
        "type": "object",
        "required": [
          "active_files"
        ],
        "title": "BenefitDownloadablesSubscriberProperties"
      },
      "BenefitDownloadablesUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 42,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "type": {
            "type": "string",
            "const": "downloadables",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitDownloadablesCreateProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BenefitDownloadablesUpdate"
      },
      "BenefitFeatureFlag": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "feature_flag",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "visibility": {
            "$ref": "#/components/schemas/BenefitVisibility",
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitFeatureFlagProperties"
          },
          "visibility_configurable": {
            "type": "boolean",
            "title": "Visibility Configurable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "metadata",
          "visibility",
          "properties",
          "visibility_configurable"
        ],
        "title": "BenefitFeatureFlag",
        "description": "A benefit of type `feature_flag`.\n\nUse it to grant feature flags with key-value metadata\nthat can be queried via the API and webhooks."
      },
      "BenefitFeatureFlagCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "feature_flag",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "maxLength": 42,
            "minLength": 3,
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitFeatureFlagCreateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description",
          "properties"
        ],
        "title": "BenefitFeatureFlagCreate",
        "description": "Schema to create a benefit of type `feature_flag`."
      },
      "BenefitFeatureFlagCreateProperties": {
        "properties": {},
        "type": "object",
        "title": "BenefitFeatureFlagCreateProperties",
        "description": "Properties for creating a benefit of type `feature_flag`."
      },
      "BenefitFeatureFlagProperties": {
        "properties": {},
        "type": "object",
        "title": "BenefitFeatureFlagProperties",
        "description": "Properties for a benefit of type `feature_flag`."
      },
      "BenefitFeatureFlagPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "feature_flag",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id"
        ],
        "title": "BenefitFeatureFlagPublic"
      },
      "BenefitFeatureFlagSubscriber": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "feature_flag",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "organization": {
            "$ref": "#/components/schemas/BenefitSubscriberOrganization"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitFeatureFlagSubscriberProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "organization",
          "properties"
        ],
        "title": "BenefitFeatureFlagSubscriber"
      },
      "BenefitFeatureFlagSubscriberProperties": {
        "properties": {},
        "type": "object",
        "title": "BenefitFeatureFlagSubscriberProperties",
        "description": "Properties available to subscribers for a benefit of type `feature_flag`."
      },
      "BenefitFeatureFlagUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 42,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "type": {
            "type": "string",
            "const": "feature_flag",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitFeatureFlagProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BenefitFeatureFlagUpdate"
      },
      "BenefitGitHubRepository": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "github_repository",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "visibility": {
            "$ref": "#/components/schemas/BenefitVisibility",
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGitHubRepositoryProperties"
          },
          "visibility_configurable": {
            "type": "boolean",
            "title": "Visibility Configurable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "metadata",
          "visibility",
          "properties",
          "visibility_configurable"
        ],
        "title": "BenefitGitHubRepository",
        "description": "A benefit of type `github_repository`.\n\nUse it to automatically invite your backers to a private GitHub repository."
      },
      "BenefitGitHubRepositoryCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "github_repository",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "maxLength": 42,
            "minLength": 3,
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGitHubRepositoryCreateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description",
          "properties"
        ],
        "title": "BenefitGitHubRepositoryCreate"
      },
      "BenefitGitHubRepositoryCreateProperties": {
        "properties": {
          "repository_owner": {
            "type": "string",
            "title": "Repository Owner",
            "description": "The owner of the repository.",
            "examples": [
              "polarsource"
            ]
          },
          "repository_name": {
            "type": "string",
            "title": "Repository Name",
            "description": "The name of the repository.",
            "examples": [
              "private_repo"
            ]
          },
          "permission": {
            "type": "string",
            "enum": [
              "pull",
              "triage",
              "push",
              "maintain",
              "admin"
            ],
            "title": "Permission",
            "description": "The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."
          }
        },
        "type": "object",
        "required": [
          "repository_owner",
          "repository_name",
          "permission"
        ],
        "title": "BenefitGitHubRepositoryCreateProperties",
        "description": "Properties to create a benefit of type `github_repository`."
      },
      "BenefitGitHubRepositoryProperties": {
        "properties": {
          "repository_owner": {
            "type": "string",
            "title": "Repository Owner",
            "description": "The owner of the repository.",
            "examples": [
              "polarsource"
            ]
          },
          "repository_name": {
            "type": "string",
            "title": "Repository Name",
            "description": "The name of the repository.",
            "examples": [
              "private_repo"
            ]
          },
          "permission": {
            "type": "string",
            "enum": [
              "pull",
              "triage",
              "push",
              "maintain",
              "admin"
            ],
            "title": "Permission",
            "description": "The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."
          }
        },
        "type": "object",
        "required": [
          "repository_owner",
          "repository_name",
          "permission"
        ],
        "title": "BenefitGitHubRepositoryProperties",
        "description": "Properties for a benefit of type `github_repository`."
      },
      "BenefitGitHubRepositoryPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "github_repository",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id"
        ],
        "title": "BenefitGitHubRepositoryPublic"
      },
      "BenefitGitHubRepositorySubscriber": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "github_repository",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "organization": {
            "$ref": "#/components/schemas/BenefitSubscriberOrganization"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGitHubRepositorySubscriberProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "organization",
          "properties"
        ],
        "title": "BenefitGitHubRepositorySubscriber"
      },
      "BenefitGitHubRepositorySubscriberProperties": {
        "properties": {
          "repository_owner": {
            "type": "string",
            "title": "Repository Owner",
            "description": "The owner of the repository.",
            "examples": [
              "polarsource"
            ]
          },
          "repository_name": {
            "type": "string",
            "title": "Repository Name",
            "description": "The name of the repository.",
            "examples": [
              "private_repo"
            ]
          }
        },
        "type": "object",
        "required": [
          "repository_owner",
          "repository_name"
        ],
        "title": "BenefitGitHubRepositorySubscriberProperties",
        "description": "Properties available to subscribers for a benefit of type `github_repository`."
      },
      "BenefitGitHubRepositoryUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 42,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "type": {
            "type": "string",
            "const": "github_repository",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGitHubRepositoryCreateProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BenefitGitHubRepositoryUpdate"
      },
      "BenefitGrant": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/Benefit",
            "title": "Benefit"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantDiscordProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantCustomProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantFeatureFlagProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantSlackSharedChannelProperties"
              }
            ],
            "title": "Properties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrant"
      },
      "BenefitGrantCustomProperties": {
        "properties": {},
        "type": "object",
        "title": "BenefitGrantCustomProperties"
      },
      "BenefitGrantCustomWebhook": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitCustom"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantCustomProperties"
          },
          "previous_properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantCustomProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrantCustomWebhook"
      },
      "BenefitGrantDiscordProperties": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "guild_id": {
            "type": "string",
            "title": "Guild Id"
          },
          "role_id": {
            "type": "string",
            "title": "Role Id"
          },
          "granted_account_id": {
            "type": "string",
            "title": "Granted Account Id"
          }
        },
        "type": "object",
        "title": "BenefitGrantDiscordProperties"
      },
      "BenefitGrantDiscordWebhook": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitDiscord"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantDiscordProperties"
          },
          "previous_properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantDiscordProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrantDiscordWebhook"
      },
      "BenefitGrantDownloadablesProperties": {
        "properties": {
          "files": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Files"
          }
        },
        "type": "object",
        "title": "BenefitGrantDownloadablesProperties"
      },
      "BenefitGrantDownloadablesWebhook": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitDownloadables"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"
          },
          "previous_properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrantDownloadablesWebhook"
      },
      "BenefitGrantError": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "message",
          "type",
          "timestamp"
        ],
        "title": "BenefitGrantError"
      },
      "BenefitGrantFeatureFlagProperties": {
        "properties": {},
        "type": "object",
        "title": "BenefitGrantFeatureFlagProperties"
      },
      "BenefitGrantFeatureFlagWebhook": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitFeatureFlag"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantFeatureFlagProperties"
          },
          "previous_properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantFeatureFlagProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrantFeatureFlagWebhook"
      },
      "BenefitGrantGitHubRepositoryProperties": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "repository_owner": {
            "type": "string",
            "title": "Repository Owner"
          },
          "repository_name": {
            "type": "string",
            "title": "Repository Name"
          },
          "permission": {
            "type": "string",
            "enum": [
              "pull",
              "triage",
              "push",
              "maintain",
              "admin"
            ],
            "title": "Permission"
          },
          "granted_account_id": {
            "type": "string",
            "title": "Granted Account Id"
          }
        },
        "type": "object",
        "title": "BenefitGrantGitHubRepositoryProperties"
      },
      "BenefitGrantGitHubRepositoryWebhook": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitGitHubRepository"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"
          },
          "previous_properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrantGitHubRepositoryWebhook"
      },
      "BenefitGrantLicenseKeysProperties": {
        "properties": {
          "user_provided_key": {
            "type": "string",
            "title": "User Provided Key"
          },
          "license_key_id": {
            "type": "string",
            "title": "License Key Id"
          },
          "display_key": {
            "type": "string",
            "title": "Display Key"
          }
        },
        "type": "object",
        "title": "BenefitGrantLicenseKeysProperties"
      },
      "BenefitGrantLicenseKeysWebhook": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitLicenseKeys"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"
          },
          "previous_properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrantLicenseKeysWebhook"
      },
      "BenefitGrantMetadata": {
        "properties": {
          "benefit_id": {
            "type": "string",
            "title": "Benefit Id"
          },
          "benefit_grant_id": {
            "type": "string",
            "title": "Benefit Grant Id"
          },
          "benefit_type": {
            "$ref": "#/components/schemas/BenefitType"
          },
          "member_id": {
            "type": "string",
            "title": "Member Id"
          }
        },
        "type": "object",
        "required": [
          "benefit_id",
          "benefit_grant_id",
          "benefit_type"
        ],
        "title": "BenefitGrantMetadata"
      },
      "BenefitGrantMeterCreditProperties": {
        "properties": {
          "last_credited_meter_id": {
            "type": "string",
            "title": "Last Credited Meter Id"
          },
          "last_credited_units": {
            "type": "integer",
            "title": "Last Credited Units"
          },
          "last_credited_at": {
            "type": "string",
            "title": "Last Credited At"
          }
        },
        "type": "object",
        "title": "BenefitGrantMeterCreditProperties"
      },
      "BenefitGrantMeterCreditWebhook": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitMeterCredit"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantMeterCreditProperties"
          },
          "previous_properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantMeterCreditProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrantMeterCreditWebhook"
      },
      "BenefitGrantSlackSharedChannelProperties": {
        "properties": {
          "invited_email": {
            "type": "string",
            "title": "Invited Email"
          },
          "channel_id": {
            "type": "string",
            "title": "Channel Id"
          },
          "channel_name": {
            "type": "string",
            "title": "Channel Name"
          },
          "invite_id": {
            "type": "string",
            "title": "Invite Id"
          },
          "invite_url": {
            "type": "string",
            "title": "Invite Url"
          },
          "connected_team_id": {
            "type": "string",
            "title": "Connected Team Id"
          }
        },
        "type": "object",
        "title": "BenefitGrantSlackSharedChannelProperties"
      },
      "BenefitGrantSlackSharedChannelWebhook": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted."
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the benefit is granted."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked",
            "description": "Whether the benefit is revoked."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The ID of the subscription that granted this benefit."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order that granted this benefit."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer concerned by this grant."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The ID of the member concerned by this grant."
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ],
            "description": "The error information if the benefit grant failed with an unrecoverable error."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitSlackSharedChannel"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantSlackSharedChannelProperties"
          },
          "previous_properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantSlackSharedChannelProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "is_granted",
          "is_revoked",
          "subscription_id",
          "order_id",
          "customer_id",
          "benefit_id",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "BenefitGrantSlackSharedChannelWebhook"
      },
      "BenefitGrantSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "granted_at",
          "-granted_at",
          "revoked_at",
          "-revoked_at"
        ],
        "title": "BenefitGrantSortProperty"
      },
      "BenefitGrantWebhook": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/BenefitGrantDiscordWebhook"
          },
          {
            "$ref": "#/components/schemas/BenefitGrantCustomWebhook"
          },
          {
            "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryWebhook"
          },
          {
            "$ref": "#/components/schemas/BenefitGrantDownloadablesWebhook"
          },
          {
            "$ref": "#/components/schemas/BenefitGrantLicenseKeysWebhook"
          },
          {
            "$ref": "#/components/schemas/BenefitGrantMeterCreditWebhook"
          },
          {
            "$ref": "#/components/schemas/BenefitGrantFeatureFlagWebhook"
          },
          {
            "$ref": "#/components/schemas/BenefitGrantSlackSharedChannelWebhook"
          }
        ]
      },
      "BenefitGrantedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "benefit.granted",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BenefitGrantMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BenefitGrantedEvent",
        "description": "An event created by Polar when a benefit is granted to a customer."
      },
      "BenefitLicenseKeyActivationCreateProperties": {
        "properties": {
          "limit": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "exclusiveMinimum": 0.0,
            "title": "Limit"
          },
          "enable_customer_admin": {
            "type": "boolean",
            "title": "Enable Customer Admin"
          }
        },
        "type": "object",
        "required": [
          "limit",
          "enable_customer_admin"
        ],
        "title": "BenefitLicenseKeyActivationCreateProperties"
      },
      "BenefitLicenseKeyActivationProperties": {
        "properties": {
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "enable_customer_admin": {
            "type": "boolean",
            "title": "Enable Customer Admin"
          }
        },
        "type": "object",
        "required": [
          "limit",
          "enable_customer_admin"
        ],
        "title": "BenefitLicenseKeyActivationProperties"
      },
      "BenefitLicenseKeyExpirationProperties": {
        "properties": {
          "ttl": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Ttl"
          },
          "timeframe": {
            "type": "string",
            "enum": [
              "year",
              "month",
              "day"
            ],
            "title": "Timeframe"
          }
        },
        "type": "object",
        "required": [
          "ttl",
          "timeframe"
        ],
        "title": "BenefitLicenseKeyExpirationProperties"
      },
      "BenefitLicenseKeys": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "license_keys",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "visibility": {
            "$ref": "#/components/schemas/BenefitVisibility",
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitLicenseKeysProperties"
          },
          "visibility_configurable": {
            "type": "boolean",
            "title": "Visibility Configurable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "metadata",
          "visibility",
          "properties",
          "visibility_configurable"
        ],
        "title": "BenefitLicenseKeys"
      },
      "BenefitLicenseKeysCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "license_keys",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "maxLength": 42,
            "minLength": 3,
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitLicenseKeysCreateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description",
          "properties"
        ],
        "title": "BenefitLicenseKeysCreate"
      },
      "BenefitLicenseKeysCreateProperties": {
        "properties": {
          "prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefix"
          },
          "expires": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties"
              },
              {
                "type": "null"
              }
            ]
          },
          "activations": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitLicenseKeyActivationCreateProperties"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": -2147483648.0,
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          }
        },
        "type": "object",
        "title": "BenefitLicenseKeysCreateProperties"
      },
      "BenefitLicenseKeysProperties": {
        "properties": {
          "prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefix"
          },
          "expires": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties"
              },
              {
                "type": "null"
              }
            ]
          },
          "activations": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          }
        },
        "type": "object",
        "required": [
          "prefix",
          "expires",
          "activations",
          "limit_usage"
        ],
        "title": "BenefitLicenseKeysProperties"
      },
      "BenefitLicenseKeysPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "license_keys",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id"
        ],
        "title": "BenefitLicenseKeysPublic"
      },
      "BenefitLicenseKeysSubscriber": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "license_keys",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "organization": {
            "$ref": "#/components/schemas/BenefitSubscriberOrganization"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitLicenseKeysSubscriberProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "organization",
          "properties"
        ],
        "title": "BenefitLicenseKeysSubscriber"
      },
      "BenefitLicenseKeysSubscriberProperties": {
        "properties": {
          "prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefix"
          },
          "expires": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties"
              },
              {
                "type": "null"
              }
            ]
          },
          "activations": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          }
        },
        "type": "object",
        "required": [
          "prefix",
          "expires",
          "activations",
          "limit_usage"
        ],
        "title": "BenefitLicenseKeysSubscriberProperties"
      },
      "BenefitLicenseKeysUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 42,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "type": {
            "type": "string",
            "const": "license_keys",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitLicenseKeysCreateProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BenefitLicenseKeysUpdate"
      },
      "BenefitMeterCredit": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "meter_credit",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "visibility": {
            "$ref": "#/components/schemas/BenefitVisibility",
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitMeterCreditProperties"
          },
          "visibility_configurable": {
            "type": "boolean",
            "title": "Visibility Configurable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "metadata",
          "visibility",
          "properties",
          "visibility_configurable"
        ],
        "title": "BenefitMeterCredit",
        "description": "A benefit of type `meter_unit`.\n\nUse it to grant a number of units on a specific meter."
      },
      "BenefitMeterCreditCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "meter_credit",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "maxLength": 42,
            "minLength": 3,
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitMeterCreditCreateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description",
          "properties"
        ],
        "title": "BenefitMeterCreditCreate",
        "description": "Schema to create a benefit of type `meter_unit`."
      },
      "BenefitMeterCreditCreateProperties": {
        "properties": {
          "units": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "exclusiveMinimum": 0.0,
            "title": "Units"
          },
          "rollover": {
            "type": "boolean",
            "title": "Rollover"
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id"
          }
        },
        "type": "object",
        "required": [
          "units",
          "rollover",
          "meter_id"
        ],
        "title": "BenefitMeterCreditCreateProperties",
        "description": "Properties for creating a benefit of type `meter_unit`."
      },
      "BenefitMeterCreditProperties": {
        "properties": {
          "units": {
            "type": "integer",
            "title": "Units"
          },
          "rollover": {
            "type": "boolean",
            "title": "Rollover"
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id"
          }
        },
        "type": "object",
        "required": [
          "units",
          "rollover",
          "meter_id"
        ],
        "title": "BenefitMeterCreditProperties",
        "description": "Properties for a benefit of type `meter_unit`."
      },
      "BenefitMeterCreditPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "meter_credit",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitMeterCreditPublicProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "properties"
        ],
        "title": "BenefitMeterCreditPublic",
        "description": "A benefit of type `meter_credit`.\n\nGrants a number of units on a specific meter."
      },
      "BenefitMeterCreditPublicProperties": {
        "properties": {
          "units": {
            "type": "integer",
            "title": "Units"
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id"
          }
        },
        "type": "object",
        "required": [
          "units",
          "meter_id"
        ],
        "title": "BenefitMeterCreditPublicProperties",
        "description": "Properties for a benefit of type `meter_credit`."
      },
      "BenefitMeterCreditSubscriber": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "meter_credit",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "organization": {
            "$ref": "#/components/schemas/BenefitSubscriberOrganization"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitMeterCreditSubscriberProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "organization",
          "properties"
        ],
        "title": "BenefitMeterCreditSubscriber"
      },
      "BenefitMeterCreditSubscriberProperties": {
        "properties": {
          "units": {
            "type": "integer",
            "title": "Units"
          },
          "rollover": {
            "type": "boolean",
            "title": "Rollover"
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id"
          }
        },
        "type": "object",
        "required": [
          "units",
          "rollover",
          "meter_id"
        ],
        "title": "BenefitMeterCreditSubscriberProperties",
        "description": "Properties available to subscribers for a benefit of type `meter_unit`."
      },
      "BenefitMeterCreditUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 42,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "type": {
            "type": "string",
            "const": "meter_credit",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitMeterCreditCreateProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BenefitMeterCreditUpdate"
      },
      "BenefitPublic": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/BenefitCustomPublic"
          },
          {
            "$ref": "#/components/schemas/BenefitDiscordPublic"
          },
          {
            "$ref": "#/components/schemas/BenefitGitHubRepositoryPublic"
          },
          {
            "$ref": "#/components/schemas/BenefitDownloadablesPublic"
          },
          {
            "$ref": "#/components/schemas/BenefitLicenseKeysPublic"
          },
          {
            "$ref": "#/components/schemas/BenefitFeatureFlagPublic"
          },
          {
            "$ref": "#/components/schemas/BenefitSlackSharedChannelPublic"
          },
          {
            "$ref": "#/components/schemas/BenefitMeterCreditPublic"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "custom": "#/components/schemas/BenefitCustomPublic",
            "discord": "#/components/schemas/BenefitDiscordPublic",
            "downloadables": "#/components/schemas/BenefitDownloadablesPublic",
            "feature_flag": "#/components/schemas/BenefitFeatureFlagPublic",
            "github_repository": "#/components/schemas/BenefitGitHubRepositoryPublic",
            "license_keys": "#/components/schemas/BenefitLicenseKeysPublic",
            "meter_credit": "#/components/schemas/BenefitMeterCreditPublic",
            "slack_shared_channel": "#/components/schemas/BenefitSlackSharedChannelPublic"
          }
        }
      },
      "BenefitRevokedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "benefit.revoked",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BenefitGrantMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BenefitRevokedEvent",
        "description": "An event created by Polar when a benefit is revoked from a customer."
      },
      "BenefitSlackSharedChannel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "slack_shared_channel",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "visibility": {
            "$ref": "#/components/schemas/BenefitVisibility",
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitSlackSharedChannelProperties"
          },
          "visibility_configurable": {
            "type": "boolean",
            "title": "Visibility Configurable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "metadata",
          "visibility",
          "properties",
          "visibility_configurable"
        ],
        "title": "BenefitSlackSharedChannel"
      },
      "BenefitSlackSharedChannelCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "slack_shared_channel",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "maxLength": 42,
            "minLength": 3,
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the benefit in the customer portal."
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitSlackSharedChannelCreateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description",
          "properties"
        ],
        "title": "BenefitSlackSharedChannelCreate"
      },
      "BenefitSlackSharedChannelCreateProperties": {
        "properties": {
          "slack_integration_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Slack Integration Id",
            "description": "Polar Slack integration to use for this benefit."
          },
          "channel_name_template": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Channel Name Template"
          },
          "private": {
            "type": "boolean",
            "title": "Private",
            "default": true
          },
          "welcome_message": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Welcome Message"
          },
          "archive_on_revoke": {
            "type": "boolean",
            "title": "Archive On Revoke",
            "default": true
          },
          "team_invitees": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Team Invitees"
          }
        },
        "type": "object",
        "required": [
          "slack_integration_id",
          "channel_name_template"
        ],
        "title": "BenefitSlackSharedChannelCreateProperties"
      },
      "BenefitSlackSharedChannelProperties": {
        "properties": {
          "slack_integration_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Slack Integration Id",
            "description": "Polar Slack integration linked to this benefit."
          },
          "channel_name_template": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Channel Name Template",
            "description": "Template for the channel name. Supports placeholders: {customer_name}, {customer_email_local}, and {metadata.<key>} for any value stored in customer user metadata."
          },
          "private": {
            "type": "boolean",
            "title": "Private",
            "description": "Create the channel as private (recommended).",
            "default": true
          },
          "welcome_message": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Welcome Message",
            "description": "Optional message posted to the channel right after creation."
          },
          "archive_on_revoke": {
            "type": "boolean",
            "title": "Archive On Revoke",
            "description": "Archive the channel when the benefit is revoked.",
            "default": true
          },
          "team_invitees": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Team Invitees",
            "description": "Slack user IDs from the merchant workspace to invite to every channel created for this benefit."
          }
        },
        "type": "object",
        "required": [
          "slack_integration_id",
          "channel_name_template"
        ],
        "title": "BenefitSlackSharedChannelProperties"
      },
      "BenefitSlackSharedChannelPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "slack_shared_channel",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id"
        ],
        "title": "BenefitSlackSharedChannelPublic"
      },
      "BenefitSlackSharedChannelSubscriber": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the benefit."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "type": "string",
            "const": "slack_shared_channel",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "The description of the benefit."
          },
          "selectable": {
            "type": "boolean",
            "title": "Selectable",
            "description": "Whether the benefit is selectable when creating a product."
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable",
            "description": "Whether the benefit is deletable."
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted",
            "description": "Whether the benefit is deleted."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the benefit."
          },
          "organization": {
            "$ref": "#/components/schemas/BenefitSubscriberOrganization"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitSlackSharedChannelSubscriberProperties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "description",
          "selectable",
          "deletable",
          "is_deleted",
          "organization_id",
          "organization",
          "properties"
        ],
        "title": "BenefitSlackSharedChannelSubscriber"
      },
      "BenefitSlackSharedChannelSubscriberProperties": {
        "properties": {},
        "type": "object",
        "title": "BenefitSlackSharedChannelSubscriberProperties"
      },
      "BenefitSlackSharedChannelUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 42,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the benefit. Will be displayed on products having this benefit."
          },
          "type": {
            "type": "string",
            "const": "slack_shared_channel",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitSlackSharedChannelCreateProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BenefitSlackSharedChannelUpdate"
      },
      "BenefitSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "description",
          "-description",
          "type",
          "-type",
          "user_order",
          "-user_order"
        ],
        "title": "BenefitSortProperty"
      },
      "BenefitSubscriberOrganization": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Organization name shown in checkout, customer portal, emails etc."
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Unique organization slug in checkout, customer portal and credit card statements."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "description": "Avatar URL shown in checkout, customer portal, emails etc."
          },
          "proration_behavior": {
            "$ref": "#/components/schemas/SubscriptionProrationBehavior",
            "description": "Proration behavior applied when customer updates their subscription from the portal."
          },
          "allow_customer_updates": {
            "type": "boolean",
            "title": "Allow Customer Updates",
            "description": "Whether customers can update their subscriptions from the customer portal."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "slug",
          "avatar_url",
          "proration_behavior",
          "allow_customer_updates"
        ],
        "title": "BenefitSubscriberOrganization"
      },
      "BenefitType": {
        "type": "string",
        "enum": [
          "custom",
          "discord",
          "github_repository",
          "downloadables",
          "license_keys",
          "meter_credit",
          "feature_flag",
          "slack_shared_channel"
        ],
        "title": "BenefitType"
      },
      "BenefitUpdatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "benefit.updated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/BenefitGrantMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "BenefitUpdatedEvent",
        "description": "An event created by Polar when a benefit is updated."
      },
      "BenefitVisibility": {
        "type": "string",
        "enum": [
          "draft",
          "private",
          "public"
        ],
        "title": "Visibility"
      },
      "BillingAddressFieldMode": {
        "type": "string",
        "enum": [
          "required",
          "optional",
          "disabled"
        ],
        "title": "BillingAddressFieldMode"
      },
      "CannotCreateOrganizationError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "CannotCreateOrganizationError",
            "title": "Error",
            "examples": [
              "CannotCreateOrganizationError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "CannotCreateOrganizationError"
      },
      "CardPayment": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor",
            "description": "The payment processor.",
            "examples": [
              "stripe"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus",
            "description": "The payment status.",
            "examples": [
              "succeeded"
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The payment amount in cents.",
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The payment currency",
            "examples": [
              "usd"
            ]
          },
          "method": {
            "type": "string",
            "const": "card",
            "title": "Method",
            "description": "The payment method used.",
            "examples": [
              "card"
            ]
          },
          "trigger": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentTrigger"
              },
              {
                "type": "null"
              }
            ],
            "description": "What initiated this payment attempt, e.g. initial purchase, subscription renewal, or an automated dunning retry.",
            "examples": [
              "subscription_cycle"
            ]
          },
          "decline_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decline Reason",
            "description": "Error code, if the payment was declined.",
            "examples": [
              "insufficient_funds"
            ]
          },
          "decline_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decline Message",
            "description": "Human-readable error message, if the payment was declined.",
            "examples": [
              "Your card has insufficient funds."
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization that owns the payment.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id",
            "description": "The ID of the checkout session associated with this payment.",
            "examples": [
              "e4b478fa-cd25-4253-9f1f-8a41e6370ede"
            ]
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order associated with this payment.",
            "examples": [
              "e4b478fa-cd25-4253-9f1f-8a41e6370ede"
            ]
          },
          "processor_metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Processor Metadata",
            "description": "Additional metadata from the payment processor for internal use."
          },
          "method_metadata": {
            "$ref": "#/components/schemas/CardPaymentMetadata",
            "description": "Additional metadata for the card payment method."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "processor",
          "status",
          "amount",
          "currency",
          "method",
          "trigger",
          "decline_reason",
          "decline_message",
          "organization_id",
          "checkout_id",
          "order_id",
          "method_metadata"
        ],
        "title": "CardPayment",
        "description": "Schema of a payment with a card payment method."
      },
      "CardPaymentMetadata": {
        "properties": {
          "brand": {
            "type": "string",
            "title": "Brand",
            "description": "The brand of the card used for the payment.",
            "examples": [
              "visa",
              "amex"
            ]
          },
          "last4": {
            "type": "string",
            "title": "Last4",
            "description": "The last 4 digits of the card number.",
            "examples": [
              "4242"
            ]
          }
        },
        "type": "object",
        "required": [
          "brand",
          "last4"
        ],
        "title": "CardPaymentMetadata",
        "description": "Additional metadata for a card payment method."
      },
      "Checkout": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "payment_processor": {
            "$ref": "#/components/schemas/PaymentProcessor",
            "description": "Payment processor used."
          },
          "status": {
            "$ref": "#/components/schemas/CheckoutStatus",
            "description": "\n        Status of the checkout session.\n\n        - Open: the checkout session was opened.\n        - Expired: the checkout session was expired and is no more accessible.\n        - Confirmed: the user on the checkout session clicked Pay. This is not indicative of the payment's success status.\n        - Failed: the checkout definitely failed for technical reasons and cannot be retried. In most cases, this state is never reached.\n        - Succeeded: the payment on the checkout was performed successfully.\n        "
          },
          "client_secret": {
            "type": "string",
            "title": "Client Secret",
            "description": "Client secret used to update and complete the checkout session from the client."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "URL where the customer can access the checkout session."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "description": "Expiration date and time of the checkout session.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "success_url": {
            "type": "string",
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin",
            "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "Amount in cents, before discounts and taxes."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Predefined number of seats (works with seat-based pricing only)"
          },
          "min_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Seats",
            "description": "Minimum number of seats (works with seat-based pricing only)"
          },
          "max_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Seats",
            "description": "Maximum number of seats (works with seat-based pricing only)"
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Predefined number of units (works with unit-based pricing only)"
          },
          "min_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Units",
            "description": "Minimum number of units (works with unit-based pricing only)"
          },
          "max_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Units",
            "description": "Maximum number of units (works with unit-based pricing only)"
          },
          "discount_amount": {
            "type": "integer",
            "title": "Discount Amount",
            "description": "Discount amount in cents."
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount",
            "description": "Amount in cents, after discounts but before taxes."
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Amount",
            "description": "Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehavior"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated."
          },
          "total_amount": {
            "type": "integer",
            "title": "Total Amount",
            "description": "Amount in cents, after discounts and taxes."
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "Currency code of the checkout session."
          },
          "allow_trial": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Trial",
            "description": "Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured."
          },
          "active_trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product."
          },
          "active_trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Trial Interval Count",
            "description": "Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "End date and time of the trial period, if any."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "ID of the organization owning the checkout session."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID of the product to checkout."
          },
          "product_price_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price Id",
            "description": "ID of the product price to checkout.",
            "deprecated": true
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount applied to the checkout."
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`."
          },
          "is_discount_applicable": {
            "type": "boolean",
            "title": "Is Discount Applicable",
            "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."
          },
          "is_free_product_price": {
            "type": "boolean",
            "title": "Is Free Product Price",
            "description": "Whether the product price is free, regardless of discounts."
          },
          "is_payment_required": {
            "type": "boolean",
            "title": "Is Payment Required",
            "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."
          },
          "is_payment_setup_required": {
            "type": "boolean",
            "title": "Is Payment Setup Required",
            "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."
          },
          "is_payment_form_required": {
            "type": "boolean",
            "title": "Is Payment Form Required",
            "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "is_business_customer": {
            "type": "boolean",
            "title": "Is Business Customer",
            "description": "Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name."
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name",
            "description": "Name of the customer."
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email",
            "description": "Email address of the customer."
          },
          "customer_ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipvanyaddress"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Ip Address"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "payment_method_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method Type",
            "description": "Payment method type selected by the customer in the checkout form, e.g. `card`, `apple_pay` or `upi`."
          },
          "payment_processor_metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Payment Processor Metadata"
          },
          "billing_address_fields": {
            "$ref": "#/components/schemas/CheckoutBillingAddressFields",
            "description": "Determine which billing address fields should be disabled, optional or required in the checkout form."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set."
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/CheckoutProduct"
            },
            "type": "array",
            "title": "Products",
            "description": "List of products available to select."
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CheckoutProduct"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product selected to checkout."
          },
          "product_price": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                  },
                  {
                    "$ref": "#/components/schemas/ProductPrice"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price",
            "description": "Price of the selected product.",
            "deprecated": true
          },
          "prices": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                      },
                      {
                        "$ref": "#/components/schemas/ProductPrice"
                      }
                    ]
                  },
                  "type": "array",
                  "description": "List of prices for this product."
                },
                "propertyNames": {
                  "format": "uuid4"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prices",
            "description": "Mapping of product IDs to their list of prices."
          },
          "discount": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "attached_custom_fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AttachedCustomField"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attached Custom Fields"
          },
          "customer_metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "type": "object",
            "title": "Customer Metadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "payment_processor",
          "status",
          "client_secret",
          "url",
          "expires_at",
          "success_url",
          "return_url",
          "embed_origin",
          "amount",
          "units",
          "min_units",
          "max_units",
          "discount_amount",
          "net_amount",
          "tax_amount",
          "tax_behavior",
          "total_amount",
          "currency",
          "allow_trial",
          "active_trial_interval",
          "active_trial_interval_count",
          "trial_end",
          "organization_id",
          "product_id",
          "product_price_id",
          "discount_id",
          "allow_discount_codes",
          "require_billing_address",
          "is_discount_applicable",
          "is_free_product_price",
          "is_payment_required",
          "is_payment_setup_required",
          "is_payment_form_required",
          "customer_id",
          "is_business_customer",
          "customer_name",
          "customer_email",
          "customer_ip_address",
          "customer_billing_name",
          "customer_billing_address",
          "customer_tax_id",
          "payment_method_type",
          "payment_processor_metadata",
          "billing_address_fields",
          "trial_interval",
          "trial_interval_count",
          "metadata",
          "external_customer_id",
          "products",
          "product",
          "product_price",
          "prices",
          "discount",
          "subscription_id",
          "attached_custom_fields",
          "customer_metadata"
        ],
        "title": "Checkout",
        "description": "Checkout session data retrieved using an access token."
      },
      "CheckoutBillingAddressFields": {
        "properties": {
          "country": {
            "$ref": "#/components/schemas/BillingAddressFieldMode"
          },
          "state": {
            "$ref": "#/components/schemas/BillingAddressFieldMode"
          },
          "city": {
            "$ref": "#/components/schemas/BillingAddressFieldMode"
          },
          "postal_code": {
            "$ref": "#/components/schemas/BillingAddressFieldMode"
          },
          "line1": {
            "$ref": "#/components/schemas/BillingAddressFieldMode"
          },
          "line2": {
            "$ref": "#/components/schemas/BillingAddressFieldMode"
          }
        },
        "type": "object",
        "required": [
          "country",
          "state",
          "city",
          "postal_code",
          "line1",
          "line2"
        ],
        "title": "CheckoutBillingAddressFields"
      },
      "CheckoutConfirmStripe": {
        "properties": {
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID of the product to checkout. Must be present in the checkout's product list."
          },
          "product_price_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price Id",
            "description": "ID of the product price to checkout. Must correspond to a price present in the checkout's product list.",
            "deprecated": true
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0,
                "description": "Amount in cents, before discounts and taxes. Only useful for custom prices, it'll be ignored for fixed and free prices. "
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Number of seats for seat-based pricing."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Number of units for unit-based pricing."
          },
          "is_business_customer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Business Customer"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "description": "Email address of the customer."
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "payment_method_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method Type",
            "description": "Payment method type selected by the customer in the checkout form, e.g. `card`, `apple_pay` or `upi`."
          },
          "discount_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Code",
            "description": "Discount code to apply to the checkout."
          },
          "allow_trial": {
            "anyOf": [
              {
                "type": "boolean",
                "const": false
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Trial",
            "description": "Disable the trial period for the checkout session. It's mainly useful when the trial is blocked because the customer already redeemed one."
          },
          "confirmation_token_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirmation Token Id",
            "description": "ID of the Stripe confirmation token. Required for fixed prices and custom prices."
          }
        },
        "type": "object",
        "title": "CheckoutConfirmStripe",
        "description": "Confirm a checkout session using a Stripe confirmation token."
      },
      "CheckoutCreate": {
        "$ref": "#/components/schemas/CheckoutProductsCreate"
      },
      "CheckoutCreatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "checkout.created",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/CheckoutCreatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "CheckoutCreatedEvent",
        "description": "An event created by Polar when a checkout is created."
      },
      "CheckoutCreatedMetadata": {
        "properties": {
          "checkout_id": {
            "type": "string",
            "title": "Checkout Id"
          },
          "checkout_status": {
            "type": "string",
            "title": "Checkout Status"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          }
        },
        "type": "object",
        "required": [
          "checkout_id",
          "checkout_status"
        ],
        "title": "CheckoutCreatedMetadata"
      },
      "CheckoutDiscountFixedOnceForeverDuration": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "deprecated": true,
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "deprecated": true,
            "examples": [
              "usd"
            ]
          },
          "amounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Amounts",
            "description": "Map of currency to fixed amount to discount from the total.",
            "examples": [
              {
                "eur": 900,
                "usd": 1000
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "duration",
          "type",
          "amount",
          "currency",
          "amounts",
          "id",
          "name",
          "code"
        ],
        "title": "CheckoutDiscountFixedOnceForeverDuration",
        "description": "Schema for a fixed amount discount that is applied once or forever."
      },
      "CheckoutDiscountFixedRepeatDuration": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "duration_in_months": {
            "type": "integer",
            "title": "Duration In Months"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "deprecated": true,
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "deprecated": true,
            "examples": [
              "usd"
            ]
          },
          "amounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Amounts",
            "description": "Map of currency to fixed amount to discount from the total.",
            "examples": [
              {
                "eur": 900,
                "usd": 1000
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "duration",
          "duration_in_months",
          "type",
          "amount",
          "currency",
          "amounts",
          "id",
          "name",
          "code"
        ],
        "title": "CheckoutDiscountFixedRepeatDuration",
        "description": "Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months."
      },
      "CheckoutDiscountPercentageOnceForeverDuration": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "basis_points": {
            "type": "integer",
            "title": "Basis Points",
            "description": "Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.",
            "examples": [
              1000
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "duration",
          "type",
          "basis_points",
          "id",
          "name",
          "code"
        ],
        "title": "CheckoutDiscountPercentageOnceForeverDuration",
        "description": "Schema for a percentage discount that is applied once or forever."
      },
      "CheckoutDiscountPercentageRepeatDuration": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "duration_in_months": {
            "type": "integer",
            "title": "Duration In Months"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "basis_points": {
            "type": "integer",
            "title": "Basis Points",
            "description": "Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.",
            "examples": [
              1000
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "duration",
          "duration_in_months",
          "type",
          "basis_points",
          "id",
          "name",
          "code"
        ],
        "title": "CheckoutDiscountPercentageRepeatDuration",
        "description": "Schema for a percentage discount that is applied on every invoice\nfor a certain number of months."
      },
      "CheckoutForbiddenError": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/AlreadyActiveSubscriptionError"
          },
          {
            "$ref": "#/components/schemas/NotOpenCheckout"
          },
          {
            "$ref": "#/components/schemas/NotPermitted"
          },
          {
            "$ref": "#/components/schemas/PaymentNotReady"
          },
          {
            "$ref": "#/components/schemas/TrialAlreadyRedeemed"
          },
          {
            "$ref": "#/components/schemas/DiscountRedemptionLimitReached"
          }
        ]
      },
      "CheckoutLink": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "payment_processor": {
            "$ref": "#/components/schemas/PaymentProcessor",
            "description": "Payment processor used."
          },
          "client_secret": {
            "type": "string",
            "title": "Client Secret",
            "description": "Client secret used to access the checkout link."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Optional label to distinguish links internally"
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Preconfigured number of units for unit-based pricing. When set, checkout sessions created from this link are locked to this number of units and the customer won't be able to change it. All products on the link must use unit-based pricing and allow this number of units. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/CheckoutLinkProduct"
            },
            "type": "array",
            "title": "Products"
          },
          "discount": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase"
                  }
                ],
                "title": "CheckoutLinkDiscount"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "metadata",
          "payment_processor",
          "client_secret",
          "success_url",
          "return_url",
          "label",
          "allow_discount_codes",
          "require_billing_address",
          "discount_id",
          "seats",
          "units",
          "organization_id",
          "products",
          "discount",
          "url"
        ],
        "title": "CheckoutLink",
        "description": "Checkout link data."
      },
      "CheckoutLinkCreate": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CheckoutLinkCreateProductPrice"
          },
          {
            "$ref": "#/components/schemas/CheckoutLinkCreateProduct"
          },
          {
            "$ref": "#/components/schemas/CheckoutLinkCreateProducts"
          }
        ]
      },
      "CheckoutLinkCreateProduct": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "payment_processor": {
            "type": "string",
            "const": "stripe",
            "title": "Payment Processor",
            "description": "Payment processor to use. Currently only Stripe is supported."
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Optional label to distinguish links internally"
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.",
            "default": true
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.",
            "default": false
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Preconfigured number of units for unit-based pricing. When set, checkout sessions created from this link are locked to this number of units and the customer won't be able to change it. All products on the link must use unit-based pricing and allow this number of units. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id"
          }
        },
        "type": "object",
        "required": [
          "payment_processor",
          "product_id"
        ],
        "title": "CheckoutLinkCreateProduct",
        "description": "Schema to create a new checkout link from a a single product.\n\n**Deprecated**: Use `CheckoutLinkCreateProducts` instead."
      },
      "CheckoutLinkCreateProductPrice": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "payment_processor": {
            "type": "string",
            "const": "stripe",
            "title": "Payment Processor",
            "description": "Payment processor to use. Currently only Stripe is supported."
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Optional label to distinguish links internally"
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.",
            "default": true
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.",
            "default": false
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Preconfigured number of units for unit-based pricing. When set, checkout sessions created from this link are locked to this number of units and the customer won't be able to change it. All products on the link must use unit-based pricing and allow this number of units. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "product_price_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Price Id"
          }
        },
        "type": "object",
        "required": [
          "payment_processor",
          "product_price_id"
        ],
        "title": "CheckoutLinkCreateProductPrice",
        "description": "Schema to create a new checkout link from a a single product price.\n\n**Deprecated**: Use `CheckoutLinkCreateProducts` instead."
      },
      "CheckoutLinkCreateProducts": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "payment_processor": {
            "type": "string",
            "const": "stripe",
            "title": "Payment Processor",
            "description": "Payment processor to use. Currently only Stripe is supported."
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Optional label to distinguish links internally"
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.",
            "default": true
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.",
            "default": false
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Preconfigured number of units for unit-based pricing. When set, checkout sessions created from this link are locked to this number of units and the customer won't be able to change it. All products on the link must use unit-based pricing and allow this number of units. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "products": {
            "items": {
              "type": "string",
              "format": "uuid4"
            },
            "type": "array",
            "minItems": 1,
            "title": "Products",
            "description": "List of products that will be available to select at checkout."
          }
        },
        "type": "object",
        "required": [
          "payment_processor",
          "products"
        ],
        "title": "CheckoutLinkCreateProducts",
        "description": "Schema to create a new checkout link."
      },
      "CheckoutLinkProduct": {
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products."
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval."
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. None when no meter cycle is set."
          },
          "is_recurring": {
            "type": "boolean",
            "title": "Is Recurring",
            "description": "Whether the product is a subscription."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the product is archived and no longer available."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the product."
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                },
                {
                  "$ref": "#/components/schemas/ProductPrice"
                }
              ]
            },
            "type": "array",
            "title": "Prices",
            "description": "List of prices for this product."
          },
          "benefits": {
            "items": {
              "$ref": "#/components/schemas/BenefitPublic",
              "title": "BenefitPublic"
            },
            "type": "array",
            "title": "Benefits",
            "description": "List of benefits granted by the product."
          },
          "medias": {
            "items": {
              "$ref": "#/components/schemas/ProductMediaFileRead"
            },
            "type": "array",
            "title": "Medias",
            "description": "List of medias associated to the product."
          }
        },
        "type": "object",
        "required": [
          "metadata",
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "name",
          "description",
          "visibility",
          "recurring_interval",
          "recurring_interval_count",
          "meter_interval",
          "meter_interval_count",
          "is_recurring",
          "is_archived",
          "organization_id",
          "prices",
          "benefits",
          "medias"
        ],
        "title": "CheckoutLinkProduct",
        "description": "Product data for a checkout link."
      },
      "CheckoutLinkSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "label",
          "-label",
          "success_url",
          "-success_url",
          "allow_discount_codes",
          "-allow_discount_codes"
        ],
        "title": "CheckoutLinkSortProperty"
      },
      "CheckoutLinkUpdate": {
        "properties": {
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "products": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid4"
                },
                "type": "array",
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Products",
            "description": "List of products that will be available to select at checkout."
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "allow_discount_codes": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."
          },
          "require_billing_address": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Preconfigured number of units for unit-based pricing. When set, checkout sessions created from this link are locked to this number of units and the customer won't be able to change it. All products on the link must use unit-based pricing and allow this number of units. If the products no longer accommodate this value when the link is opened, it'll be ignored."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          }
        },
        "type": "object",
        "title": "CheckoutLinkUpdate",
        "description": "Schema to update an existing checkout link."
      },
      "CheckoutLocked": {
        "properties": {
          "error": {
            "type": "string",
            "const": "CheckoutLocked",
            "title": "Error",
            "examples": [
              "CheckoutLocked"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "CheckoutLocked"
      },
      "CheckoutOrganization": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Organization name shown in checkout, customer portal, emails etc."
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Unique organization slug in checkout, customer portal and credit card statements."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "description": "Avatar URL shown in checkout, customer portal, emails etc."
          },
          "proration_behavior": {
            "$ref": "#/components/schemas/SubscriptionProrationBehavior",
            "description": "Proration behavior applied when customer updates their subscription from the portal."
          },
          "allow_customer_updates": {
            "type": "boolean",
            "title": "Allow Customer Updates",
            "description": "Whether customers can update their subscriptions from the customer portal."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "slug",
          "avatar_url",
          "proration_behavior",
          "allow_customer_updates"
        ],
        "title": "CheckoutOrganization"
      },
      "CheckoutPriceCreate": {
        "properties": {
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout."
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.",
            "default": true
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.",
            "default": false
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0,
                "description": "Amount in cents, before discounts and taxes. Only useful for custom prices, it'll be ignored for fixed and free prices. "
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Predefined number of seats (works with seat-based pricing only)"
          },
          "min_seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Seats",
            "description": "Minimum number of seats (works with seat-based pricing only)"
          },
          "max_seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Seats",
            "description": "Maximum number of seats (works with seat-based pricing only)"
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Predefined number of units (works with unit-based pricing only)"
          },
          "min_units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Units",
            "description": "Minimum number of units (works with unit-based pricing only)"
          },
          "max_units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Units",
            "description": "Maximum number of units (works with unit-based pricing only)"
          },
          "allow_trial": {
            "type": "boolean",
            "title": "Allow Trial",
            "description": "Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.",
            "default": true
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer."
          },
          "is_business_customer": {
            "type": "boolean",
            "title": "Is Business Customer",
            "description": "Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.",
            "default": false
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set."
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "description": "Email address of the customer."
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipvanyaddress"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Ip Address"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "customer_metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Customer Metadata",
            "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin",
            "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "product_price_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Price Id",
            "description": "ID of the product price to checkout."
          }
        },
        "type": "object",
        "required": [
          "product_price_id"
        ],
        "title": "CheckoutPriceCreate",
        "description": "Create a new checkout session from a product price.\n\n**Deprecated**: Use `CheckoutProductsCreate` instead.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription."
      },
      "CheckoutProduct": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products."
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval."
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. None when no meter cycle is set."
          },
          "is_recurring": {
            "type": "boolean",
            "title": "Is Recurring",
            "description": "Whether the product is a subscription."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the product is archived and no longer available."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the product."
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                },
                {
                  "$ref": "#/components/schemas/ProductPrice"
                }
              ]
            },
            "type": "array",
            "title": "Prices",
            "description": "List of prices for this product."
          },
          "benefits": {
            "items": {
              "$ref": "#/components/schemas/BenefitPublic",
              "title": "BenefitPublic"
            },
            "type": "array",
            "title": "Benefits",
            "description": "List of benefits granted by the product."
          },
          "medias": {
            "items": {
              "$ref": "#/components/schemas/ProductMediaFileRead"
            },
            "type": "array",
            "title": "Medias",
            "description": "List of medias associated to the product."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "name",
          "description",
          "visibility",
          "recurring_interval",
          "recurring_interval_count",
          "meter_interval",
          "meter_interval_count",
          "is_recurring",
          "is_archived",
          "organization_id",
          "prices",
          "benefits",
          "medias"
        ],
        "title": "CheckoutProduct",
        "description": "Product data for a checkout session."
      },
      "CheckoutProductCreate": {
        "properties": {
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout."
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.",
            "default": true
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.",
            "default": false
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0,
                "description": "Amount in cents, before discounts and taxes. Only useful for custom prices, it'll be ignored for fixed and free prices. "
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Predefined number of seats (works with seat-based pricing only)"
          },
          "min_seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Seats",
            "description": "Minimum number of seats (works with seat-based pricing only)"
          },
          "max_seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Seats",
            "description": "Maximum number of seats (works with seat-based pricing only)"
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Predefined number of units (works with unit-based pricing only)"
          },
          "min_units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Units",
            "description": "Minimum number of units (works with unit-based pricing only)"
          },
          "max_units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Units",
            "description": "Maximum number of units (works with unit-based pricing only)"
          },
          "allow_trial": {
            "type": "boolean",
            "title": "Allow Trial",
            "description": "Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.",
            "default": true
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer."
          },
          "is_business_customer": {
            "type": "boolean",
            "title": "Is Business Customer",
            "description": "Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.",
            "default": false
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set."
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "description": "Email address of the customer."
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipvanyaddress"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Ip Address"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "customer_metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Customer Metadata",
            "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin",
            "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PresentmentCurrency",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ]
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "ID of the product to checkout. First available price will be selected."
          }
        },
        "type": "object",
        "required": [
          "product_id"
        ],
        "title": "CheckoutProductCreate",
        "description": "Create a new checkout session from a product.\n\n**Deprecated**: Use `CheckoutProductsCreate` instead.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription."
      },
      "CheckoutProductsCreate": {
        "properties": {
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout."
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.",
            "default": true
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.",
            "default": false
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0,
                "description": "Amount in cents, before discounts and taxes. Only useful for custom prices, it'll be ignored for fixed and free prices. "
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Predefined number of seats (works with seat-based pricing only)"
          },
          "min_seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Seats",
            "description": "Minimum number of seats (works with seat-based pricing only)"
          },
          "max_seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Seats",
            "description": "Maximum number of seats (works with seat-based pricing only)"
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Predefined number of units (works with unit-based pricing only)"
          },
          "min_units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Units",
            "description": "Minimum number of units (works with unit-based pricing only)"
          },
          "max_units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Units",
            "description": "Maximum number of units (works with unit-based pricing only)"
          },
          "allow_trial": {
            "type": "boolean",
            "title": "Allow Trial",
            "description": "Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.",
            "default": true
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer."
          },
          "is_business_customer": {
            "type": "boolean",
            "title": "Is Business Customer",
            "description": "Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.",
            "default": false
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set."
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "description": "Email address of the customer."
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipvanyaddress"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Ip Address"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "customer_metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Customer Metadata",
            "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin",
            "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PresentmentCurrency",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ]
          },
          "products": {
            "items": {
              "type": "string",
              "format": "uuid4"
            },
            "type": "array",
            "minItems": 1,
            "title": "Products",
            "description": "List of product IDs available to select at that checkout. The first one will be selected by default."
          },
          "prices": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ProductPriceFixedCreate"
                      },
                      {
                        "$ref": "#/components/schemas/ProductPriceCustomCreate"
                      },
                      {
                        "$ref": "#/components/schemas/ProductPriceSeatBasedCreate"
                      },
                      {
                        "$ref": "#/components/schemas/ProductPriceUnitBasedCreate"
                      },
                      {
                        "$ref": "#/components/schemas/ProductPriceMeteredUnitCreate"
                      },
                      {
                        "$ref": "#/components/schemas/ProductPriceMeteredTiersCreate"
                      }
                    ],
                    "discriminator": {
                      "propertyName": "amount_type",
                      "mapping": {
                        "custom": "#/components/schemas/ProductPriceCustomCreate",
                        "fixed": "#/components/schemas/ProductPriceFixedCreate",
                        "metered_tiers": "#/components/schemas/ProductPriceMeteredTiersCreate",
                        "metered_unit": "#/components/schemas/ProductPriceMeteredUnitCreate",
                        "seat_based": "#/components/schemas/ProductPriceSeatBasedCreate",
                        "unit_based": "#/components/schemas/ProductPriceUnitBasedCreate"
                      }
                    }
                  },
                  "type": "array",
                  "minItems": 1,
                  "description": "List of prices for the product. At most one fixed price and one seat-based price may be combined (billed as `fixed + seat_charge`), or a single custom price may stand alone, plus any number of metered prices. A custom price cannot be combined with a fixed or seat-based price."
                },
                "propertyNames": {
                  "format": "uuid4"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prices",
            "description": "Optional mapping of product IDs to a list of ad-hoc prices to create for that product. If not set, catalog prices of the product will be used."
          }
        },
        "type": "object",
        "required": [
          "products"
        ],
        "title": "CheckoutProductsCreate",
        "description": "Create a new checkout session from a list of products.\nCustomers will be able to switch between those products.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription."
      },
      "CheckoutPublic": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "payment_processor": {
            "$ref": "#/components/schemas/PaymentProcessor",
            "description": "Payment processor used."
          },
          "status": {
            "$ref": "#/components/schemas/CheckoutStatus",
            "description": "\n        Status of the checkout session.\n\n        - Open: the checkout session was opened.\n        - Expired: the checkout session was expired and is no more accessible.\n        - Confirmed: the user on the checkout session clicked Pay. This is not indicative of the payment's success status.\n        - Failed: the checkout definitely failed for technical reasons and cannot be retried. In most cases, this state is never reached.\n        - Succeeded: the payment on the checkout was performed successfully.\n        "
          },
          "client_secret": {
            "type": "string",
            "title": "Client Secret",
            "description": "Client secret used to update and complete the checkout session from the client."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "URL where the customer can access the checkout session."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "description": "Expiration date and time of the checkout session.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "success_url": {
            "type": "string",
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin",
            "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "Amount in cents, before discounts and taxes."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Predefined number of seats (works with seat-based pricing only)"
          },
          "min_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Seats",
            "description": "Minimum number of seats (works with seat-based pricing only)"
          },
          "max_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Seats",
            "description": "Maximum number of seats (works with seat-based pricing only)"
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Predefined number of units (works with unit-based pricing only)"
          },
          "min_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Units",
            "description": "Minimum number of units (works with unit-based pricing only)"
          },
          "max_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Units",
            "description": "Maximum number of units (works with unit-based pricing only)"
          },
          "discount_amount": {
            "type": "integer",
            "title": "Discount Amount",
            "description": "Discount amount in cents."
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount",
            "description": "Amount in cents, after discounts but before taxes."
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Amount",
            "description": "Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehavior"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated."
          },
          "total_amount": {
            "type": "integer",
            "title": "Total Amount",
            "description": "Amount in cents, after discounts and taxes."
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "Currency code of the checkout session."
          },
          "allow_trial": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Trial",
            "description": "Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured."
          },
          "active_trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product."
          },
          "active_trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Trial Interval Count",
            "description": "Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "End date and time of the trial period, if any."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "ID of the organization owning the checkout session."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID of the product to checkout."
          },
          "product_price_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price Id",
            "description": "ID of the product price to checkout.",
            "deprecated": true
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount applied to the checkout."
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`."
          },
          "is_discount_applicable": {
            "type": "boolean",
            "title": "Is Discount Applicable",
            "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."
          },
          "is_free_product_price": {
            "type": "boolean",
            "title": "Is Free Product Price",
            "description": "Whether the product price is free, regardless of discounts."
          },
          "is_payment_required": {
            "type": "boolean",
            "title": "Is Payment Required",
            "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."
          },
          "is_payment_setup_required": {
            "type": "boolean",
            "title": "Is Payment Setup Required",
            "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."
          },
          "is_payment_form_required": {
            "type": "boolean",
            "title": "Is Payment Form Required",
            "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "is_business_customer": {
            "type": "boolean",
            "title": "Is Business Customer",
            "description": "Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name."
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name",
            "description": "Name of the customer."
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email",
            "description": "Email address of the customer."
          },
          "customer_ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipvanyaddress"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Ip Address"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "payment_method_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method Type",
            "description": "Payment method type selected by the customer in the checkout form, e.g. `card`, `apple_pay` or `upi`."
          },
          "payment_processor_metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Payment Processor Metadata"
          },
          "billing_address_fields": {
            "$ref": "#/components/schemas/CheckoutBillingAddressFields",
            "description": "Determine which billing address fields should be disabled, optional or required in the checkout form."
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/CheckoutProduct"
            },
            "type": "array",
            "title": "Products",
            "description": "List of products available to select."
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CheckoutProduct"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product selected to checkout."
          },
          "product_price": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                  },
                  {
                    "$ref": "#/components/schemas/ProductPrice"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price",
            "description": "Price of the selected product.",
            "deprecated": true
          },
          "prices": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                      },
                      {
                        "$ref": "#/components/schemas/ProductPrice"
                      }
                    ]
                  },
                  "type": "array",
                  "description": "List of prices for this product."
                },
                "propertyNames": {
                  "format": "uuid4"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prices",
            "description": "Mapping of product IDs to their list of prices."
          },
          "discount": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "organization": {
            "$ref": "#/components/schemas/CheckoutOrganization"
          },
          "attached_custom_fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AttachedCustomField"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attached Custom Fields"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "payment_processor",
          "status",
          "client_secret",
          "url",
          "expires_at",
          "success_url",
          "return_url",
          "embed_origin",
          "amount",
          "units",
          "min_units",
          "max_units",
          "discount_amount",
          "net_amount",
          "tax_amount",
          "tax_behavior",
          "total_amount",
          "currency",
          "allow_trial",
          "active_trial_interval",
          "active_trial_interval_count",
          "trial_end",
          "organization_id",
          "product_id",
          "product_price_id",
          "discount_id",
          "allow_discount_codes",
          "require_billing_address",
          "is_discount_applicable",
          "is_free_product_price",
          "is_payment_required",
          "is_payment_setup_required",
          "is_payment_form_required",
          "customer_id",
          "is_business_customer",
          "customer_name",
          "customer_email",
          "customer_ip_address",
          "customer_billing_name",
          "customer_billing_address",
          "customer_tax_id",
          "payment_method_type",
          "payment_processor_metadata",
          "billing_address_fields",
          "products",
          "product",
          "product_price",
          "prices",
          "discount",
          "organization",
          "attached_custom_fields"
        ],
        "title": "CheckoutPublic",
        "description": "Checkout session data retrieved using the client secret."
      },
      "CheckoutPublicConfirmed": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "payment_processor": {
            "$ref": "#/components/schemas/PaymentProcessor",
            "description": "Payment processor used."
          },
          "status": {
            "type": "string",
            "const": "confirmed",
            "title": "Status"
          },
          "client_secret": {
            "type": "string",
            "title": "Client Secret",
            "description": "Client secret used to update and complete the checkout session from the client."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "URL where the customer can access the checkout session."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "description": "Expiration date and time of the checkout session.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "success_url": {
            "type": "string",
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin",
            "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "Amount in cents, before discounts and taxes."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Predefined number of seats (works with seat-based pricing only)"
          },
          "min_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Seats",
            "description": "Minimum number of seats (works with seat-based pricing only)"
          },
          "max_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Seats",
            "description": "Maximum number of seats (works with seat-based pricing only)"
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Predefined number of units (works with unit-based pricing only)"
          },
          "min_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Units",
            "description": "Minimum number of units (works with unit-based pricing only)"
          },
          "max_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Units",
            "description": "Maximum number of units (works with unit-based pricing only)"
          },
          "discount_amount": {
            "type": "integer",
            "title": "Discount Amount",
            "description": "Discount amount in cents."
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount",
            "description": "Amount in cents, after discounts but before taxes."
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Amount",
            "description": "Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehavior"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated."
          },
          "total_amount": {
            "type": "integer",
            "title": "Total Amount",
            "description": "Amount in cents, after discounts and taxes."
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "Currency code of the checkout session."
          },
          "allow_trial": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Trial",
            "description": "Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured."
          },
          "active_trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product."
          },
          "active_trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Trial Interval Count",
            "description": "Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "End date and time of the trial period, if any."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "ID of the organization owning the checkout session."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID of the product to checkout."
          },
          "product_price_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price Id",
            "description": "ID of the product price to checkout.",
            "deprecated": true
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount applied to the checkout."
          },
          "allow_discount_codes": {
            "type": "boolean",
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."
          },
          "require_billing_address": {
            "type": "boolean",
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`."
          },
          "is_discount_applicable": {
            "type": "boolean",
            "title": "Is Discount Applicable",
            "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."
          },
          "is_free_product_price": {
            "type": "boolean",
            "title": "Is Free Product Price",
            "description": "Whether the product price is free, regardless of discounts."
          },
          "is_payment_required": {
            "type": "boolean",
            "title": "Is Payment Required",
            "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."
          },
          "is_payment_setup_required": {
            "type": "boolean",
            "title": "Is Payment Setup Required",
            "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."
          },
          "is_payment_form_required": {
            "type": "boolean",
            "title": "Is Payment Form Required",
            "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "is_business_customer": {
            "type": "boolean",
            "title": "Is Business Customer",
            "description": "Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name."
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name",
            "description": "Name of the customer."
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email",
            "description": "Email address of the customer."
          },
          "customer_ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipvanyaddress"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Ip Address"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "payment_method_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method Type",
            "description": "Payment method type selected by the customer in the checkout form, e.g. `card`, `apple_pay` or `upi`."
          },
          "payment_processor_metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Payment Processor Metadata"
          },
          "billing_address_fields": {
            "$ref": "#/components/schemas/CheckoutBillingAddressFields",
            "description": "Determine which billing address fields should be disabled, optional or required in the checkout form."
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/CheckoutProduct"
            },
            "type": "array",
            "title": "Products",
            "description": "List of products available to select."
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CheckoutProduct"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product selected to checkout."
          },
          "product_price": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                  },
                  {
                    "$ref": "#/components/schemas/ProductPrice"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price",
            "description": "Price of the selected product.",
            "deprecated": true
          },
          "prices": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                      },
                      {
                        "$ref": "#/components/schemas/ProductPrice"
                      }
                    ]
                  },
                  "type": "array",
                  "description": "List of prices for this product."
                },
                "propertyNames": {
                  "format": "uuid4"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prices",
            "description": "Mapping of product IDs to their list of prices."
          },
          "discount": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "organization": {
            "$ref": "#/components/schemas/CheckoutOrganization"
          },
          "attached_custom_fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AttachedCustomField"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attached Custom Fields"
          },
          "customer_session_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Session Token"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "payment_processor",
          "status",
          "client_secret",
          "url",
          "expires_at",
          "success_url",
          "return_url",
          "embed_origin",
          "amount",
          "units",
          "min_units",
          "max_units",
          "discount_amount",
          "net_amount",
          "tax_amount",
          "tax_behavior",
          "total_amount",
          "currency",
          "allow_trial",
          "active_trial_interval",
          "active_trial_interval_count",
          "trial_end",
          "organization_id",
          "product_id",
          "product_price_id",
          "discount_id",
          "allow_discount_codes",
          "require_billing_address",
          "is_discount_applicable",
          "is_free_product_price",
          "is_payment_required",
          "is_payment_setup_required",
          "is_payment_form_required",
          "customer_id",
          "is_business_customer",
          "customer_name",
          "customer_email",
          "customer_ip_address",
          "customer_billing_name",
          "customer_billing_address",
          "customer_tax_id",
          "payment_method_type",
          "payment_processor_metadata",
          "billing_address_fields",
          "products",
          "product",
          "product_price",
          "prices",
          "discount",
          "organization",
          "attached_custom_fields",
          "customer_session_token"
        ],
        "title": "CheckoutPublicConfirmed",
        "description": "Checkout session data retrieved using the client secret after confirmation.\n\nIt contains a customer session token to retrieve order information\nright after the checkout."
      },
      "CheckoutSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "expires_at",
          "-expires_at",
          "status",
          "-status"
        ],
        "title": "CheckoutSortProperty"
      },
      "CheckoutStatus": {
        "type": "string",
        "enum": [
          "open",
          "expired",
          "confirmed",
          "succeeded",
          "failed"
        ],
        "title": "CheckoutStatus"
      },
      "CheckoutUpdate": {
        "properties": {
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID of the product to checkout. Must be present in the checkout's product list."
          },
          "product_price_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price Id",
            "description": "ID of the product price to checkout. Must correspond to a price present in the checkout's product list.",
            "deprecated": true
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0,
                "description": "Amount in cents, before discounts and taxes. Only useful for custom prices, it'll be ignored for fixed and free prices. "
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Number of seats for seat-based pricing."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Number of units for unit-based pricing."
          },
          "is_business_customer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Business Customer"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "description": "Email address of the customer."
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PresentmentCurrency",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "ID of the discount to apply to the checkout."
          },
          "allow_discount_codes": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Discount Codes",
            "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."
          },
          "require_billing_address": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Require Billing Address",
            "description": "Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`."
          },
          "allow_trial": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Trial",
            "description": "Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured."
          },
          "customer_ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipvanyaddress"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Ip Address"
          },
          "customer_metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 500,
                      "minLength": 1
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                },
                "propertyNames": {
                  "maxLength": 40,
                  "minLength": 1
                },
                "type": "object",
                "maxProperties": 50,
                "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Metadata",
            "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url",
            "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the checkout to return to this URL."
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin",
            "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."
          }
        },
        "type": "object",
        "title": "CheckoutUpdate",
        "description": "Update an existing checkout session using an access token."
      },
      "CheckoutUpdatePublic": {
        "properties": {
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID of the product to checkout. Must be present in the checkout's product list."
          },
          "product_price_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price Id",
            "description": "ID of the product price to checkout. Must correspond to a price present in the checkout's product list.",
            "deprecated": true
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0,
                "description": "Amount in cents, before discounts and taxes. Only useful for custom prices, it'll be ignored for fixed and free prices. "
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Number of seats for seat-based pricing."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Number of units for unit-based pricing."
          },
          "is_business_customer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Business Customer"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "description": "Email address of the customer."
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Billing Name"
          },
          "customer_billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput",
                "description": "Billing address of the customer."
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "payment_method_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method Type",
            "description": "Payment method type selected by the customer in the checkout form, e.g. `card`, `apple_pay` or `upi`."
          },
          "discount_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Code",
            "description": "Discount code to apply to the checkout."
          },
          "allow_trial": {
            "anyOf": [
              {
                "type": "boolean",
                "const": false
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Trial",
            "description": "Disable the trial period for the checkout session. It's mainly useful when the trial is blocked because the customer already redeemed one."
          }
        },
        "type": "object",
        "title": "CheckoutUpdatePublic",
        "description": "Update an existing checkout session using the client secret."
      },
      "CostMetadata-Input": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,5}|(?=[\\d.]{1,18}0*$)\\d{0,5}\\.\\d{0,12}0*$)"
              }
            ],
            "title": "Amount",
            "description": "The amount in cents."
          },
          "currency": {
            "type": "string",
            "pattern": "usd",
            "title": "Currency",
            "description": "The currency. Currently, only `usd` is supported."
          }
        },
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "title": "CostMetadata"
      },
      "CostMetadata-Output": {
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,5}|(?=[\\d.]{1,18}0*$)\\d{0,5}\\.\\d{0,12}0*$)",
            "title": "Amount",
            "description": "The amount in cents."
          },
          "currency": {
            "type": "string",
            "pattern": "usd",
            "title": "Currency",
            "description": "The currency. Currently, only `usd` is supported."
          }
        },
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "title": "CostMetadata"
      },
      "CountAggregation": {
        "properties": {
          "func": {
            "type": "string",
            "const": "count",
            "title": "Func",
            "default": "count"
          }
        },
        "type": "object",
        "title": "CountAggregation"
      },
      "CountryAlpha2": {
        "type": "string",
        "enum": [
          "AD",
          "AE",
          "AF",
          "AG",
          "AI",
          "AL",
          "AM",
          "AO",
          "AQ",
          "AR",
          "AS",
          "AT",
          "AU",
          "AW",
          "AX",
          "AZ",
          "BA",
          "BB",
          "BD",
          "BE",
          "BF",
          "BG",
          "BH",
          "BI",
          "BJ",
          "BL",
          "BM",
          "BN",
          "BO",
          "BQ",
          "BR",
          "BS",
          "BT",
          "BV",
          "BW",
          "BY",
          "BZ",
          "CA",
          "CC",
          "CD",
          "CF",
          "CG",
          "CH",
          "CI",
          "CK",
          "CL",
          "CM",
          "CN",
          "CO",
          "CR",
          "CU",
          "CV",
          "CW",
          "CX",
          "CY",
          "CZ",
          "DE",
          "DJ",
          "DK",
          "DM",
          "DO",
          "DZ",
          "EC",
          "EE",
          "EG",
          "EH",
          "ER",
          "ES",
          "ET",
          "FI",
          "FJ",
          "FK",
          "FM",
          "FO",
          "FR",
          "GA",
          "GB",
          "GD",
          "GE",
          "GF",
          "GG",
          "GH",
          "GI",
          "GL",
          "GM",
          "GN",
          "GP",
          "GQ",
          "GR",
          "GS",
          "GT",
          "GU",
          "GW",
          "GY",
          "HK",
          "HM",
          "HN",
          "HR",
          "HT",
          "HU",
          "ID",
          "IE",
          "IL",
          "IM",
          "IN",
          "IO",
          "IQ",
          "IR",
          "IS",
          "IT",
          "JE",
          "JM",
          "JO",
          "JP",
          "KE",
          "KG",
          "KH",
          "KI",
          "KM",
          "KN",
          "KP",
          "KR",
          "KW",
          "KY",
          "KZ",
          "LA",
          "LB",
          "LC",
          "LI",
          "LK",
          "LR",
          "LS",
          "LT",
          "LU",
          "LV",
          "LY",
          "MA",
          "MC",
          "MD",
          "ME",
          "MF",
          "MG",
          "MH",
          "MK",
          "ML",
          "MM",
          "MN",
          "MO",
          "MP",
          "MQ",
          "MR",
          "MS",
          "MT",
          "MU",
          "MV",
          "MW",
          "MX",
          "MY",
          "MZ",
          "NA",
          "NC",
          "NE",
          "NF",
          "NG",
          "NI",
          "NL",
          "NO",
          "NP",
          "NR",
          "NU",
          "NZ",
          "OM",
          "PA",
          "PE",
          "PF",
          "PG",
          "PH",
          "PK",
          "PL",
          "PM",
          "PN",
          "PR",
          "PS",
          "PT",
          "PW",
          "PY",
          "QA",
          "RE",
          "RO",
          "RS",
          "RU",
          "RW",
          "SA",
          "SB",
          "SC",
          "SD",
          "SE",
          "SG",
          "SH",
          "SI",
          "SJ",
          "SK",
          "SL",
          "SM",
          "SN",
          "SO",
          "SR",
          "SS",
          "ST",
          "SV",
          "SX",
          "SY",
          "SZ",
          "TC",
          "TD",
          "TF",
          "TG",
          "TH",
          "TJ",
          "TK",
          "TL",
          "TM",
          "TN",
          "TO",
          "TR",
          "TT",
          "TV",
          "TW",
          "TZ",
          "UA",
          "UG",
          "UM",
          "US",
          "UY",
          "UZ",
          "VA",
          "VC",
          "VE",
          "VG",
          "VI",
          "VN",
          "VU",
          "WF",
          "WS",
          "YE",
          "YT",
          "ZA",
          "ZM",
          "ZW"
        ],
        "title": "CountryAlpha2"
      },
      "CountryAlpha2Input": {
        "type": "string",
        "enum": [
          "AD",
          "AE",
          "AF",
          "AG",
          "AI",
          "AL",
          "AM",
          "AO",
          "AQ",
          "AR",
          "AS",
          "AT",
          "AU",
          "AW",
          "AX",
          "AZ",
          "BA",
          "BB",
          "BD",
          "BE",
          "BF",
          "BG",
          "BH",
          "BI",
          "BJ",
          "BL",
          "BM",
          "BN",
          "BO",
          "BQ",
          "BR",
          "BS",
          "BT",
          "BV",
          "BW",
          "BY",
          "BZ",
          "CA",
          "CC",
          "CD",
          "CF",
          "CG",
          "CH",
          "CI",
          "CK",
          "CL",
          "CM",
          "CN",
          "CO",
          "CR",
          "CV",
          "CW",
          "CX",
          "CY",
          "CZ",
          "DE",
          "DJ",
          "DK",
          "DM",
          "DO",
          "DZ",
          "EC",
          "EE",
          "EG",
          "EH",
          "ER",
          "ES",
          "ET",
          "FI",
          "FJ",
          "FK",
          "FM",
          "FO",
          "FR",
          "GA",
          "GB",
          "GD",
          "GE",
          "GF",
          "GG",
          "GH",
          "GI",
          "GL",
          "GM",
          "GN",
          "GP",
          "GQ",
          "GR",
          "GS",
          "GT",
          "GU",
          "GW",
          "GY",
          "HK",
          "HM",
          "HN",
          "HR",
          "HT",
          "HU",
          "ID",
          "IE",
          "IL",
          "IM",
          "IN",
          "IO",
          "IQ",
          "IS",
          "IT",
          "JE",
          "JM",
          "JO",
          "JP",
          "KE",
          "KG",
          "KH",
          "KI",
          "KM",
          "KN",
          "KR",
          "KW",
          "KY",
          "KZ",
          "LA",
          "LB",
          "LC",
          "LI",
          "LK",
          "LR",
          "LS",
          "LT",
          "LU",
          "LV",
          "LY",
          "MA",
          "MC",
          "MD",
          "ME",
          "MF",
          "MG",
          "MH",
          "MK",
          "ML",
          "MM",
          "MN",
          "MO",
          "MP",
          "MQ",
          "MR",
          "MS",
          "MT",
          "MU",
          "MV",
          "MW",
          "MX",
          "MY",
          "MZ",
          "NA",
          "NC",
          "NE",
          "NF",
          "NG",
          "NI",
          "NL",
          "NO",
          "NP",
          "NR",
          "NU",
          "NZ",
          "OM",
          "PA",
          "PE",
          "PF",
          "PG",
          "PH",
          "PK",
          "PL",
          "PM",
          "PN",
          "PR",
          "PS",
          "PT",
          "PW",
          "PY",
          "QA",
          "RE",
          "RO",
          "RS",
          "RW",
          "SA",
          "SB",
          "SC",
          "SD",
          "SE",
          "SG",
          "SH",
          "SI",
          "SJ",
          "SK",
          "SL",
          "SM",
          "SN",
          "SO",
          "SR",
          "SS",
          "ST",
          "SV",
          "SX",
          "SZ",
          "TC",
          "TD",
          "TF",
          "TG",
          "TH",
          "TJ",
          "TK",
          "TL",
          "TM",
          "TN",
          "TO",
          "TR",
          "TT",
          "TV",
          "TW",
          "TZ",
          "UA",
          "UG",
          "UM",
          "US",
          "UY",
          "UZ",
          "VA",
          "VC",
          "VE",
          "VG",
          "VI",
          "VN",
          "VU",
          "WF",
          "WS",
          "YE",
          "YT",
          "ZA",
          "ZM",
          "ZW"
        ],
        "title": "CountryAlpha2Input"
      },
      "CursorPagination": {
        "properties": {
          "has_next_page": {
            "type": "boolean",
            "title": "Has Next Page"
          }
        },
        "type": "object",
        "required": [
          "has_next_page"
        ],
        "title": "CursorPagination"
      },
      "CustomField": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomFieldText"
          },
          {
            "$ref": "#/components/schemas/CustomFieldNumber"
          },
          {
            "$ref": "#/components/schemas/CustomFieldDate"
          },
          {
            "$ref": "#/components/schemas/CustomFieldCheckbox"
          },
          {
            "$ref": "#/components/schemas/CustomFieldSelect"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "checkbox": "#/components/schemas/CustomFieldCheckbox",
            "date": "#/components/schemas/CustomFieldDate",
            "number": "#/components/schemas/CustomFieldNumber",
            "select": "#/components/schemas/CustomFieldSelect",
            "text": "#/components/schemas/CustomFieldText"
          }
        }
      },
      "CustomFieldCheckbox": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "type": {
            "type": "string",
            "const": "checkbox",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldCheckboxProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "type",
          "slug",
          "name",
          "organization_id",
          "properties"
        ],
        "title": "CustomFieldCheckbox",
        "description": "Schema for a custom field of type checkbox."
      },
      "CustomFieldCheckboxProperties": {
        "properties": {
          "form_label": {
            "type": "string",
            "minLength": 1,
            "title": "Form Label"
          },
          "form_help_text": {
            "type": "string",
            "minLength": 1,
            "title": "Form Help Text"
          },
          "form_placeholder": {
            "type": "string",
            "minLength": 1,
            "title": "Form Placeholder"
          }
        },
        "type": "object",
        "title": "CustomFieldCheckboxProperties"
      },
      "CustomFieldCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomFieldCreateText"
          },
          {
            "$ref": "#/components/schemas/CustomFieldCreateNumber"
          },
          {
            "$ref": "#/components/schemas/CustomFieldCreateDate"
          },
          {
            "$ref": "#/components/schemas/CustomFieldCreateCheckbox"
          },
          {
            "$ref": "#/components/schemas/CustomFieldCreateSelect"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "checkbox": "#/components/schemas/CustomFieldCreateCheckbox",
            "date": "#/components/schemas/CustomFieldCreateDate",
            "number": "#/components/schemas/CustomFieldCreateNumber",
            "select": "#/components/schemas/CustomFieldCreateSelect",
            "text": "#/components/schemas/CustomFieldCreateText"
          }
        }
      },
      "CustomFieldCreateCheckbox": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "checkbox",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-_]+$",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**"
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldCheckboxProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "slug",
          "name",
          "properties"
        ],
        "title": "CustomFieldCreateCheckbox",
        "description": "Schema to create a custom field of type checkbox."
      },
      "CustomFieldCreateDate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "date",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-_]+$",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**"
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldDateProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "slug",
          "name",
          "properties"
        ],
        "title": "CustomFieldCreateDate",
        "description": "Schema to create a custom field of type date."
      },
      "CustomFieldCreateNumber": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "number",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-_]+$",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**"
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldNumberProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "slug",
          "name",
          "properties"
        ],
        "title": "CustomFieldCreateNumber",
        "description": "Schema to create a custom field of type number."
      },
      "CustomFieldCreateSelect": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "select",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-_]+$",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**"
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldSelectProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "slug",
          "name",
          "properties"
        ],
        "title": "CustomFieldCreateSelect",
        "description": "Schema to create a custom field of type select."
      },
      "CustomFieldCreateText": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-_]+$",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**"
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldTextProperties"
          }
        },
        "type": "object",
        "required": [
          "type",
          "slug",
          "name",
          "properties"
        ],
        "title": "CustomFieldCreateText",
        "description": "Schema to create a custom field of type text."
      },
      "CustomFieldDate": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "type": {
            "type": "string",
            "const": "date",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldDateProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "type",
          "slug",
          "name",
          "organization_id",
          "properties"
        ],
        "title": "CustomFieldDate",
        "description": "Schema for a custom field of type date."
      },
      "CustomFieldDateProperties": {
        "properties": {
          "form_label": {
            "type": "string",
            "minLength": 1,
            "title": "Form Label"
          },
          "form_help_text": {
            "type": "string",
            "minLength": 1,
            "title": "Form Help Text"
          },
          "form_placeholder": {
            "type": "string",
            "minLength": 1,
            "title": "Form Placeholder"
          },
          "ge": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Ge"
          },
          "le": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Le"
          }
        },
        "type": "object",
        "title": "CustomFieldDateProperties"
      },
      "CustomFieldNumber": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "type": {
            "type": "string",
            "const": "number",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldNumberProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "type",
          "slug",
          "name",
          "organization_id",
          "properties"
        ],
        "title": "CustomFieldNumber",
        "description": "Schema for a custom field of type number."
      },
      "CustomFieldNumberProperties": {
        "properties": {
          "form_label": {
            "type": "string",
            "minLength": 1,
            "title": "Form Label"
          },
          "form_help_text": {
            "type": "string",
            "minLength": 1,
            "title": "Form Help Text"
          },
          "form_placeholder": {
            "type": "string",
            "minLength": 1,
            "title": "Form Placeholder"
          },
          "ge": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Ge"
          },
          "le": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Le"
          }
        },
        "type": "object",
        "title": "CustomFieldNumberProperties"
      },
      "CustomFieldSelect": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "type": {
            "type": "string",
            "const": "select",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldSelectProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "type",
          "slug",
          "name",
          "organization_id",
          "properties"
        ],
        "title": "CustomFieldSelect",
        "description": "Schema for a custom field of type select."
      },
      "CustomFieldSelectOption": {
        "properties": {
          "value": {
            "type": "string",
            "minLength": 1,
            "title": "Value"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "title": "Label"
          }
        },
        "type": "object",
        "required": [
          "value",
          "label"
        ],
        "title": "CustomFieldSelectOption"
      },
      "CustomFieldSelectProperties": {
        "properties": {
          "form_label": {
            "type": "string",
            "minLength": 1,
            "title": "Form Label"
          },
          "form_help_text": {
            "type": "string",
            "minLength": 1,
            "title": "Form Help Text"
          },
          "form_placeholder": {
            "type": "string",
            "minLength": 1,
            "title": "Form Placeholder"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/CustomFieldSelectOption"
            },
            "type": "array",
            "minItems": 1,
            "title": "Options"
          }
        },
        "type": "object",
        "required": [
          "options"
        ],
        "title": "CustomFieldSelectProperties"
      },
      "CustomFieldSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "slug",
          "-slug",
          "name",
          "-name",
          "type",
          "-type"
        ],
        "title": "CustomFieldSortProperty"
      },
      "CustomFieldText": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Identifier of the custom field. It'll be used as key when storing the value."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the custom field."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the custom field.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/CustomFieldTextProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "type",
          "slug",
          "name",
          "organization_id",
          "properties"
        ],
        "title": "CustomFieldText",
        "description": "Schema for a custom field of type text."
      },
      "CustomFieldTextProperties": {
        "properties": {
          "form_label": {
            "type": "string",
            "minLength": 1,
            "title": "Form Label"
          },
          "form_help_text": {
            "type": "string",
            "minLength": 1,
            "title": "Form Help Text"
          },
          "form_placeholder": {
            "type": "string",
            "minLength": 1,
            "title": "Form Placeholder"
          },
          "textarea": {
            "type": "boolean",
            "title": "Textarea"
          },
          "min_length": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": 0.0,
            "title": "Min Length"
          },
          "max_length": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": 0.0,
            "title": "Max Length"
          }
        },
        "type": "object",
        "title": "CustomFieldTextProperties"
      },
      "CustomFieldType": {
        "type": "string",
        "enum": [
          "text",
          "number",
          "date",
          "checkbox",
          "select"
        ],
        "title": "CustomFieldType"
      },
      "CustomFieldUpdate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomFieldUpdateText"
          },
          {
            "$ref": "#/components/schemas/CustomFieldUpdateNumber"
          },
          {
            "$ref": "#/components/schemas/CustomFieldUpdateDate"
          },
          {
            "$ref": "#/components/schemas/CustomFieldUpdateCheckbox"
          },
          {
            "$ref": "#/components/schemas/CustomFieldUpdateSelect"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "checkbox": "#/components/schemas/CustomFieldUpdateCheckbox",
            "date": "#/components/schemas/CustomFieldUpdateDate",
            "number": "#/components/schemas/CustomFieldUpdateNumber",
            "select": "#/components/schemas/CustomFieldUpdateSelect",
            "text": "#/components/schemas/CustomFieldUpdateText"
          }
        }
      },
      "CustomFieldUpdateCheckbox": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Name of the custom field."
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^[a-z0-9-_]+$",
                "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "type": {
            "type": "string",
            "const": "checkbox",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldCheckboxProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CustomFieldUpdateCheckbox",
        "description": "Schema to update a custom field of type checkbox."
      },
      "CustomFieldUpdateDate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Name of the custom field."
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^[a-z0-9-_]+$",
                "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "type": {
            "type": "string",
            "const": "date",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldDateProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CustomFieldUpdateDate",
        "description": "Schema to update a custom field of type date."
      },
      "CustomFieldUpdateNumber": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Name of the custom field."
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^[a-z0-9-_]+$",
                "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "type": {
            "type": "string",
            "const": "number",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldNumberProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CustomFieldUpdateNumber",
        "description": "Schema to update a custom field of type number."
      },
      "CustomFieldUpdateSelect": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Name of the custom field."
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^[a-z0-9-_]+$",
                "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "type": {
            "type": "string",
            "const": "select",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldSelectProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CustomFieldUpdateSelect",
        "description": "Schema to update a custom field of type select."
      },
      "CustomFieldUpdateText": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Name of the custom field."
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^[a-z0-9-_]+$",
                "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type"
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomFieldTextProperties"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CustomFieldUpdateText",
        "description": "Schema to update a custom field of type text."
      },
      "Customer": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomerIndividual"
          },
          {
            "$ref": "#/components/schemas/CustomerTeam"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "individual": "#/components/schemas/CustomerIndividual",
            "team": "#/components/schemas/CustomerTeam"
          }
        }
      },
      "CustomerBenefitGrant": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantDiscord"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepository"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantDownloadables"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantLicenseKeys"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantCustom"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantMeterCredit"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantFeatureFlag"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantSlackSharedChannel"
          }
        ]
      },
      "CustomerBenefitGrantCustom": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted"
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomer"
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitCustomSubscriber"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantCustomProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "granted_at",
          "revoked_at",
          "customer_id",
          "benefit_id",
          "subscription_id",
          "order_id",
          "is_granted",
          "is_revoked",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "CustomerBenefitGrantCustom"
      },
      "CustomerBenefitGrantCustomUpdate": {
        "properties": {
          "benefit_type": {
            "type": "string",
            "const": "custom",
            "title": "Benefit Type"
          }
        },
        "type": "object",
        "required": [
          "benefit_type"
        ],
        "title": "CustomerBenefitGrantCustomUpdate"
      },
      "CustomerBenefitGrantDiscord": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted"
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerBenefitGrantMember"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitDiscordSubscriber"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantDiscordProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "granted_at",
          "revoked_at",
          "customer_id",
          "benefit_id",
          "subscription_id",
          "order_id",
          "is_granted",
          "is_revoked",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "CustomerBenefitGrantDiscord"
      },
      "CustomerBenefitGrantDiscordPropertiesUpdate": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          }
        },
        "type": "object",
        "required": [
          "account_id"
        ],
        "title": "CustomerBenefitGrantDiscordPropertiesUpdate"
      },
      "CustomerBenefitGrantDiscordUpdate": {
        "properties": {
          "benefit_type": {
            "type": "string",
            "const": "discord",
            "title": "Benefit Type"
          },
          "properties": {
            "$ref": "#/components/schemas/CustomerBenefitGrantDiscordPropertiesUpdate"
          }
        },
        "type": "object",
        "required": [
          "benefit_type",
          "properties"
        ],
        "title": "CustomerBenefitGrantDiscordUpdate"
      },
      "CustomerBenefitGrantDownloadables": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted"
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomer"
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitDownloadablesSubscriber"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "granted_at",
          "revoked_at",
          "customer_id",
          "benefit_id",
          "subscription_id",
          "order_id",
          "is_granted",
          "is_revoked",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "CustomerBenefitGrantDownloadables"
      },
      "CustomerBenefitGrantDownloadablesUpdate": {
        "properties": {
          "benefit_type": {
            "type": "string",
            "const": "downloadables",
            "title": "Benefit Type"
          }
        },
        "type": "object",
        "required": [
          "benefit_type"
        ],
        "title": "CustomerBenefitGrantDownloadablesUpdate"
      },
      "CustomerBenefitGrantFeatureFlag": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted"
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomer"
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitFeatureFlagSubscriber"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantFeatureFlagProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "granted_at",
          "revoked_at",
          "customer_id",
          "benefit_id",
          "subscription_id",
          "order_id",
          "is_granted",
          "is_revoked",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "CustomerBenefitGrantFeatureFlag"
      },
      "CustomerBenefitGrantFeatureFlagUpdate": {
        "properties": {
          "benefit_type": {
            "type": "string",
            "const": "feature_flag",
            "title": "Benefit Type"
          }
        },
        "type": "object",
        "required": [
          "benefit_type"
        ],
        "title": "CustomerBenefitGrantFeatureFlagUpdate"
      },
      "CustomerBenefitGrantGitHubRepository": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted"
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomer"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerBenefitGrantMember"
              },
              {
                "type": "null"
              }
            ]
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitGitHubRepositorySubscriber"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "granted_at",
          "revoked_at",
          "customer_id",
          "benefit_id",
          "subscription_id",
          "order_id",
          "is_granted",
          "is_revoked",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "CustomerBenefitGrantGitHubRepository"
      },
      "CustomerBenefitGrantGitHubRepositoryPropertiesUpdate": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          }
        },
        "type": "object",
        "required": [
          "account_id"
        ],
        "title": "CustomerBenefitGrantGitHubRepositoryPropertiesUpdate"
      },
      "CustomerBenefitGrantGitHubRepositoryUpdate": {
        "properties": {
          "benefit_type": {
            "type": "string",
            "const": "github_repository",
            "title": "Benefit Type"
          },
          "properties": {
            "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryPropertiesUpdate"
          }
        },
        "type": "object",
        "required": [
          "benefit_type",
          "properties"
        ],
        "title": "CustomerBenefitGrantGitHubRepositoryUpdate"
      },
      "CustomerBenefitGrantLicenseKeys": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted"
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomer"
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitLicenseKeysSubscriber"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "granted_at",
          "revoked_at",
          "customer_id",
          "benefit_id",
          "subscription_id",
          "order_id",
          "is_granted",
          "is_revoked",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "CustomerBenefitGrantLicenseKeys"
      },
      "CustomerBenefitGrantLicenseKeysUpdate": {
        "properties": {
          "benefit_type": {
            "type": "string",
            "const": "license_keys",
            "title": "Benefit Type"
          }
        },
        "type": "object",
        "required": [
          "benefit_type"
        ],
        "title": "CustomerBenefitGrantLicenseKeysUpdate"
      },
      "CustomerBenefitGrantMember": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "oauth_accounts": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CustomerPortalOAuthAccount"
            },
            "type": "object",
            "title": "Oauth Accounts"
          }
        },
        "type": "object",
        "required": [
          "id",
          "oauth_accounts"
        ],
        "title": "CustomerBenefitGrantMember"
      },
      "CustomerBenefitGrantMeterCredit": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted"
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomer"
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitMeterCreditSubscriber"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantMeterCreditProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "granted_at",
          "revoked_at",
          "customer_id",
          "benefit_id",
          "subscription_id",
          "order_id",
          "is_granted",
          "is_revoked",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "CustomerBenefitGrantMeterCredit"
      },
      "CustomerBenefitGrantMeterCreditUpdate": {
        "properties": {
          "benefit_type": {
            "type": "string",
            "const": "meter_credit",
            "title": "Benefit Type"
          }
        },
        "type": "object",
        "required": [
          "benefit_type"
        ],
        "title": "CustomerBenefitGrantMeterCreditUpdate"
      },
      "CustomerBenefitGrantSlackSharedChannel": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted"
          },
          "is_revoked": {
            "type": "boolean",
            "title": "Is Revoked"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantError"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomer"
          },
          "benefit": {
            "$ref": "#/components/schemas/BenefitSlackSharedChannelSubscriber"
          },
          "properties": {
            "$ref": "#/components/schemas/BenefitGrantSlackSharedChannelProperties"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "granted_at",
          "revoked_at",
          "customer_id",
          "benefit_id",
          "subscription_id",
          "order_id",
          "is_granted",
          "is_revoked",
          "customer",
          "benefit",
          "properties"
        ],
        "title": "CustomerBenefitGrantSlackSharedChannel"
      },
      "CustomerBenefitGrantSlackSharedChannelPropertiesUpdate": {
        "properties": {
          "invited_email": {
            "type": "string",
            "format": "email",
            "title": "Invited Email"
          }
        },
        "type": "object",
        "required": [
          "invited_email"
        ],
        "title": "CustomerBenefitGrantSlackSharedChannelPropertiesUpdate"
      },
      "CustomerBenefitGrantSlackSharedChannelUpdate": {
        "properties": {
          "benefit_type": {
            "type": "string",
            "const": "slack_shared_channel",
            "title": "Benefit Type"
          },
          "properties": {
            "$ref": "#/components/schemas/CustomerBenefitGrantSlackSharedChannelPropertiesUpdate"
          }
        },
        "type": "object",
        "required": [
          "benefit_type",
          "properties"
        ],
        "title": "CustomerBenefitGrantSlackSharedChannelUpdate"
      },
      "CustomerBenefitGrantSortProperty": {
        "type": "string",
        "enum": [
          "granted_at",
          "-granted_at",
          "type",
          "-type",
          "organization",
          "-organization",
          "product_benefit",
          "-product_benefit"
        ],
        "title": "CustomerBenefitGrantSortProperty"
      },
      "CustomerBenefitGrantUpdate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantDiscordUpdate"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantDownloadablesUpdate"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantCustomUpdate"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantMeterCreditUpdate"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantFeatureFlagUpdate"
          },
          {
            "$ref": "#/components/schemas/CustomerBenefitGrantSlackSharedChannelUpdate"
          }
        ],
        "discriminator": {
          "propertyName": "benefit_type",
          "mapping": {
            "custom": "#/components/schemas/CustomerBenefitGrantCustomUpdate",
            "discord": "#/components/schemas/CustomerBenefitGrantDiscordUpdate",
            "downloadables": "#/components/schemas/CustomerBenefitGrantDownloadablesUpdate",
            "feature_flag": "#/components/schemas/CustomerBenefitGrantFeatureFlagUpdate",
            "github_repository": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate",
            "license_keys": "#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate",
            "meter_credit": "#/components/schemas/CustomerBenefitGrantMeterCreditUpdate",
            "slack_shared_channel": "#/components/schemas/CustomerBenefitGrantSlackSharedChannelUpdate"
          }
        }
      },
      "CustomerCancellationReason": {
        "type": "string",
        "enum": [
          "customer_service",
          "low_quality",
          "missing_features",
          "switched_service",
          "too_complex",
          "too_expensive",
          "unused",
          "other"
        ],
        "title": "CustomerCancellationReason"
      },
      "CustomerCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomerIndividualCreate"
          },
          {
            "$ref": "#/components/schemas/CustomerTeamCreate"
          }
        ]
      },
      "CustomerCreatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "customer.created",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/CustomerCreatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "CustomerCreatedEvent",
        "description": "An event created by Polar when a customer is created."
      },
      "CustomerCreatedMetadata": {
        "properties": {
          "customer_id": {
            "type": "string",
            "title": "Customer Id"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer External Id"
          }
        },
        "type": "object",
        "required": [
          "customer_id",
          "customer_email",
          "customer_name",
          "customer_external_id"
        ],
        "title": "CustomerCreatedMetadata"
      },
      "CustomerCustomerMeter": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter.",
            "examples": [
              "d498a884-e2cd-4d3e-8002-f536468a8b22"
            ]
          },
          "consumed_units": {
            "type": "number",
            "title": "Consumed Units",
            "description": "The number of consumed units.",
            "examples": [
              25.0
            ]
          },
          "credited_units": {
            "type": "integer",
            "title": "Credited Units",
            "description": "The number of credited units.",
            "examples": [
              100
            ]
          },
          "balance": {
            "type": "number",
            "title": "Balance",
            "description": "The balance of the meter, i.e. the difference between credited and consumed units.",
            "examples": [
              75.0
            ]
          },
          "meter": {
            "$ref": "#/components/schemas/CustomerCustomerMeterMeter"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "customer_id",
          "meter_id",
          "consumed_units",
          "credited_units",
          "balance",
          "meter"
        ],
        "title": "CustomerCustomerMeter"
      },
      "CustomerCustomerMeterMeter": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the meter. Will be shown on customer's invoices and usage."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name"
        ],
        "title": "CustomerCustomerMeterMeter"
      },
      "CustomerCustomerMeterSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "modified_at",
          "-modified_at",
          "meter_id",
          "-meter_id",
          "meter_name",
          "-meter_name",
          "consumed_units",
          "-consumed_units",
          "credited_units",
          "-credited_units",
          "balance",
          "-balance"
        ],
        "title": "CustomerCustomerMeterSortProperty"
      },
      "CustomerCustomerSession": {
        "properties": {
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          }
        },
        "type": "object",
        "required": [
          "expires_at",
          "return_url"
        ],
        "title": "CustomerCustomerSession"
      },
      "CustomerDeletedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "customer.deleted",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/CustomerDeletedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "CustomerDeletedEvent",
        "description": "An event created by Polar when a customer is deleted."
      },
      "CustomerDeletedMetadata": {
        "properties": {
          "customer_id": {
            "type": "string",
            "title": "Customer Id"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer External Id"
          }
        },
        "type": "object",
        "required": [
          "customer_id",
          "customer_email",
          "customer_name",
          "customer_external_id"
        ],
        "title": "CustomerDeletedMetadata"
      },
      "CustomerEmailUpdateRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "CustomerEmailUpdateRequest"
      },
      "CustomerEmailUpdateVerifyRequest": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "CustomerEmailUpdateVerifyRequest"
      },
      "CustomerEmailUpdateVerifyResponse": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "CustomerEmailUpdateVerifyResponse"
      },
      "CustomerIndividual": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "email": {
            "type": "string",
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified",
            "description": "Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.",
            "examples": [
              true
            ]
          },
          "type": {
            "type": "string",
            "const": "individual",
            "title": "Type",
            "description": "The type of customer.",
            "examples": [
              "individual"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the customer.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id",
            "description": "The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details."
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "first_user_event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "First User Event At",
            "description": "Timestamp of the first event ingested for this customer. Can predate `created_at`, and is null if no event was ever ingested."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "examples": [
              "https://www.gravatar.com/avatar/xxx?d=404"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "email",
          "email_verified",
          "type",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "organization_id",
          "deleted_at",
          "first_user_event_at",
          "avatar_url"
        ],
        "title": "CustomerIndividual",
        "description": "A customer in an organization."
      },
      "CustomerIndividualCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer. **Required unless you use an organization token.**"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemberOwnerCreate"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name."
          },
          "type": {
            "type": "string",
            "const": "individual",
            "title": "Type",
            "default": "individual"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "CustomerIndividualCreate"
      },
      "CustomerMeter": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter.",
            "examples": [
              "d498a884-e2cd-4d3e-8002-f536468a8b22"
            ]
          },
          "consumed_units": {
            "type": "number",
            "title": "Consumed Units",
            "description": "The number of consumed units.",
            "examples": [
              25.0
            ]
          },
          "credited_units": {
            "type": "integer",
            "title": "Credited Units",
            "description": "The number of credited units.",
            "examples": [
              100
            ]
          },
          "balance": {
            "type": "number",
            "title": "Balance",
            "description": "The balance of the meter, i.e. the difference between credited and consumed units.",
            "examples": [
              75.0
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/Customer",
            "description": "The customer associated with this meter."
          },
          "meter": {
            "$ref": "#/components/schemas/Meter",
            "description": "The meter associated with this customer."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "customer_id",
          "meter_id",
          "consumed_units",
          "credited_units",
          "balance",
          "customer",
          "meter"
        ],
        "title": "CustomerMeter",
        "description": "An active customer meter, with current consumed and credited units."
      },
      "CustomerMeterSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "modified_at",
          "-modified_at",
          "customer_id",
          "-customer_id",
          "customer_name",
          "-customer_name",
          "meter_id",
          "-meter_id",
          "meter_name",
          "-meter_name",
          "consumed_units",
          "-consumed_units",
          "credited_units",
          "-credited_units",
          "balance",
          "-balance"
        ],
        "title": "CustomerMeterSortProperty"
      },
      "CustomerNotReady": {
        "properties": {
          "error": {
            "type": "string",
            "const": "CustomerNotReady",
            "title": "Error",
            "examples": [
              "CustomerNotReady"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "CustomerNotReady"
      },
      "CustomerOrder": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus",
            "examples": [
              "paid"
            ]
          },
          "paid": {
            "type": "boolean",
            "title": "Paid",
            "description": "Whether the order has been paid for.",
            "examples": [
              true
            ]
          },
          "subtotal_amount": {
            "type": "integer",
            "title": "Subtotal Amount",
            "description": "Amount in cents, before discounts and taxes.",
            "examples": [
              10000
            ]
          },
          "discount_amount": {
            "type": "integer",
            "title": "Discount Amount",
            "description": "Discount amount in cents.",
            "examples": [
              1000
            ]
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount",
            "description": "Amount in cents, after discounts but before taxes.",
            "examples": [
              9000
            ]
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount",
            "description": "Sales tax amount in cents.",
            "examples": [
              720
            ]
          },
          "total_amount": {
            "type": "integer",
            "title": "Total Amount",
            "description": "Amount in cents, after discounts and taxes.",
            "examples": [
              9720
            ]
          },
          "applied_balance_amount": {
            "type": "integer",
            "title": "Applied Balance Amount",
            "description": "Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance,  or decrease it, if the customer has a positive balance.Amount in cents.",
            "examples": [
              0
            ]
          },
          "due_amount": {
            "type": "integer",
            "title": "Due Amount",
            "description": "Amount in cents that is due for this order.",
            "examples": [
              0
            ]
          },
          "refunded_amount": {
            "type": "integer",
            "title": "Refunded Amount",
            "description": "Amount refunded in cents.",
            "examples": [
              0
            ]
          },
          "refunded_tax_amount": {
            "type": "integer",
            "title": "Refunded Tax Amount",
            "description": "Sales tax refunded in cents.",
            "examples": [
              0
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "examples": [
              "usd"
            ]
          },
          "billing_reason": {
            "$ref": "#/components/schemas/OrderBillingReason"
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name of the customer that should appear on the invoice. "
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number",
            "description": "The invoice number associated with this order. `null` while the order is in `draft` status; assigned at finalize."
          },
          "is_invoice_generated": {
            "type": "boolean",
            "title": "Is Invoice Generated",
            "description": "Whether an invoice has been generated for this order."
          },
          "receipt_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipt Number",
            "description": "The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Number of seats purchased (for seat-based one-time orders)."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Number of units purchased (for unit-based pricing)."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id"
          },
          "next_payment_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Payment Attempt At",
            "description": "When the next automatic payment retry is scheduled. `null` if the order is not in dunning or all retries have been exhausted."
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerOrderProduct"
              },
              {
                "type": "null"
              }
            ]
          },
          "subscription": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerOrderSubscription"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrderItemSchema"
            },
            "type": "array",
            "title": "Items",
            "description": "Line items composing the order."
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "A summary description of the order.",
            "examples": [
              "Pro Plan"
            ]
          },
          "refundable_amount": {
            "type": "integer",
            "title": "Refundable Amount",
            "description": "Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.",
            "readOnly": true,
            "examples": [
              9000
            ]
          },
          "refundable_tax_amount": {
            "type": "integer",
            "title": "Refundable Tax Amount",
            "description": "Sales tax in cents that would be refunded if the full refundable amount is refunded.",
            "readOnly": true,
            "examples": [
              720
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "status",
          "paid",
          "subtotal_amount",
          "discount_amount",
          "net_amount",
          "tax_amount",
          "total_amount",
          "applied_balance_amount",
          "due_amount",
          "refunded_amount",
          "refunded_tax_amount",
          "currency",
          "billing_reason",
          "billing_name",
          "billing_address",
          "invoice_number",
          "is_invoice_generated",
          "receipt_number",
          "units",
          "customer_id",
          "product_id",
          "discount_id",
          "subscription_id",
          "checkout_id",
          "product",
          "subscription",
          "items",
          "description",
          "refundable_amount",
          "refundable_tax_amount"
        ],
        "title": "CustomerOrder"
      },
      "CustomerOrderConfirmPayment": {
        "properties": {
          "confirmation_token_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirmation Token Id",
            "description": "ID of the Stripe confirmation token for new payment methods."
          },
          "payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method Id",
            "description": "ID of an existing saved payment method."
          },
          "payment_processor": {
            "$ref": "#/components/schemas/PaymentProcessor",
            "description": "Payment processor used.",
            "default": "stripe"
          }
        },
        "type": "object",
        "title": "CustomerOrderConfirmPayment",
        "description": "Schema to confirm a retry payment using either a saved payment method or a new confirmation token."
      },
      "CustomerOrderInvoice": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The URL to the invoice."
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "CustomerOrderInvoice",
        "description": "Order's invoice data."
      },
      "CustomerOrderPaymentConfirmation": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Payment status after confirmation."
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret",
            "description": "Client secret for handling additional actions."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if confirmation failed."
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "CustomerOrderPaymentConfirmation",
        "description": "Response after confirming a retry payment."
      },
      "CustomerOrderPaymentStatus": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Current payment status."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if payment failed."
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "CustomerOrderPaymentStatus",
        "description": "Payment status for an order."
      },
      "CustomerOrderProduct": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products."
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval."
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. None when no meter cycle is set."
          },
          "is_recurring": {
            "type": "boolean",
            "title": "Is Recurring",
            "description": "Whether the product is a subscription."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the product is archived and no longer available."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the product."
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                },
                {
                  "$ref": "#/components/schemas/ProductPrice"
                }
              ]
            },
            "type": "array",
            "title": "Prices",
            "description": "List of prices for this product."
          },
          "benefits": {
            "items": {
              "$ref": "#/components/schemas/BenefitPublic",
              "title": "BenefitPublic"
            },
            "type": "array",
            "title": "Benefits",
            "description": "List of benefits granted by the product."
          },
          "medias": {
            "items": {
              "$ref": "#/components/schemas/ProductMediaFileRead"
            },
            "type": "array",
            "title": "Medias",
            "description": "List of medias associated to the product."
          },
          "organization": {
            "$ref": "#/components/schemas/CustomerOrganization"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "name",
          "description",
          "visibility",
          "recurring_interval",
          "recurring_interval_count",
          "meter_interval",
          "meter_interval_count",
          "is_recurring",
          "is_archived",
          "organization_id",
          "prices",
          "benefits",
          "medias",
          "organization"
        ],
        "title": "CustomerOrderProduct"
      },
      "CustomerOrderReceipt": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The URL to the receipt PDF."
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "CustomerOrderReceipt",
        "description": "Order's receipt data."
      },
      "CustomerOrderSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "amount",
          "-amount",
          "net_amount",
          "-net_amount",
          "product",
          "-product",
          "subscription",
          "-subscription"
        ],
        "title": "CustomerOrderSortProperty"
      },
      "CustomerOrderSubscription": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount of the subscription.",
            "examples": [
              10000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The currency of the subscription.",
            "examples": [
              "usd"
            ]
          },
          "recurring_interval": {
            "$ref": "#/components/schemas/RecurringInterval",
            "description": "The interval at which the subscription recurs.",
            "examples": [
              "month"
            ]
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on."
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus",
            "description": "The status of the subscription.",
            "examples": [
              "active"
            ]
          },
          "current_period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period Start",
            "description": "The start timestamp of the current billing period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "current_meter_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Meter Period Start",
            "description": "The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence."
          },
          "current_meter_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Meter Period End",
            "description": "The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew."
          },
          "trial_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "The end timestamp of the trial period, if any."
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "description": "Whether the subscription will be canceled at the end of the current period."
          },
          "canceled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled At",
            "description": "The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`."
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "The timestamp when the subscription ended."
          },
          "past_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Past Due At",
            "description": "The timestamp when the subscription entered `past_due` status."
          },
          "pause_at_period_end": {
            "type": "boolean",
            "title": "Pause At Period End",
            "description": "Whether the subscription will be paused at the end of the current period."
          },
          "paused_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At",
            "description": "The timestamp when the subscription was paused."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Resumes At",
            "description": "The timestamp when a paused subscription is scheduled to automatically resume, if set."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the subscribed customer."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the subscribed product."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "The ID of the applied discount, if any."
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "The number of seats for seat-based subscriptions. None for non-seat subscriptions."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "The number of units for unit-based subscriptions. None for non-unit subscriptions."
          },
          "customer_cancellation_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCancellationReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_cancellation_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Cancellation Comment"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "amount",
          "currency",
          "recurring_interval",
          "recurring_interval_count",
          "status",
          "current_period_start",
          "current_period_end",
          "current_meter_period_start",
          "current_meter_period_end",
          "trial_start",
          "trial_end",
          "cancel_at_period_end",
          "canceled_at",
          "started_at",
          "ends_at",
          "ended_at",
          "pause_at_period_end",
          "paused_at",
          "resumes_at",
          "customer_id",
          "product_id",
          "discount_id",
          "checkout_id",
          "units",
          "customer_cancellation_reason",
          "customer_cancellation_comment"
        ],
        "title": "CustomerOrderSubscription"
      },
      "CustomerOrderUpdate": {
        "properties": {
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name of the customer that should appear on the invoice."
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "The address of the customer that should appear on the invoice. Country and state fields cannot be updated."
          }
        },
        "type": "object",
        "title": "CustomerOrderUpdate",
        "description": "Schema to update an order."
      },
      "CustomerOrganization": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Organization name shown in checkout, customer portal, emails etc."
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Unique organization slug in checkout, customer portal and credit card statements."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "description": "Avatar URL shown in checkout, customer portal, emails etc."
          },
          "proration_behavior": {
            "$ref": "#/components/schemas/SubscriptionProrationBehavior",
            "description": "Proration behavior applied when customer updates their subscription from the portal."
          },
          "allow_customer_updates": {
            "type": "boolean",
            "title": "Allow Customer Updates",
            "description": "Whether customers can update their subscriptions from the customer portal."
          },
          "customer_portal_settings": {
            "$ref": "#/components/schemas/OrganizationCustomerPortalSettings",
            "description": "Settings related to the customer portal"
          },
          "organization_features": {
            "$ref": "#/components/schemas/CustomerOrganizationFeatureSettings",
            "description": "Feature flags for the customer portal."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "slug",
          "avatar_url",
          "proration_behavior",
          "allow_customer_updates",
          "customer_portal_settings"
        ],
        "title": "CustomerOrganization"
      },
      "CustomerOrganizationData": {
        "properties": {
          "organization": {
            "$ref": "#/components/schemas/CustomerOrganization"
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/CustomerProduct"
            },
            "type": "array",
            "title": "Products"
          }
        },
        "type": "object",
        "required": [
          "organization",
          "products"
        ],
        "title": "CustomerOrganizationData",
        "description": "Schema of an organization and related data for customer portal."
      },
      "CustomerOrganizationFeatureSettings": {
        "properties": {
          "member_model_enabled": {
            "type": "boolean",
            "title": "Member Model Enabled",
            "description": "Whether the member model is enabled for this organization.",
            "default": false
          },
          "checkout_localization_enabled": {
            "type": "boolean",
            "title": "Checkout Localization Enabled",
            "description": "Whether localization is enabled for this organization.",
            "default": false
          }
        },
        "type": "object",
        "title": "CustomerOrganizationFeatureSettings",
        "description": "Feature flags exposed to the customer portal."
      },
      "CustomerPaymentMethod": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PaymentMethodCard"
          },
          {
            "$ref": "#/components/schemas/PaymentMethodKrCard"
          },
          {
            "$ref": "#/components/schemas/PaymentMethodGeneric"
          }
        ]
      },
      "CustomerPaymentMethodCard": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "type": {
            "type": "string",
            "const": "card",
            "title": "Type"
          },
          "method_metadata": {
            "$ref": "#/components/schemas/PaymentMethodCardMetadata"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "description": "Whether this payment method is the customer's default payment method.",
            "examples": [
              true
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "processor",
          "customer_id",
          "type",
          "method_metadata",
          "is_default"
        ],
        "title": "CustomerPaymentMethodCard"
      },
      "CustomerPaymentMethodConfirm": {
        "properties": {
          "setup_intent_id": {
            "type": "string",
            "title": "Setup Intent Id"
          },
          "set_default": {
            "type": "boolean",
            "title": "Set Default"
          }
        },
        "type": "object",
        "required": [
          "setup_intent_id",
          "set_default"
        ],
        "title": "CustomerPaymentMethodConfirm"
      },
      "CustomerPaymentMethodCreate": {
        "properties": {
          "confirmation_token_id": {
            "type": "string",
            "title": "Confirmation Token Id"
          },
          "set_default": {
            "type": "boolean",
            "title": "Set Default"
          },
          "return_url": {
            "type": "string",
            "title": "Return Url"
          }
        },
        "type": "object",
        "required": [
          "confirmation_token_id",
          "set_default",
          "return_url"
        ],
        "title": "CustomerPaymentMethodCreate"
      },
      "CustomerPaymentMethodCreateRequiresActionResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "requires_action",
            "title": "Status"
          },
          "client_secret": {
            "type": "string",
            "title": "Client Secret"
          }
        },
        "type": "object",
        "required": [
          "status",
          "client_secret"
        ],
        "title": "CustomerPaymentMethodCreateRequiresActionResponse"
      },
      "CustomerPaymentMethodCreateResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomerPaymentMethodCreateSucceededResponse"
          },
          {
            "$ref": "#/components/schemas/CustomerPaymentMethodCreateRequiresActionResponse"
          }
        ],
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "requires_action": "#/components/schemas/CustomerPaymentMethodCreateRequiresActionResponse",
            "succeeded": "#/components/schemas/CustomerPaymentMethodCreateSucceededResponse"
          }
        }
      },
      "CustomerPaymentMethodCreateSucceededResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "succeeded",
            "title": "Status"
          },
          "payment_method": {
            "$ref": "#/components/schemas/CustomerPaymentMethod",
            "title": "CustomerPaymentMethod"
          }
        },
        "type": "object",
        "required": [
          "status",
          "payment_method"
        ],
        "title": "CustomerPaymentMethodCreateSucceededResponse"
      },
      "CustomerPaymentMethodGeneric": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "description": "Whether this payment method is the customer's default payment method.",
            "examples": [
              false
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "processor",
          "customer_id",
          "type",
          "is_default"
        ],
        "title": "CustomerPaymentMethodGeneric"
      },
      "CustomerPaymentMethodKrCard": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "type": {
            "type": "string",
            "const": "kr_card",
            "title": "Type"
          },
          "method_metadata": {
            "$ref": "#/components/schemas/PaymentMethodKrCardMetadata"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "description": "Whether this payment method is the customer's default payment method.",
            "examples": [
              false
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "processor",
          "customer_id",
          "type",
          "method_metadata",
          "is_default"
        ],
        "title": "CustomerPaymentMethodKrCard"
      },
      "CustomerPortalCustomer": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name"
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "oauth_accounts": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CustomerPortalOAuthAccount"
            },
            "type": "object",
            "title": "Oauth Accounts"
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id"
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerType"
              },
              {
                "type": "null"
              }
            ]
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "email",
          "email_verified",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "oauth_accounts"
        ],
        "title": "CustomerPortalCustomer"
      },
      "CustomerPortalCustomerSettings": {
        "properties": {
          "allow_email_change": {
            "type": "boolean",
            "title": "Allow Email Change"
          }
        },
        "type": "object",
        "title": "CustomerPortalCustomerSettings"
      },
      "CustomerPortalCustomerUpdate": {
        "properties": {
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name"
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id"
          }
        },
        "type": "object",
        "title": "CustomerPortalCustomerUpdate"
      },
      "CustomerPortalMember": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "email": {
            "type": "string",
            "title": "Email",
            "description": "The email address of the member."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the member."
          },
          "role": {
            "$ref": "#/components/schemas/MemberRole",
            "description": "The role of the member within the team."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "email",
          "name",
          "role"
        ],
        "title": "CustomerPortalMember",
        "description": "A member of the customer's team as seen in the customer portal."
      },
      "CustomerPortalMemberCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "The email address of the new member."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the new member (optional)."
          },
          "role": {
            "$ref": "#/components/schemas/MemberRole",
            "description": "The role for the new member. Defaults to 'member'.",
            "default": "member",
            "examples": [
              "billing_manager",
              "member"
            ]
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "CustomerPortalMemberCreate",
        "description": "Schema for adding a new member to the customer's team."
      },
      "CustomerPortalMemberUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the member.",
                "examples": [
                  "Jane Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The new name for the member."
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemberRole"
              },
              {
                "type": "null"
              }
            ],
            "description": "The new role for the member.",
            "examples": [
              "billing_manager",
              "member"
            ]
          }
        },
        "type": "object",
        "title": "CustomerPortalMemberUpdate",
        "description": "Schema for updating a member in the customer portal."
      },
      "CustomerPortalOAuthAccount": {
        "properties": {
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "account_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Username"
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "account_username"
        ],
        "title": "CustomerPortalOAuthAccount"
      },
      "CustomerPortalSubscriptionSettings": {
        "properties": {
          "update_seats": {
            "type": "boolean",
            "title": "Update Seats"
          },
          "update_plan": {
            "type": "boolean",
            "title": "Update Plan"
          },
          "update_units": {
            "type": "boolean",
            "title": "Update Units"
          },
          "pause": {
            "type": "boolean",
            "title": "Pause"
          }
        },
        "type": "object",
        "required": [
          "update_seats",
          "update_plan"
        ],
        "title": "CustomerPortalSubscriptionSettings"
      },
      "CustomerPortalUsageSettings": {
        "properties": {
          "show": {
            "type": "boolean",
            "title": "Show"
          }
        },
        "type": "object",
        "required": [
          "show"
        ],
        "title": "CustomerPortalUsageSettings"
      },
      "CustomerProduct": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products."
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval."
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. None when no meter cycle is set."
          },
          "is_recurring": {
            "type": "boolean",
            "title": "Is Recurring",
            "description": "Whether the product is a subscription."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the product is archived and no longer available."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the product."
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                },
                {
                  "$ref": "#/components/schemas/ProductPrice"
                }
              ]
            },
            "type": "array",
            "title": "Prices",
            "description": "List of available prices for this product."
          },
          "benefits": {
            "items": {
              "$ref": "#/components/schemas/BenefitPublic",
              "title": "BenefitPublic"
            },
            "type": "array",
            "title": "Benefits",
            "description": "List of benefits granted by the product."
          },
          "medias": {
            "items": {
              "$ref": "#/components/schemas/ProductMediaFileRead"
            },
            "type": "array",
            "title": "Medias",
            "description": "The medias associated to the product."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "name",
          "description",
          "visibility",
          "recurring_interval",
          "recurring_interval_count",
          "meter_interval",
          "meter_interval_count",
          "is_recurring",
          "is_archived",
          "organization_id",
          "prices",
          "benefits",
          "medias"
        ],
        "title": "CustomerProduct",
        "description": "Schema of a product for customer portal."
      },
      "CustomerSeat": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "The seat ID"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "The subscription ID (for recurring seats)"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The order ID (for one-time purchase seats)"
          },
          "status": {
            "$ref": "#/components/schemas/SeatStatus",
            "description": "Status of the seat"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "The customer ID. When member_model_enabled is true, this is the billing customer (purchaser). When false, this is the seat member customer."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "The member ID of the seat occupant"
          },
          "member": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Member"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member associated with this seat"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Email of the seat member (set when member_model_enabled is true)"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email",
            "description": "The assigned customer email"
          },
          "invitation_token_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Invitation Token Expires At",
            "description": "When the invitation token expires"
          },
          "claimed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Claimed At",
            "description": "When the seat was claimed"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "When the seat was revoked"
          },
          "seat_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Metadata",
            "description": "Additional metadata for the seat"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "subscription_id",
          "order_id",
          "status",
          "customer_id",
          "member_id",
          "member",
          "email",
          "customer_email",
          "invitation_token_expires_at",
          "claimed_at",
          "revoked_at",
          "seat_metadata"
        ],
        "title": "CustomerSeat"
      },
      "CustomerSeatAssign": {
        "properties": {
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "Subscription ID. Required if neither order_id nor checkout_id is provided."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "Order ID for one-time purchases. Required if subscription_id is not provided."
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Email of the customer to assign the seat to"
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "External customer ID for the seat assignment"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "Customer ID for the seat assignment"
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "External member ID for the seat assignment. Can be used alone (lookup existing member) or with email (create/validate member)."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "Member ID for the seat assignment."
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata",
            "description": "Additional metadata for the seat (max 10 keys, 1KB total)"
          },
          "immediate_claim": {
            "type": "boolean",
            "title": "Immediate Claim",
            "description": "If true, the seat will be immediately claimed without sending an invitation email. API-only feature.",
            "default": false
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id",
            "description": "Checkout ID. Resolves to the subscription or order produced by the checkout."
          }
        },
        "type": "object",
        "title": "CustomerSeatAssign"
      },
      "CustomerSeatClaimResponse": {
        "properties": {
          "seat": {
            "$ref": "#/components/schemas/CustomerSeat",
            "description": "The claimed seat"
          },
          "customer_session_token": {
            "type": "string",
            "title": "Customer Session Token",
            "description": "Session token for immediate customer portal access"
          }
        },
        "type": "object",
        "required": [
          "seat",
          "customer_session_token"
        ],
        "title": "CustomerSeatClaimResponse",
        "description": "Response after successfully claiming a seat."
      },
      "CustomerSession": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "token": {
            "type": "string",
            "title": "Token"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          },
          "customer_portal_url": {
            "type": "string",
            "title": "Customer Portal Url"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "token",
          "expires_at",
          "return_url",
          "customer_portal_url",
          "customer_id",
          "customer"
        ],
        "title": "CustomerSession",
        "description": "A customer session that can be used to authenticate as a customer."
      },
      "CustomerSessionCustomerExternalIDCreate": {
        "properties": {
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member to create a session for. When not provided and the organization has `member_model_enabled`, the owner member of the customer will be used for individual customers."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "External ID of the member to create a session for. Alternative to `member_id`."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the customer portal to return to this URL.",
            "examples": [
              "https://example.com/account"
            ]
          },
          "external_customer_id": {
            "type": "string",
            "title": "External Customer Id",
            "description": "External ID of the customer to create a session for."
          }
        },
        "type": "object",
        "required": [
          "external_customer_id"
        ],
        "title": "CustomerSessionCustomerExternalIDCreate",
        "description": "Schema for creating a customer session using an external customer ID."
      },
      "CustomerSessionCustomerIDCreate": {
        "properties": {
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member to create a session for. When not provided and the organization has `member_model_enabled`, the owner member of the customer will be used for individual customers."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "External ID of the member to create a session for. Alternative to `member_id`."
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url",
            "description": "When set, a back button will be shown in the customer portal to return to this URL.",
            "examples": [
              "https://example.com/account"
            ]
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "ID of the customer to create a session for."
          }
        },
        "type": "object",
        "required": [
          "customer_id"
        ],
        "title": "CustomerSessionCustomerIDCreate",
        "description": "Schema for creating a customer session using a customer ID."
      },
      "CustomerSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "email",
          "-email",
          "name",
          "-name"
        ],
        "title": "CustomerSortProperty"
      },
      "CustomerState": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CustomerStateIndividual"
          },
          {
            "$ref": "#/components/schemas/CustomerStateTeam"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "individual": "#/components/schemas/CustomerStateIndividual",
            "team": "#/components/schemas/CustomerStateTeam"
          }
        }
      },
      "CustomerStateBenefitGrant": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the grant.",
            "examples": [
              "d322132c-a9d0-4e0d-b8d3-d81ad021a3a9"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "granted_at": {
            "type": "string",
            "format": "date-time",
            "title": "Granted At",
            "description": "The timestamp when the benefit was granted.",
            "examples": [
              "2025-01-03T13:37:00Z"
            ]
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The ID of the benefit concerned by this grant.",
            "examples": [
              "397a17aa-15cf-4cb4-9333-18040203cf98"
            ]
          },
          "benefit_type": {
            "$ref": "#/components/schemas/BenefitType",
            "description": "The type of the benefit concerned by this grant.",
            "examples": [
              "custom"
            ]
          },
          "benefit_metadata": {
            "$ref": "#/components/schemas/MetadataOutputType",
            "description": "The metadata of the benefit concerned by this grant.",
            "examples": [
              {
                "key": "value"
              }
            ]
          },
          "properties": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenefitGrantDiscordProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantCustomProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantFeatureFlagProperties"
              },
              {
                "$ref": "#/components/schemas/BenefitGrantSlackSharedChannelProperties"
              }
            ],
            "title": "Properties"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "granted_at",
          "benefit_id",
          "benefit_type",
          "benefit_metadata",
          "properties"
        ],
        "title": "CustomerStateBenefitGrant",
        "description": "An active benefit grant for a customer."
      },
      "CustomerStateIndividual": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "email": {
            "type": "string",
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified",
            "description": "Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.",
            "examples": [
              true
            ]
          },
          "type": {
            "type": "string",
            "const": "individual",
            "title": "Type",
            "description": "The type of customer.",
            "examples": [
              "individual"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the customer.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id",
            "description": "The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details."
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "first_user_event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "First User Event At",
            "description": "Timestamp of the first event ingested for this customer. Can predate `created_at`, and is null if no event was ever ingested."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "examples": [
              "https://www.gravatar.com/avatar/xxx?d=404"
            ]
          },
          "active_subscriptions": {
            "items": {
              "$ref": "#/components/schemas/CustomerStateSubscription"
            },
            "type": "array",
            "title": "Active Subscriptions",
            "description": "The customer's active subscriptions."
          },
          "granted_benefits": {
            "items": {
              "$ref": "#/components/schemas/CustomerStateBenefitGrant"
            },
            "type": "array",
            "title": "Granted Benefits",
            "description": "The customer's active benefit grants."
          },
          "active_meters": {
            "items": {
              "$ref": "#/components/schemas/CustomerStateMeter"
            },
            "type": "array",
            "title": "Active Meters",
            "description": "The customer's active meters."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "email",
          "email_verified",
          "type",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "organization_id",
          "deleted_at",
          "first_user_event_at",
          "avatar_url",
          "active_subscriptions",
          "granted_benefits",
          "active_meters"
        ],
        "title": "CustomerStateIndividual",
        "description": "A customer along with additional state information:\n\n* Active subscriptions\n* Granted benefits\n* Active meters"
      },
      "CustomerStateMeter": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter.",
            "examples": [
              "d498a884-e2cd-4d3e-8002-f536468a8b22"
            ]
          },
          "consumed_units": {
            "type": "number",
            "title": "Consumed Units",
            "description": "The number of consumed units.",
            "examples": [
              25.0
            ]
          },
          "credited_units": {
            "type": "integer",
            "title": "Credited Units",
            "description": "The number of credited units.",
            "examples": [
              100
            ]
          },
          "balance": {
            "type": "number",
            "title": "Balance",
            "description": "The balance of the meter, i.e. the difference between credited and consumed units.",
            "examples": [
              75.0
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "meter_id",
          "consumed_units",
          "credited_units",
          "balance"
        ],
        "title": "CustomerStateMeter",
        "description": "An active meter for a customer, with latest consumed and credited units."
      },
      "CustomerStateSubscription": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the subscription.",
            "examples": [
              "e5149aae-e521-42b9-b24c-abb3d71eea2e"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "trialing"
            ],
            "title": "Status",
            "examples": [
              "active",
              "trialing"
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount of the subscription.",
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The currency of the subscription.",
            "examples": [
              "usd"
            ]
          },
          "recurring_interval": {
            "$ref": "#/components/schemas/RecurringInterval",
            "description": "The interval at which the subscription recurs."
          },
          "current_period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period Start",
            "description": "The start timestamp of the current billing period.",
            "examples": [
              "2025-02-03T13:37:00Z"
            ]
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period.",
            "examples": [
              "2025-03-03T13:37:00Z"
            ]
          },
          "trial_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any.",
            "examples": [
              "2025-02-03T13:37:00Z"
            ]
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "The end timestamp of the trial period, if any.",
            "examples": [
              "2025-03-03T13:37:00Z"
            ]
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "description": "Whether the subscription will be canceled at the end of the current period.",
            "examples": [
              false
            ]
          },
          "canceled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled At",
            "description": "The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.",
            "examples": [
              null
            ]
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started.",
            "examples": [
              "2025-01-03T13:37:00Z"
            ]
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end.",
            "examples": [
              null
            ]
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the subscribed product.",
            "examples": [
              "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23"
            ]
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "The ID of the applied discount, if any.",
            "examples": [
              null
            ]
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "The number of seats for seat-based subscriptions. None for non-seat subscriptions.",
            "examples": [
              null
            ]
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "The number of units for unit-based subscriptions. None for non-unit subscriptions.",
            "examples": [
              null
            ]
          },
          "meters": {
            "items": {
              "$ref": "#/components/schemas/CustomerStateSubscriptionMeter"
            },
            "type": "array",
            "title": "Meters",
            "description": "List of meters associated with the subscription."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "status",
          "amount",
          "currency",
          "recurring_interval",
          "current_period_start",
          "current_period_end",
          "trial_start",
          "trial_end",
          "cancel_at_period_end",
          "canceled_at",
          "started_at",
          "ends_at",
          "product_id",
          "discount_id",
          "seats",
          "units",
          "meters"
        ],
        "title": "CustomerStateSubscription",
        "description": "An active customer subscription."
      },
      "CustomerStateSubscriptionMeter": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "consumed_units": {
            "type": "number",
            "title": "Consumed Units",
            "description": "The number of consumed units so far in this billing period.",
            "examples": [
              25.0
            ]
          },
          "credited_units": {
            "type": "integer",
            "title": "Credited Units",
            "description": "The number of credited units so far in this billing period.",
            "examples": [
              100
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount due in cents so far in this billing period.",
            "examples": [
              0
            ]
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter.",
            "examples": [
              "d498a884-e2cd-4d3e-8002-f536468a8b22"
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "consumed_units",
          "credited_units",
          "amount",
          "meter_id"
        ],
        "title": "CustomerStateSubscriptionMeter",
        "description": "Current consumption and spending for a subscription meter."
      },
      "CustomerStateTeam": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified",
            "description": "Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.",
            "examples": [
              true
            ]
          },
          "type": {
            "type": "string",
            "const": "team",
            "title": "Type",
            "description": "The type of customer. Team customers can have multiple members.",
            "examples": [
              "team"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the customer.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id",
            "description": "The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details."
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "first_user_event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "First User Event At",
            "description": "Timestamp of the first event ingested for this customer. Can predate `created_at`, and is null if no event was ever ingested."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "examples": [
              "https://www.gravatar.com/avatar/xxx?d=404"
            ]
          },
          "active_subscriptions": {
            "items": {
              "$ref": "#/components/schemas/CustomerStateSubscription"
            },
            "type": "array",
            "title": "Active Subscriptions",
            "description": "The customer's active subscriptions."
          },
          "granted_benefits": {
            "items": {
              "$ref": "#/components/schemas/CustomerStateBenefitGrant"
            },
            "type": "array",
            "title": "Granted Benefits",
            "description": "The customer's active benefit grants."
          },
          "active_meters": {
            "items": {
              "$ref": "#/components/schemas/CustomerStateMeter"
            },
            "type": "array",
            "title": "Active Meters",
            "description": "The customer's active meters."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "email_verified",
          "type",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "organization_id",
          "deleted_at",
          "first_user_event_at",
          "avatar_url",
          "active_subscriptions",
          "granted_benefits",
          "active_meters"
        ],
        "title": "CustomerStateTeam",
        "description": "A team customer along with additional state information:\n\n* Active subscriptions\n* Granted benefits\n* Active meters"
      },
      "CustomerSubscription": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount of the subscription.",
            "examples": [
              10000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The currency of the subscription.",
            "examples": [
              "usd"
            ]
          },
          "recurring_interval": {
            "$ref": "#/components/schemas/RecurringInterval",
            "description": "The interval at which the subscription recurs.",
            "examples": [
              "month"
            ]
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on."
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus",
            "description": "The status of the subscription.",
            "examples": [
              "active"
            ]
          },
          "current_period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period Start",
            "description": "The start timestamp of the current billing period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "current_meter_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Meter Period Start",
            "description": "The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence."
          },
          "current_meter_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Meter Period End",
            "description": "The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew."
          },
          "trial_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "The end timestamp of the trial period, if any."
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "description": "Whether the subscription will be canceled at the end of the current period."
          },
          "canceled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled At",
            "description": "The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`."
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "The timestamp when the subscription ended."
          },
          "past_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Past Due At",
            "description": "The timestamp when the subscription entered `past_due` status."
          },
          "pause_at_period_end": {
            "type": "boolean",
            "title": "Pause At Period End",
            "description": "Whether the subscription will be paused at the end of the current period."
          },
          "paused_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At",
            "description": "The timestamp when the subscription was paused."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Resumes At",
            "description": "The timestamp when a paused subscription is scheduled to automatically resume, if set."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the subscribed customer."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the subscribed product."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "The ID of the applied discount, if any."
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "The number of seats for seat-based subscriptions. None for non-seat subscriptions."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "The number of units for unit-based subscriptions. None for non-unit subscriptions."
          },
          "customer_cancellation_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCancellationReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_cancellation_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Cancellation Comment"
          },
          "product": {
            "$ref": "#/components/schemas/CustomerSubscriptionProduct"
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                },
                {
                  "$ref": "#/components/schemas/ProductPrice"
                }
              ]
            },
            "type": "array",
            "title": "Prices",
            "description": "List of enabled prices for the subscription."
          },
          "meters": {
            "items": {
              "$ref": "#/components/schemas/CustomerSubscriptionMeter"
            },
            "type": "array",
            "title": "Meters",
            "description": "List of meters associated with the subscription."
          },
          "pending_update": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PendingSubscriptionUpdate"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "amount",
          "currency",
          "recurring_interval",
          "recurring_interval_count",
          "status",
          "current_period_start",
          "current_period_end",
          "current_meter_period_start",
          "current_meter_period_end",
          "trial_start",
          "trial_end",
          "cancel_at_period_end",
          "canceled_at",
          "started_at",
          "ends_at",
          "ended_at",
          "pause_at_period_end",
          "paused_at",
          "resumes_at",
          "customer_id",
          "product_id",
          "discount_id",
          "checkout_id",
          "units",
          "customer_cancellation_reason",
          "customer_cancellation_comment",
          "product",
          "prices",
          "meters",
          "pending_update"
        ],
        "title": "CustomerSubscription"
      },
      "CustomerSubscriptionCancel": {
        "properties": {
          "cancel_at_period_end": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel At Period End",
            "description": "Cancel an active subscription once the current period ends.\n\nOr uncancel a subscription currently set to be revoked at period end."
          },
          "cancellation_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCancellationReason"
              },
              {
                "type": "null"
              }
            ],
            "description": "Customers reason for cancellation.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s)."
          },
          "cancellation_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancellation Comment",
            "description": "Customer feedback and why they decided to cancel."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "CustomerSubscriptionCancel"
      },
      "CustomerSubscriptionMeter": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "consumed_units": {
            "type": "number",
            "title": "Consumed Units",
            "description": "The number of consumed units so far in this billing period.",
            "examples": [
              25.0
            ]
          },
          "credited_units": {
            "type": "integer",
            "title": "Credited Units",
            "description": "The number of credited units so far in this billing period.",
            "examples": [
              100
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount due in cents so far in this billing period.",
            "examples": [
              0
            ]
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter.",
            "examples": [
              "d498a884-e2cd-4d3e-8002-f536468a8b22"
            ]
          },
          "meter": {
            "$ref": "#/components/schemas/CustomerSubscriptionMeterMeter"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "consumed_units",
          "credited_units",
          "amount",
          "meter_id",
          "meter"
        ],
        "title": "CustomerSubscriptionMeter"
      },
      "CustomerSubscriptionMeterMeter": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the meter. Will be shown on customer's invoices and usage."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name"
        ],
        "title": "CustomerSubscriptionMeterMeter"
      },
      "CustomerSubscriptionPause": {
        "properties": {
          "pause_at_period_end": {
            "type": "boolean",
            "title": "Pause At Period End",
            "description": "Pause an active subscription at the end of the current period.\n\nOr cancel a scheduled pause on a subscription set to be paused at\nperiod end."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Resumes At",
            "description": "Date at which the paused subscription should automatically resume. If not set, it stays paused until resumed. Must be after the current period end."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pause_at_period_end"
        ],
        "title": "CustomerSubscriptionPause"
      },
      "CustomerSubscriptionProduct": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products."
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval."
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. None when no meter cycle is set."
          },
          "is_recurring": {
            "type": "boolean",
            "title": "Is Recurring",
            "description": "Whether the product is a subscription."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the product is archived and no longer available."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the product."
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                },
                {
                  "$ref": "#/components/schemas/ProductPrice"
                }
              ]
            },
            "type": "array",
            "title": "Prices",
            "description": "List of prices for this product."
          },
          "benefits": {
            "items": {
              "$ref": "#/components/schemas/BenefitPublic",
              "title": "BenefitPublic"
            },
            "type": "array",
            "title": "Benefits",
            "description": "List of benefits granted by the product."
          },
          "medias": {
            "items": {
              "$ref": "#/components/schemas/ProductMediaFileRead"
            },
            "type": "array",
            "title": "Medias",
            "description": "List of medias associated to the product."
          },
          "organization": {
            "$ref": "#/components/schemas/CustomerOrganization"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "name",
          "description",
          "visibility",
          "recurring_interval",
          "recurring_interval_count",
          "meter_interval",
          "meter_interval_count",
          "is_recurring",
          "is_archived",
          "organization_id",
          "prices",
          "benefits",
          "medias",
          "organization"
        ],
        "title": "CustomerSubscriptionProduct"
      },
      "CustomerSubscriptionResume": {
        "properties": {
          "resume": {
            "type": "boolean",
            "const": true,
            "title": "Resume",
            "description": "Resume a paused subscription immediately, starting a new billing period and charging the customer."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "resume"
        ],
        "title": "CustomerSubscriptionResume"
      },
      "CustomerSubscriptionSortProperty": {
        "type": "string",
        "enum": [
          "started_at",
          "-started_at",
          "amount",
          "-amount",
          "status",
          "-status",
          "organization",
          "-organization",
          "product",
          "-product"
        ],
        "title": "CustomerSubscriptionSortProperty"
      },
      "CustomerSubscriptionUpdate": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CustomerSubscriptionUpdateProduct"
          },
          {
            "$ref": "#/components/schemas/CustomerSubscriptionUpdateSeats"
          },
          {
            "$ref": "#/components/schemas/CustomerSubscriptionUpdateUnits"
          },
          {
            "$ref": "#/components/schemas/CustomerSubscriptionCancel"
          },
          {
            "$ref": "#/components/schemas/CustomerSubscriptionPause"
          },
          {
            "$ref": "#/components/schemas/CustomerSubscriptionResume"
          },
          {
            "$ref": "#/components/schemas/CustomerSubscriptionUpdateClear"
          }
        ]
      },
      "CustomerSubscriptionUpdateClear": {
        "properties": {
          "pending_update": {
            "type": "null",
            "title": "Pending Update",
            "description": "Clear the pending subscription update."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pending_update"
        ],
        "title": "CustomerSubscriptionUpdateClear"
      },
      "CustomerSubscriptionUpdateProduct": {
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "Update subscription to another product."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "product_id"
        ],
        "title": "CustomerSubscriptionUpdateProduct"
      },
      "CustomerSubscriptionUpdateSeats": {
        "properties": {
          "seats": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Seats",
            "description": "Update the number of seats for this subscription."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "seats"
        ],
        "title": "CustomerSubscriptionUpdateSeats"
      },
      "CustomerSubscriptionUpdateUnits": {
        "properties": {
          "units": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Units",
            "description": "Update the number of units for this subscription."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "units"
        ],
        "title": "CustomerSubscriptionUpdateUnits"
      },
      "CustomerTeam": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified",
            "description": "Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.",
            "examples": [
              true
            ]
          },
          "type": {
            "type": "string",
            "const": "team",
            "title": "Type",
            "description": "The type of customer. Team customers can have multiple members.",
            "examples": [
              "team"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the customer.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id",
            "description": "The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details."
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "first_user_event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "First User Event At",
            "description": "Timestamp of the first event ingested for this customer. Can predate `created_at`, and is null if no event was ever ingested."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "examples": [
              "https://www.gravatar.com/avatar/xxx?d=404"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "email_verified",
          "type",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "organization_id",
          "deleted_at",
          "first_user_event_at",
          "avatar_url"
        ],
        "title": "CustomerTeam",
        "description": "A team customer in an organization."
      },
      "CustomerTeamCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer. **Required unless you use an organization token.**"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemberOwnerCreate"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name."
          },
          "type": {
            "type": "string",
            "const": "team",
            "title": "Type"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the team customer. Optional for team customers \u2014 if omitted, an owner with an email must be provided.",
            "examples": [
              "customer@example.com"
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CustomerTeamCreate"
      },
      "CustomerType": {
        "type": "string",
        "enum": [
          "individual",
          "team"
        ],
        "title": "CustomerType"
      },
      "CustomerUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerType"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer type. Can only be upgraded from 'individual' to 'team', never downgraded.",
            "examples": [
              "team"
            ]
          }
        },
        "type": "object",
        "title": "CustomerUpdate"
      },
      "CustomerUpdateExternalID": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the customer.",
                "examples": [
                  "John Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string",
                "description": "Locale of the customer, given as an IETF BCP 47 language tag, e.g. `en`, `en-US` or `en-GB-oxendict`. If `null` or unsupported, the locale will default to `en`.",
                "examples": [
                  "en",
                  "en-US",
                  "fr",
                  "fr-CA"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          }
        },
        "type": "object",
        "title": "CustomerUpdateExternalID"
      },
      "CustomerUpdatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "customer.updated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/CustomerUpdatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "CustomerUpdatedEvent",
        "description": "An event created by Polar when a customer is updated."
      },
      "CustomerUpdatedFields": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressDict"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "type": "object",
        "title": "CustomerUpdatedFields"
      },
      "CustomerUpdatedMetadata": {
        "properties": {
          "customer_id": {
            "type": "string",
            "title": "Customer Id"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer External Id"
          },
          "updated_fields": {
            "$ref": "#/components/schemas/CustomerUpdatedFields"
          }
        },
        "type": "object",
        "required": [
          "customer_id",
          "customer_email",
          "customer_name",
          "customer_external_id",
          "updated_fields"
        ],
        "title": "CustomerUpdatedMetadata"
      },
      "CustomerWallet": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer that owns the wallet.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "balance": {
            "type": "integer",
            "title": "Balance",
            "description": "The current balance of the wallet, in cents.",
            "examples": [
              5000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The currency of the wallet.",
            "examples": [
              "usd"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "customer_id",
          "balance",
          "currency"
        ],
        "title": "CustomerWallet",
        "description": "A wallet represents your balance with an organization.\n\nYou can top-up your wallet and use the balance to pay for usage."
      },
      "CustomerWalletSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "balance",
          "-balance"
        ],
        "title": "CustomerWalletSortProperty"
      },
      "DeprecatedWebhookEndpointCreateWithSecret": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Url",
            "description": "The URL where the webhook events will be sent.",
            "examples": [
              "https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "An optional name for the webhook endpoint to help organize and identify it."
          },
          "api_version": {
            "type": "string",
            "enum": [
              "2026-04"
            ],
            "title": "Api Version",
            "description": "The API version that'll be used in event payloads.",
            "default": "2026-10"
          },
          "format": {
            "$ref": "#/components/schemas/WebhookFormat",
            "description": "The format of the webhook payload."
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "type": "array",
            "title": "Events",
            "description": "The events that will trigger the webhook."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The organization ID associated with the webhook endpoint. **Required unless you use an organization token.**"
          }
        },
        "type": "object",
        "required": [
          "url",
          "format",
          "events"
        ],
        "title": "DeprecatedWebhookEndpointCreateWithSecret"
      },
      "DeprecatedWebhookEndpointUpdateWithSecret": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri",
                "description": "The URL where the webhook events will be sent.",
                "examples": [
                  "https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "An optional name for the webhook endpoint to help organize and identify it."
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "2026-04"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version",
            "description": "The API version that'll be used in event payloads."
          },
          "format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookFormat",
                "description": "The format of the webhook payload."
              },
              {
                "type": "null"
              }
            ]
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WebhookEventType"
                },
                "type": "array",
                "description": "The events that will trigger the webhook."
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled",
            "description": "Whether the webhook endpoint is enabled.",
            "x-polar-cli-confirm": {
              "equals": false
            }
          }
        },
        "type": "object",
        "title": "DeprecatedWebhookEndpointUpdateWithSecret"
      },
      "Discount": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DiscountFixedOnceForeverDuration"
          },
          {
            "$ref": "#/components/schemas/DiscountFixedRepeatDuration"
          },
          {
            "$ref": "#/components/schemas/DiscountPercentageOnceForeverDuration"
          },
          {
            "$ref": "#/components/schemas/DiscountPercentageRepeatDuration"
          }
        ]
      },
      "DiscountCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DiscountFixedCreate"
          },
          {
            "$ref": "#/components/schemas/DiscountPercentageCreate"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "fixed": "#/components/schemas/DiscountFixedCreate",
            "percentage": "#/components/schemas/DiscountPercentageCreate"
          }
        }
      },
      "DiscountDuration": {
        "type": "string",
        "enum": [
          "once",
          "forever",
          "repeating"
        ],
        "title": "DiscountDuration"
      },
      "DiscountFixedCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Optional timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Optional timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Optional maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Optional maximum number of times the discount can be redeemed by a single customer."
          },
          "products": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid4"
                },
                "type": "array",
                "description": "List of product IDs the discount can be applied to."
              },
              {
                "type": "null"
              }
            ],
            "title": "Products"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**"
          },
          "type": {
            "type": "string",
            "const": "fixed",
            "title": "Type",
            "default": "fixed"
          },
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration",
            "description": "For subscriptions, determines if the discount should be applied once on the first invoice, forever, or for a certain number of months determined by `duration_in_months`."
          },
          "duration_in_months": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 999.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration In Months",
            "description": "Number of months the discount should be applied.\n\nRequired when `duration` is `repeating`. Must be omitted otherwise.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 999999999999.0,
                "minimum": 0.0,
                "description": "Fixed amount to discount from the invoice total."
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount",
            "deprecated": true
          },
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PresentmentCurrency",
                "description": "The currency of the fixed amount discount."
              },
              {
                "type": "null"
              }
            ],
            "default": "usd",
            "deprecated": true
          },
          "amounts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer",
                  "maximum": 999999999999.0,
                  "minimum": 0.0,
                  "description": "Fixed amount to discount from the invoice total."
                },
                "propertyNames": {
                  "$ref": "#/components/schemas/PresentmentCurrency"
                },
                "type": "object",
                "minProperties": 1,
                "description": "Map of currency to fixed amount to discount from the total. This allows specifying different discount amounts for different currencies."
              },
              {
                "type": "null"
              }
            ],
            "title": "Amounts"
          }
        },
        "type": "object",
        "required": [
          "name",
          "duration"
        ],
        "title": "DiscountFixedCreate",
        "description": "Schema to create a fixed amount discount."
      },
      "DiscountFixedOnceForeverDuration": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "deprecated": true,
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "deprecated": true,
            "examples": [
              "usd"
            ]
          },
          "amounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Amounts",
            "description": "Map of currency to fixed amount to discount from the total.",
            "examples": [
              {
                "eur": 900,
                "usd": 1000
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Maximum number of times the discount can be redeemed by a single customer."
          },
          "redemptions_count": {
            "type": "integer",
            "title": "Redemptions Count",
            "description": "Number of times the discount has been redeemed."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/DiscountProduct"
            },
            "type": "array",
            "title": "Products"
          }
        },
        "type": "object",
        "required": [
          "duration",
          "type",
          "amount",
          "currency",
          "amounts",
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "name",
          "code",
          "starts_at",
          "ends_at",
          "max_redemptions",
          "max_redemptions_per_customer",
          "redemptions_count",
          "organization_id",
          "products"
        ],
        "title": "DiscountFixedOnceForeverDuration",
        "description": "Schema for a fixed amount discount that is applied once or forever."
      },
      "DiscountFixedOnceForeverDurationBase": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "deprecated": true,
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "deprecated": true,
            "examples": [
              "usd"
            ]
          },
          "amounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Amounts",
            "description": "Map of currency to fixed amount to discount from the total.",
            "examples": [
              {
                "eur": 900,
                "usd": 1000
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Maximum number of times the discount can be redeemed by a single customer."
          },
          "redemptions_count": {
            "type": "integer",
            "title": "Redemptions Count",
            "description": "Number of times the discount has been redeemed."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          }
        },
        "type": "object",
        "required": [
          "duration",
          "type",
          "amount",
          "currency",
          "amounts",
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "name",
          "code",
          "starts_at",
          "ends_at",
          "max_redemptions",
          "max_redemptions_per_customer",
          "redemptions_count",
          "organization_id"
        ],
        "title": "DiscountFixedOnceForeverDurationBase"
      },
      "DiscountFixedRepeatDuration": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "duration_in_months": {
            "type": "integer",
            "title": "Duration In Months"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "deprecated": true,
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "deprecated": true,
            "examples": [
              "usd"
            ]
          },
          "amounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Amounts",
            "description": "Map of currency to fixed amount to discount from the total.",
            "examples": [
              {
                "eur": 900,
                "usd": 1000
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Maximum number of times the discount can be redeemed by a single customer."
          },
          "redemptions_count": {
            "type": "integer",
            "title": "Redemptions Count",
            "description": "Number of times the discount has been redeemed."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/DiscountProduct"
            },
            "type": "array",
            "title": "Products"
          }
        },
        "type": "object",
        "required": [
          "duration",
          "duration_in_months",
          "type",
          "amount",
          "currency",
          "amounts",
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "name",
          "code",
          "starts_at",
          "ends_at",
          "max_redemptions",
          "max_redemptions_per_customer",
          "redemptions_count",
          "organization_id",
          "products"
        ],
        "title": "DiscountFixedRepeatDuration",
        "description": "Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months."
      },
      "DiscountFixedRepeatDurationBase": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "duration_in_months": {
            "type": "integer",
            "title": "Duration In Months"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "deprecated": true,
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "deprecated": true,
            "examples": [
              "usd"
            ]
          },
          "amounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Amounts",
            "description": "Map of currency to fixed amount to discount from the total.",
            "examples": [
              {
                "eur": 900,
                "usd": 1000
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Maximum number of times the discount can be redeemed by a single customer."
          },
          "redemptions_count": {
            "type": "integer",
            "title": "Redemptions Count",
            "description": "Number of times the discount has been redeemed."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          }
        },
        "type": "object",
        "required": [
          "duration",
          "duration_in_months",
          "type",
          "amount",
          "currency",
          "amounts",
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "name",
          "code",
          "starts_at",
          "ends_at",
          "max_redemptions",
          "max_redemptions_per_customer",
          "redemptions_count",
          "organization_id"
        ],
        "title": "DiscountFixedRepeatDurationBase"
      },
      "DiscountPercentageCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Optional timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Optional timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Optional maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Optional maximum number of times the discount can be redeemed by a single customer."
          },
          "products": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid4"
                },
                "type": "array",
                "description": "List of product IDs the discount can be applied to."
              },
              {
                "type": "null"
              }
            ],
            "title": "Products"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**"
          },
          "type": {
            "type": "string",
            "const": "percentage",
            "title": "Type",
            "default": "percentage"
          },
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration",
            "description": "For subscriptions, determines if the discount should be applied once on the first invoice, forever, or for a certain number of months determined by `duration_in_months`."
          },
          "duration_in_months": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 999.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration In Months",
            "description": "Number of months the discount should be applied.\n\nRequired when `duration` is `repeating`. Must be omitted otherwise.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."
          },
          "basis_points": {
            "type": "integer",
            "maximum": 10000.0,
            "minimum": 1.0,
            "title": "Basis Points",
            "description": "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550."
          }
        },
        "type": "object",
        "required": [
          "name",
          "duration",
          "basis_points"
        ],
        "title": "DiscountPercentageCreate",
        "description": "Schema to create a percentage discount."
      },
      "DiscountPercentageOnceForeverDuration": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "basis_points": {
            "type": "integer",
            "title": "Basis Points",
            "description": "Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.",
            "examples": [
              1000
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Maximum number of times the discount can be redeemed by a single customer."
          },
          "redemptions_count": {
            "type": "integer",
            "title": "Redemptions Count",
            "description": "Number of times the discount has been redeemed."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/DiscountProduct"
            },
            "type": "array",
            "title": "Products"
          }
        },
        "type": "object",
        "required": [
          "duration",
          "type",
          "basis_points",
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "name",
          "code",
          "starts_at",
          "ends_at",
          "max_redemptions",
          "max_redemptions_per_customer",
          "redemptions_count",
          "organization_id",
          "products"
        ],
        "title": "DiscountPercentageOnceForeverDuration",
        "description": "Schema for a percentage discount that is applied once or forever."
      },
      "DiscountPercentageOnceForeverDurationBase": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "basis_points": {
            "type": "integer",
            "title": "Basis Points",
            "description": "Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.",
            "examples": [
              1000
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Maximum number of times the discount can be redeemed by a single customer."
          },
          "redemptions_count": {
            "type": "integer",
            "title": "Redemptions Count",
            "description": "Number of times the discount has been redeemed."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          }
        },
        "type": "object",
        "required": [
          "duration",
          "type",
          "basis_points",
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "name",
          "code",
          "starts_at",
          "ends_at",
          "max_redemptions",
          "max_redemptions_per_customer",
          "redemptions_count",
          "organization_id"
        ],
        "title": "DiscountPercentageOnceForeverDurationBase"
      },
      "DiscountPercentageRepeatDuration": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "duration_in_months": {
            "type": "integer",
            "title": "Duration In Months"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "basis_points": {
            "type": "integer",
            "title": "Basis Points",
            "description": "Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.",
            "examples": [
              1000
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Maximum number of times the discount can be redeemed by a single customer."
          },
          "redemptions_count": {
            "type": "integer",
            "title": "Redemptions Count",
            "description": "Number of times the discount has been redeemed."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/DiscountProduct"
            },
            "type": "array",
            "title": "Products"
          }
        },
        "type": "object",
        "required": [
          "duration",
          "duration_in_months",
          "type",
          "basis_points",
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "name",
          "code",
          "starts_at",
          "ends_at",
          "max_redemptions",
          "max_redemptions_per_customer",
          "redemptions_count",
          "organization_id",
          "products"
        ],
        "title": "DiscountPercentageRepeatDuration",
        "description": "Schema for a percentage discount that is applied on every invoice\nfor a certain number of months."
      },
      "DiscountPercentageRepeatDurationBase": {
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/DiscountDuration"
          },
          "duration_in_months": {
            "type": "integer",
            "title": "Duration In Months"
          },
          "type": {
            "$ref": "#/components/schemas/DiscountType"
          },
          "basis_points": {
            "type": "integer",
            "title": "Basis Points",
            "description": "Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.",
            "examples": [
              1000
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Maximum number of times the discount can be redeemed by a single customer."
          },
          "redemptions_count": {
            "type": "integer",
            "title": "Redemptions Count",
            "description": "Number of times the discount has been redeemed."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          }
        },
        "type": "object",
        "required": [
          "duration",
          "duration_in_months",
          "type",
          "basis_points",
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "name",
          "code",
          "starts_at",
          "ends_at",
          "max_redemptions",
          "max_redemptions_per_customer",
          "redemptions_count",
          "organization_id"
        ],
        "title": "DiscountPercentageRepeatDurationBase"
      },
      "DiscountProduct": {
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products."
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval."
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. None when no meter cycle is set."
          },
          "is_recurring": {
            "type": "boolean",
            "title": "Is Recurring",
            "description": "Whether the product is a subscription."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the product is archived and no longer available."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the product."
          }
        },
        "type": "object",
        "required": [
          "metadata",
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "name",
          "description",
          "visibility",
          "recurring_interval",
          "recurring_interval_count",
          "meter_interval",
          "meter_interval_count",
          "is_recurring",
          "is_archived",
          "organization_id"
        ],
        "title": "DiscountProduct",
        "description": "A product that a discount can be applied to."
      },
      "DiscountRedemptionLimitReached": {
        "properties": {
          "error": {
            "type": "string",
            "const": "DiscountRedemptionLimitReached",
            "title": "Error",
            "examples": [
              "DiscountRedemptionLimitReached"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "DiscountRedemptionLimitReached"
      },
      "DiscountSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "name",
          "-name",
          "code",
          "-code",
          "redemptions_count",
          "-redemptions_count",
          "ends_at",
          "-ends_at"
        ],
        "title": "DiscountSortProperty"
      },
      "DiscountType": {
        "type": "string",
        "enum": [
          "fixed",
          "percentage"
        ],
        "title": "DiscountType"
      },
      "DiscountUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Name of the discount. Will be displayed to the customer when the discount is applied."
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Optional timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Optional timestamp after which the discount is no longer redeemable."
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions",
            "description": "Optional maximum number of times the discount can be redeemed."
          },
          "max_redemptions_per_customer": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Redemptions Per Customer",
            "description": "Optional maximum number of times the discount can be redeemed by a single customer."
          },
          "duration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DiscountDuration"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_in_months": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 999.0,
                "minimum": 1.0,
                "description": "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration In Months"
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DiscountType"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 999999999999.0,
                "minimum": 0.0,
                "description": "Fixed amount to discount from the invoice total."
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount",
            "deprecated": true
          },
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PresentmentCurrency",
                "description": "The currency of the fixed amount discount."
              },
              {
                "type": "null"
              }
            ],
            "deprecated": true
          },
          "amounts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer",
                  "maximum": 999999999999.0,
                  "minimum": 0.0,
                  "description": "Fixed amount to discount from the invoice total."
                },
                "propertyNames": {
                  "$ref": "#/components/schemas/PresentmentCurrency"
                },
                "type": "object",
                "minProperties": 1,
                "description": "Map of currency to fixed amount to discount from the total. This allows specifying different discount amounts for different currencies."
              },
              {
                "type": "null"
              }
            ],
            "title": "Amounts"
          },
          "basis_points": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0,
                "description": "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550."
              },
              {
                "type": "null"
              }
            ],
            "title": "Basis Points"
          },
          "products": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid4"
                },
                "type": "array",
                "description": "List of product IDs the discount can be applied to."
              },
              {
                "type": "null"
              }
            ],
            "title": "Products"
          }
        },
        "type": "object",
        "title": "DiscountUpdate",
        "description": "Schema to update a discount."
      },
      "Dispute": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "status": {
            "$ref": "#/components/schemas/DisputeStatus",
            "description": "Status of the dispute. `prevented` means we issued a refund before the dispute was escalated, avoiding any fees.",
            "examples": [
              "needs_response",
              "prevented"
            ]
          },
          "resolved": {
            "type": "boolean",
            "title": "Resolved",
            "description": "Whether the dispute has been resolved (won or lost).",
            "examples": [
              false
            ]
          },
          "closed": {
            "type": "boolean",
            "title": "Closed",
            "description": "Whether the dispute is closed (prevented, won, or lost).",
            "examples": [
              false
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "Amount in cents disputed.",
            "examples": [
              1000
            ]
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount",
            "description": "Tax amount in cents disputed.",
            "examples": [
              200
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "Currency code of the dispute.",
            "examples": [
              "usd"
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "The reason for the dispute as reported by the card network (e.g. `fraudulent`, `product_not_received`). `None` until the processor reports it.",
            "examples": [
              "fraudulent"
            ]
          },
          "evidence_due_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Due By",
            "description": "Deadline to submit evidence in response to the dispute. `None` when no response is required."
          },
          "past_due": {
            "type": "boolean",
            "title": "Past Due",
            "description": "Whether the evidence submission deadline has passed.",
            "examples": [
              false
            ]
          },
          "order_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Order Id",
            "description": "The ID of the order associated with the dispute.",
            "examples": [
              "57107b74-8400-4d80-a2fc-54c2b4239cb3"
            ]
          },
          "payment_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Payment Id",
            "description": "The ID of the payment associated with the dispute.",
            "examples": [
              "42b94870-36b9-4573-96b6-b90b1c99a353"
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/DisputeCustomer",
            "description": "The customer who was charged for the disputed payment."
          },
          "case_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Case Id",
            "description": "The ID of the support case for this dispute, if one was opened."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "status",
          "resolved",
          "closed",
          "amount",
          "tax_amount",
          "currency",
          "reason",
          "evidence_due_by",
          "past_due",
          "order_id",
          "payment_id",
          "customer",
          "case_id"
        ],
        "title": "Dispute",
        "description": "Schema representing a dispute.\n\nA dispute is a challenge raised by a customer or their bank regarding a payment."
      },
      "DisputeAutoAcceptNotEnabled": {
        "properties": {
          "error": {
            "type": "string",
            "const": "DisputeAutoAcceptNotEnabled",
            "title": "Error",
            "examples": [
              "DisputeAutoAcceptNotEnabled"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "DisputeAutoAcceptNotEnabled"
      },
      "DisputeCustomer": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified",
            "description": "Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.",
            "examples": [
              true
            ]
          },
          "type": {
            "$ref": "#/components/schemas/CustomerType",
            "description": "The type of customer: 'individual' for single users, 'team' for customers with multiple members.",
            "examples": [
              "individual"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the customer.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id",
            "description": "The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details."
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "first_user_event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "First User Event At",
            "description": "Timestamp of the first event ingested for this customer. Can predate `created_at`, and is null if no event was ever ingested."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "examples": [
              "https://www.gravatar.com/avatar/xxx?d=404"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "email_verified",
          "type",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "organization_id",
          "deleted_at",
          "first_user_event_at",
          "avatar_url"
        ],
        "title": "DisputeCustomer"
      },
      "DisputeNotOpenError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "DisputeNotOpenError",
            "title": "Error",
            "examples": [
              "DisputeNotOpenError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "DisputeNotOpenError"
      },
      "DisputeSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "amount",
          "-amount"
        ],
        "title": "DisputeSortProperty"
      },
      "DisputeStatus": {
        "type": "string",
        "enum": [
          "prevented",
          "early_warning",
          "needs_response",
          "under_review",
          "lost",
          "won"
        ],
        "title": "DisputeStatus"
      },
      "DownloadableFileCreate": {
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "upload": {
            "$ref": "#/components/schemas/S3FileCreateMultipart"
          },
          "service": {
            "type": "string",
            "const": "downloadable",
            "title": "Service"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "type": "object",
        "required": [
          "name",
          "mime_type",
          "size",
          "upload",
          "service"
        ],
        "title": "DownloadableFileCreate",
        "description": "Schema to create a file to be associated with the downloadables benefit."
      },
      "DownloadableFileRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "storage_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Version"
          },
          "checksum_etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Etag"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "checksum_sha256_hex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Hex"
          },
          "last_modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified At"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "service": {
            "type": "string",
            "const": "downloadable",
            "title": "Service"
          },
          "is_uploaded": {
            "type": "boolean",
            "title": "Is Uploaded"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "flagged_malicious_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Flagged Malicious At"
          },
          "size_readable": {
            "type": "string",
            "title": "Size Readable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "name",
          "path",
          "mime_type",
          "size",
          "storage_version",
          "checksum_etag",
          "checksum_sha256_base64",
          "checksum_sha256_hex",
          "last_modified_at",
          "version",
          "service",
          "is_uploaded",
          "created_at",
          "flagged_malicious_at",
          "size_readable"
        ],
        "title": "DownloadableFileRead",
        "description": "File to be associated with the downloadables benefit."
      },
      "DownloadableRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id"
          },
          "file": {
            "$ref": "#/components/schemas/FileDownload"
          }
        },
        "type": "object",
        "required": [
          "id",
          "benefit_id",
          "file"
        ],
        "title": "DownloadableRead"
      },
      "Event": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/SystemEvent"
          },
          {
            "$ref": "#/components/schemas/UserEvent"
          }
        ],
        "discriminator": {
          "propertyName": "source",
          "mapping": {
            "system": "#/components/schemas/SystemEvent",
            "user": "#/components/schemas/UserEvent"
          }
        }
      },
      "EventCreateCustomer": {
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 128,
            "title": "Name",
            "description": "The name of the event."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the event. **Required unless you use an organization token.**"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "Your unique identifier for this event. Useful for deduplication and parent-child relationships."
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID."
          },
          "metadata": {
            "$ref": "#/components/schemas/EventMetadataInput",
            "description": "Key-value object allowing you to store additional information about the event. Some keys like `_llm` are structured data that are handled specially by Polar.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action. Used for member-level attribution in B2B."
          }
        },
        "type": "object",
        "required": [
          "name",
          "customer_id"
        ],
        "title": "EventCreateCustomer"
      },
      "EventCreateExternalCustomer": {
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 128,
            "title": "Name",
            "description": "The name of the event."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the event. **Required unless you use an organization token.**"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "Your unique identifier for this event. Useful for deduplication and parent-child relationships."
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID."
          },
          "metadata": {
            "$ref": "#/components/schemas/EventMetadataInput",
            "description": "Key-value object allowing you to store additional information about the event. Some keys like `_llm` are structured data that are handled specially by Polar.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "external_customer_id": {
            "type": "string",
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action. Used for member-level attribution in B2B."
          }
        },
        "type": "object",
        "required": [
          "name",
          "external_customer_id"
        ],
        "title": "EventCreateExternalCustomer"
      },
      "EventMetadataInput": {
        "properties": {
          "_cost": {
            "$ref": "#/components/schemas/CostMetadata-Input"
          },
          "_llm": {
            "$ref": "#/components/schemas/LLMMetadata"
          }
        },
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 500,
              "minLength": 1
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "type": "object",
        "title": "EventMetadataInput"
      },
      "EventMetadataOutput": {
        "properties": {
          "_cost": {
            "$ref": "#/components/schemas/CostMetadata-Output"
          },
          "_llm": {
            "$ref": "#/components/schemas/LLMMetadata"
          }
        },
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "type": "object",
        "title": "EventMetadataOutput"
      },
      "EventName": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event."
          },
          "source": {
            "$ref": "#/components/schemas/EventSource",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "occurrences": {
            "type": "integer",
            "title": "Occurrences",
            "description": "Number of times the event has occurred."
          },
          "first_seen": {
            "type": "string",
            "format": "date-time",
            "title": "First Seen",
            "description": "The first time the event occurred.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "last_seen": {
            "type": "string",
            "format": "date-time",
            "title": "Last Seen",
            "description": "The last time the event occurred.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          }
        },
        "type": "object",
        "required": [
          "name",
          "label",
          "source",
          "occurrences",
          "first_seen",
          "last_seen"
        ],
        "title": "EventName"
      },
      "EventNamesSortProperty": {
        "type": "string",
        "enum": [
          "name",
          "-name",
          "occurrences",
          "-occurrences",
          "first_seen",
          "-first_seen",
          "last_seen",
          "-last_seen"
        ],
        "title": "EventNamesSortProperty"
      },
      "EventSortProperty": {
        "type": "string",
        "enum": [
          "timestamp",
          "-timestamp"
        ],
        "title": "EventSortProperty"
      },
      "EventSource": {
        "type": "string",
        "enum": [
          "system",
          "user"
        ],
        "title": "EventSource"
      },
      "EventType": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the event type."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "The label for the event type."
          },
          "label_property_selector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Property Selector",
            "description": "Property path to extract dynamic label from event metadata."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event type."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "label",
          "organization_id"
        ],
        "title": "EventType"
      },
      "EventTypeUpdate": {
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Label",
            "description": "The label for the event type."
          },
          "label_property_selector": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Property Selector",
            "description": "Property path to extract dynamic label from event metadata (e.g., 'subject' or 'metadata.subject')."
          }
        },
        "type": "object",
        "required": [
          "label"
        ],
        "title": "EventTypeUpdate"
      },
      "EventTypeWithStats": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "The ID of the event type. Null for system event types."
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At",
            "description": "Creation timestamp of the event type. Null for system event types."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the event type. Null for system event types."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the event type."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "The label for the event type."
          },
          "label_property_selector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Property Selector",
            "description": "Property path to extract dynamic label from event metadata."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event type."
          },
          "source": {
            "$ref": "#/components/schemas/EventSource",
            "description": "The source of the events (system or user)."
          },
          "occurrences": {
            "type": "integer",
            "title": "Occurrences",
            "description": "Number of times the event has occurred."
          },
          "first_seen": {
            "type": "string",
            "format": "date-time",
            "title": "First Seen",
            "description": "The first time the event occurred.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "last_seen": {
            "type": "string",
            "format": "date-time",
            "title": "Last Seen",
            "description": "The last time the event occurred.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          }
        },
        "type": "object",
        "required": [
          "name",
          "label",
          "organization_id",
          "source",
          "occurrences",
          "first_seen",
          "last_seen"
        ],
        "title": "EventTypeWithStats"
      },
      "EventTypesSortProperty": {
        "type": "string",
        "enum": [
          "name",
          "-name",
          "label",
          "-label",
          "occurrences",
          "-occurrences",
          "first_seen",
          "-first_seen",
          "last_seen",
          "-last_seen"
        ],
        "title": "EventTypesSortProperty"
      },
      "EventsIngest": {
        "properties": {
          "events": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/EventCreateCustomer"
                },
                {
                  "$ref": "#/components/schemas/EventCreateExternalCustomer"
                }
              ]
            },
            "type": "array",
            "title": "Events",
            "description": "List of events to ingest."
          }
        },
        "type": "object",
        "required": [
          "events"
        ],
        "title": "EventsIngest"
      },
      "EventsIngestResponse": {
        "properties": {
          "inserted": {
            "type": "integer",
            "title": "Inserted",
            "description": "Number of events inserted."
          },
          "duplicates": {
            "type": "integer",
            "title": "Duplicates",
            "description": "Number of duplicate events skipped.",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "inserted"
        ],
        "title": "EventsIngestResponse"
      },
      "ExistingProductPrice": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ExistingProductPrice",
        "description": "A price that already exists for this product.\n\nUseful when updating a product if you want to keep an existing price."
      },
      "ExpiredCheckoutError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "ExpiredCheckoutError",
            "title": "Error",
            "examples": [
              "ExpiredCheckoutError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "ExpiredCheckoutError"
      },
      "FileCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DownloadableFileCreate"
          },
          {
            "$ref": "#/components/schemas/ProductMediaFileCreate"
          },
          {
            "$ref": "#/components/schemas/OrganizationAvatarFileCreate"
          },
          {
            "$ref": "#/components/schemas/SupportCaseAttachmentFileCreate"
          }
        ],
        "discriminator": {
          "propertyName": "service",
          "mapping": {
            "downloadable": "#/components/schemas/DownloadableFileCreate",
            "organization_avatar": "#/components/schemas/OrganizationAvatarFileCreate",
            "product_media": "#/components/schemas/ProductMediaFileCreate",
            "support_case_attachment": "#/components/schemas/SupportCaseAttachmentFileCreate"
          }
        }
      },
      "FileDownload": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "storage_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Version"
          },
          "checksum_etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Etag"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "checksum_sha256_hex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Hex"
          },
          "last_modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified At"
          },
          "download": {
            "$ref": "#/components/schemas/S3DownloadURL"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "is_uploaded": {
            "type": "boolean",
            "title": "Is Uploaded"
          },
          "service": {
            "$ref": "#/components/schemas/FileServiceTypes"
          },
          "size_readable": {
            "type": "string",
            "title": "Size Readable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "name",
          "path",
          "mime_type",
          "size",
          "storage_version",
          "checksum_etag",
          "checksum_sha256_base64",
          "checksum_sha256_hex",
          "last_modified_at",
          "download",
          "version",
          "is_uploaded",
          "service",
          "size_readable"
        ],
        "title": "FileDownload"
      },
      "FilePatch": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "type": "object",
        "title": "FilePatch"
      },
      "FileRead": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DownloadableFileRead"
          },
          {
            "$ref": "#/components/schemas/ProductMediaFileRead"
          },
          {
            "$ref": "#/components/schemas/OrganizationAvatarFileRead"
          },
          {
            "$ref": "#/components/schemas/SupportCaseAttachmentFileRead"
          }
        ],
        "discriminator": {
          "propertyName": "service",
          "mapping": {
            "downloadable": "#/components/schemas/DownloadableFileRead",
            "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead",
            "product_media": "#/components/schemas/ProductMediaFileRead",
            "support_case_attachment": "#/components/schemas/SupportCaseAttachmentFileRead"
          }
        }
      },
      "FileServiceTypes": {
        "type": "string",
        "enum": [
          "downloadable",
          "product_media",
          "organization_avatar",
          "support_case_attachment"
        ],
        "title": "FileServiceTypes"
      },
      "FileUpload": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "storage_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Version"
          },
          "checksum_etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Etag"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "checksum_sha256_hex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Hex"
          },
          "last_modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified At"
          },
          "upload": {
            "$ref": "#/components/schemas/S3FileUploadMultipart"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "is_uploaded": {
            "type": "boolean",
            "title": "Is Uploaded",
            "default": false
          },
          "service": {
            "$ref": "#/components/schemas/FileServiceTypes"
          },
          "size_readable": {
            "type": "string",
            "title": "Size Readable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "name",
          "path",
          "mime_type",
          "size",
          "storage_version",
          "checksum_etag",
          "checksum_sha256_base64",
          "checksum_sha256_hex",
          "last_modified_at",
          "upload",
          "version",
          "service",
          "size_readable"
        ],
        "title": "FileUpload"
      },
      "FileUploadCompleted": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/S3FileUploadCompletedPart"
            },
            "type": "array",
            "title": "Parts"
          }
        },
        "type": "object",
        "required": [
          "id",
          "path",
          "parts"
        ],
        "title": "FileUploadCompleted"
      },
      "Filter": {
        "properties": {
          "conjunction": {
            "$ref": "#/components/schemas/FilterConjunction"
          },
          "clauses": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/FilterClause"
                },
                {
                  "$ref": "#/components/schemas/Filter"
                }
              ]
            },
            "type": "array",
            "title": "Clauses"
          }
        },
        "type": "object",
        "required": [
          "conjunction",
          "clauses"
        ],
        "title": "Filter"
      },
      "FilterClause": {
        "properties": {
          "property": {
            "type": "string",
            "title": "Property"
          },
          "operator": {
            "$ref": "#/components/schemas/FilterOperator"
          },
          "value": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": -2147483648.0
              },
              {
                "type": "boolean"
              }
            ],
            "title": "Value"
          }
        },
        "type": "object",
        "required": [
          "property",
          "operator",
          "value"
        ],
        "title": "FilterClause"
      },
      "FilterConjunction": {
        "type": "string",
        "enum": [
          "and",
          "or"
        ],
        "title": "FilterConjunction"
      },
      "FilterOperator": {
        "type": "string",
        "enum": [
          "eq",
          "ne",
          "gt",
          "gte",
          "lt",
          "lte",
          "like",
          "not_like"
        ],
        "title": "FilterOperator"
      },
      "GenericPayment": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor",
            "description": "The payment processor.",
            "examples": [
              "stripe"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus",
            "description": "The payment status.",
            "examples": [
              "succeeded"
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The payment amount in cents.",
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The payment currency",
            "examples": [
              "usd"
            ]
          },
          "method": {
            "type": "string",
            "title": "Method",
            "description": "The payment method used.",
            "examples": [
              "card"
            ]
          },
          "trigger": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentTrigger"
              },
              {
                "type": "null"
              }
            ],
            "description": "What initiated this payment attempt, e.g. initial purchase, subscription renewal, or an automated dunning retry.",
            "examples": [
              "subscription_cycle"
            ]
          },
          "decline_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decline Reason",
            "description": "Error code, if the payment was declined.",
            "examples": [
              "insufficient_funds"
            ]
          },
          "decline_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decline Message",
            "description": "Human-readable error message, if the payment was declined.",
            "examples": [
              "Your card has insufficient funds."
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization that owns the payment.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id",
            "description": "The ID of the checkout session associated with this payment.",
            "examples": [
              "e4b478fa-cd25-4253-9f1f-8a41e6370ede"
            ]
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order associated with this payment.",
            "examples": [
              "e4b478fa-cd25-4253-9f1f-8a41e6370ede"
            ]
          },
          "processor_metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Processor Metadata",
            "description": "Additional metadata from the payment processor for internal use."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "processor",
          "status",
          "amount",
          "currency",
          "method",
          "trigger",
          "decline_reason",
          "decline_message",
          "organization_id",
          "checkout_id",
          "order_id"
        ],
        "title": "GenericPayment",
        "description": "Schema of a payment with a generic payment method."
      },
      "GrantedLicenseKey": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "customer": {
            "$ref": "#/components/schemas/LicenseKeyCustomer"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The benefit ID."
          },
          "key": {
            "type": "string",
            "title": "Key"
          },
          "display_key": {
            "type": "string",
            "title": "Display Key"
          },
          "status": {
            "type": "string",
            "const": "granted",
            "title": "Status"
          },
          "limit_activations": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Activations"
          },
          "usage": {
            "type": "integer",
            "title": "Usage"
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          },
          "validations": {
            "type": "integer",
            "title": "Validations"
          },
          "last_validated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Validated At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "organization_id",
          "customer_id",
          "customer",
          "benefit_id",
          "key",
          "display_key",
          "status",
          "limit_activations",
          "usage",
          "limit_usage",
          "validations",
          "last_validated_at",
          "expires_at"
        ],
        "title": "GrantedLicenseKey"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InactiveSubscription": {
        "properties": {
          "error": {
            "type": "string",
            "const": "InactiveSubscription",
            "title": "Error",
            "examples": [
              "InactiveSubscription"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "InactiveSubscription"
      },
      "IntrospectTokenResponse": {
        "properties": {
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "token_type": {
            "type": "string",
            "enum": [
              "access_token",
              "refresh_token"
            ],
            "title": "Token Type"
          },
          "scope": {
            "type": "string",
            "title": "Scope"
          },
          "sub_type": {
            "$ref": "#/components/schemas/SubType"
          },
          "sub": {
            "type": "string",
            "title": "Sub"
          },
          "organizations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Organizations"
          },
          "aud": {
            "type": "string",
            "title": "Aud"
          },
          "iss": {
            "type": "string",
            "title": "Iss"
          },
          "exp": {
            "type": "integer",
            "title": "Exp"
          },
          "iat": {
            "type": "integer",
            "title": "Iat"
          }
        },
        "type": "object",
        "required": [
          "active",
          "client_id",
          "token_type",
          "scope",
          "sub_type",
          "sub",
          "organizations",
          "aud",
          "iss",
          "exp",
          "iat"
        ],
        "title": "IntrospectTokenResponse"
      },
      "KrCardPayment": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor",
            "description": "The payment processor.",
            "examples": [
              "stripe"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus",
            "description": "The payment status.",
            "examples": [
              "succeeded"
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The payment amount in cents.",
            "examples": [
              1000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The payment currency",
            "examples": [
              "usd"
            ]
          },
          "method": {
            "type": "string",
            "const": "kr_card",
            "title": "Method",
            "description": "The payment method used.",
            "examples": [
              "kr_card"
            ]
          },
          "trigger": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentTrigger"
              },
              {
                "type": "null"
              }
            ],
            "description": "What initiated this payment attempt, e.g. initial purchase, subscription renewal, or an automated dunning retry.",
            "examples": [
              "subscription_cycle"
            ]
          },
          "decline_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decline Reason",
            "description": "Error code, if the payment was declined.",
            "examples": [
              "insufficient_funds"
            ]
          },
          "decline_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decline Message",
            "description": "Human-readable error message, if the payment was declined.",
            "examples": [
              "Your card has insufficient funds."
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization that owns the payment.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id",
            "description": "The ID of the checkout session associated with this payment.",
            "examples": [
              "e4b478fa-cd25-4253-9f1f-8a41e6370ede"
            ]
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "The ID of the order associated with this payment.",
            "examples": [
              "e4b478fa-cd25-4253-9f1f-8a41e6370ede"
            ]
          },
          "processor_metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Processor Metadata",
            "description": "Additional metadata from the payment processor for internal use."
          },
          "method_metadata": {
            "$ref": "#/components/schemas/KrCardPaymentMetadata",
            "description": "Additional metadata for the South Korean card payment method."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "processor",
          "status",
          "amount",
          "currency",
          "method",
          "trigger",
          "decline_reason",
          "decline_message",
          "organization_id",
          "checkout_id",
          "order_id",
          "method_metadata"
        ],
        "title": "KrCardPayment",
        "description": "Schema of a payment with a South Korean card payment method."
      },
      "KrCardPaymentMetadata": {
        "properties": {
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand",
            "description": "The local South Korean card brand used for the payment.",
            "examples": [
              "kookmin",
              "shinhan"
            ]
          },
          "last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last4",
            "description": "The last 4 digits of the card number.",
            "examples": [
              "4242"
            ]
          }
        },
        "type": "object",
        "required": [
          "brand",
          "last4"
        ],
        "title": "KrCardPaymentMetadata",
        "description": "Additional metadata for a South Korean card payment method."
      },
      "LLMMetadata": {
        "properties": {
          "vendor": {
            "type": "string",
            "title": "Vendor",
            "description": "The vendor of the event."
          },
          "model": {
            "type": "string",
            "title": "Model",
            "description": "The model used for the event."
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt",
            "description": "The LLM prompt used for the event."
          },
          "response": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response",
            "description": "The LLM response used for the event."
          },
          "input_tokens": {
            "type": "integer",
            "title": "Input Tokens",
            "description": "The number of LLM input tokens used for the event."
          },
          "cached_input_tokens": {
            "type": "integer",
            "title": "Cached Input Tokens",
            "description": "The number of LLM cached tokens that were used for the event."
          },
          "output_tokens": {
            "type": "integer",
            "title": "Output Tokens",
            "description": "The number of LLM output tokens used for the event."
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens",
            "description": "The total number of LLM tokens used for the event."
          }
        },
        "type": "object",
        "required": [
          "vendor",
          "model",
          "input_tokens",
          "output_tokens",
          "total_tokens"
        ],
        "title": "LLMMetadata"
      },
      "LegacyOrganizationStatus": {
        "type": "string",
        "enum": [
          "created",
          "under_review",
          "denied",
          "active"
        ],
        "title": "LegacyOrganizationStatus",
        "description": "Legacy organization status values kept for backward compatibility in schemas\nusing OrganizationPublicBase."
      },
      "LegacyRecurringProductPrice": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/LegacyRecurringProductPriceFixed"
          },
          {
            "$ref": "#/components/schemas/LegacyRecurringProductPriceCustom"
          }
        ],
        "discriminator": {
          "propertyName": "amount_type",
          "mapping": {
            "custom": "#/components/schemas/LegacyRecurringProductPriceCustom",
            "fixed": "#/components/schemas/LegacyRecurringProductPriceFixed"
          }
        }
      },
      "LegacyRecurringProductPriceCustom": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the price."
          },
          "source": {
            "$ref": "#/components/schemas/ProductPriceSource",
            "description": "The source of the price . `catalog` is a predefined price, while `ad_hoc` is a price created dynamically on a Checkout session."
          },
          "amount_type": {
            "type": "string",
            "const": "custom",
            "title": "Amount Type"
          },
          "price_currency": {
            "type": "string",
            "title": "Price Currency",
            "description": "The currency in which the customer will be charged."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If null, it defaults to the organization's default tax behavior."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the price is archived and no longer available."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the product owning the price."
          },
          "type": {
            "type": "string",
            "const": "recurring",
            "title": "Type",
            "description": "The type of the price."
          },
          "recurring_interval": {
            "$ref": "#/components/schemas/RecurringInterval",
            "description": "The recurring interval of the price."
          },
          "minimum_amount": {
            "type": "integer",
            "title": "Minimum Amount",
            "description": "The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'."
          },
          "maximum_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum Amount",
            "description": "The maximum amount the customer can pay."
          },
          "preset_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preset Amount",
            "description": "The initial amount shown to the customer."
          },
          "legacy": {
            "type": "boolean",
            "const": true,
            "title": "Legacy",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "type",
          "recurring_interval",
          "minimum_amount",
          "maximum_amount",
          "preset_amount",
          "legacy"
        ],
        "title": "LegacyRecurringProductPriceCustom",
        "description": "A pay-what-you-want recurring price for a product, i.e. a subscription.\n\n**Deprecated**: The recurring interval should be set on the product itself."
      },
      "LegacyRecurringProductPriceFixed": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the price."
          },
          "source": {
            "$ref": "#/components/schemas/ProductPriceSource",
            "description": "The source of the price . `catalog` is a predefined price, while `ad_hoc` is a price created dynamically on a Checkout session."
          },
          "amount_type": {
            "type": "string",
            "const": "fixed",
            "title": "Amount Type"
          },
          "price_currency": {
            "type": "string",
            "title": "Price Currency",
            "description": "The currency in which the customer will be charged."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If null, it defaults to the organization's default tax behavior."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the price is archived and no longer available."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the product owning the price."
          },
          "type": {
            "type": "string",
            "const": "recurring",
            "title": "Type",
            "description": "The type of the price."
          },
          "recurring_interval": {
            "$ref": "#/components/schemas/RecurringInterval",
            "description": "The recurring interval of the price."
          },
          "price_amount": {
            "type": "integer",
            "title": "Price Amount",
            "description": "The price in cents."
          },
          "legacy": {
            "type": "boolean",
            "const": true,
            "title": "Legacy",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "type",
          "recurring_interval",
          "price_amount",
          "legacy"
        ],
        "title": "LegacyRecurringProductPriceFixed",
        "description": "A recurring price for a product, i.e. a subscription.\n\n**Deprecated**: The recurring interval should be set on the product itself."
      },
      "LicenseKeyActivate": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "conditions": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Conditions",
            "description": "Key-value object allowing you to set conditions that must match when validating the license key.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "meta": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Meta",
            "description": "Key-value object allowing you to store additional information about the activation\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          }
        },
        "type": "object",
        "required": [
          "key",
          "organization_id",
          "label"
        ],
        "title": "LicenseKeyActivate"
      },
      "LicenseKeyActivationBase": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "license_key_id": {
            "type": "string",
            "format": "uuid4",
            "title": "License Key Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "meta": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "type": "object",
            "title": "Meta"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "license_key_id",
          "label",
          "meta",
          "created_at",
          "modified_at"
        ],
        "title": "LicenseKeyActivationBase"
      },
      "LicenseKeyActivationCreated": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "license_key_id": {
            "type": "string",
            "format": "uuid4",
            "title": "License Key Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "meta": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "type": "object",
            "title": "Meta"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At"
          },
          "license_key": {
            "$ref": "#/components/schemas/GrantedLicenseKey"
          }
        },
        "type": "object",
        "required": [
          "id",
          "license_key_id",
          "label",
          "meta",
          "created_at",
          "modified_at",
          "license_key"
        ],
        "title": "LicenseKeyActivationCreated"
      },
      "LicenseKeyActivationRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "license_key_id": {
            "type": "string",
            "format": "uuid4",
            "title": "License Key Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "meta": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "type": "object",
            "title": "Meta"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At"
          },
          "license_key": {
            "$ref": "#/components/schemas/LicenseKeyRead"
          }
        },
        "type": "object",
        "required": [
          "id",
          "license_key_id",
          "label",
          "meta",
          "created_at",
          "modified_at",
          "license_key"
        ],
        "title": "LicenseKeyActivationRead"
      },
      "LicenseKeyCustomer": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified",
            "description": "Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.",
            "examples": [
              true
            ]
          },
          "type": {
            "$ref": "#/components/schemas/CustomerType",
            "description": "The type of customer: 'individual' for single users, 'team' for customers with multiple members.",
            "examples": [
              "individual"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the customer.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id",
            "description": "The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details."
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "first_user_event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "First User Event At",
            "description": "Timestamp of the first event ingested for this customer. Can predate `created_at`, and is null if no event was ever ingested."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "examples": [
              "https://www.gravatar.com/avatar/xxx?d=404"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "email_verified",
          "type",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "organization_id",
          "deleted_at",
          "first_user_event_at",
          "avatar_url"
        ],
        "title": "LicenseKeyCustomer"
      },
      "LicenseKeyDeactivate": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "activation_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Activation Id"
          }
        },
        "type": "object",
        "required": [
          "key",
          "organization_id",
          "activation_id"
        ],
        "title": "LicenseKeyDeactivate"
      },
      "LicenseKeyRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "customer": {
            "$ref": "#/components/schemas/LicenseKeyCustomer"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The benefit ID."
          },
          "key": {
            "type": "string",
            "title": "Key"
          },
          "display_key": {
            "type": "string",
            "title": "Display Key"
          },
          "status": {
            "$ref": "#/components/schemas/LicenseKeyStatus"
          },
          "limit_activations": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Activations"
          },
          "usage": {
            "type": "integer",
            "title": "Usage"
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          },
          "validations": {
            "type": "integer",
            "title": "Validations"
          },
          "last_validated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Validated At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "organization_id",
          "customer_id",
          "customer",
          "benefit_id",
          "key",
          "display_key",
          "status",
          "limit_activations",
          "usage",
          "limit_usage",
          "validations",
          "last_validated_at",
          "expires_at"
        ],
        "title": "LicenseKeyRead"
      },
      "LicenseKeyStatus": {
        "type": "string",
        "enum": [
          "granted",
          "revoked",
          "disabled"
        ],
        "title": "LicenseKeyStatus"
      },
      "LicenseKeyUpdate": {
        "properties": {
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LicenseKeyStatus"
              },
              {
                "type": "null"
              }
            ],
            "x-polar-cli-confirm": {
              "one_of": [
                "revoked",
                "disabled"
              ]
            }
          },
          "usage": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Usage",
            "default": 0
          },
          "limit_activations": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": -2147483648.0,
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Activations"
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": -2147483648.0,
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "title": "LicenseKeyUpdate"
      },
      "LicenseKeyUser": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "public_name": {
            "type": "string",
            "title": "Public Name"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "public_name"
        ],
        "title": "LicenseKeyUser"
      },
      "LicenseKeyValidate": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "activation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Id"
          },
          "benefit_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The benefit ID."
              },
              {
                "type": "null"
              }
            ],
            "title": "Benefit Id"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "increment_usage": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Increment Usage"
          },
          "conditions": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Conditions",
            "description": "Key-value object allowing you to set conditions that must match when validating the license key.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          }
        },
        "type": "object",
        "required": [
          "key",
          "organization_id"
        ],
        "title": "LicenseKeyValidate"
      },
      "LicenseKeyWithActivations": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "customer": {
            "$ref": "#/components/schemas/LicenseKeyCustomer"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The benefit ID."
          },
          "key": {
            "type": "string",
            "title": "Key"
          },
          "display_key": {
            "type": "string",
            "title": "Display Key"
          },
          "status": {
            "$ref": "#/components/schemas/LicenseKeyStatus"
          },
          "limit_activations": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Activations"
          },
          "usage": {
            "type": "integer",
            "title": "Usage"
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          },
          "validations": {
            "type": "integer",
            "title": "Validations"
          },
          "last_validated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Validated At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "activations": {
            "items": {
              "$ref": "#/components/schemas/LicenseKeyActivationBase"
            },
            "type": "array",
            "title": "Activations"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "organization_id",
          "customer_id",
          "customer",
          "benefit_id",
          "key",
          "display_key",
          "status",
          "limit_activations",
          "usage",
          "limit_usage",
          "validations",
          "last_validated_at",
          "expires_at",
          "activations"
        ],
        "title": "LicenseKeyWithActivations"
      },
      "ListResourceWithCursorPagination_Event_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/CursorPagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResourceWithCursorPagination[Event]"
      },
      "ListResource_BenefitDownloadableFile_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BenefitDownloadableFile"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[BenefitDownloadableFile]"
      },
      "ListResource_BenefitGrant_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BenefitGrant"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[BenefitGrant]"
      },
      "ListResource_Benefit_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Benefit",
              "title": "Benefit"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Benefit]"
      },
      "ListResource_CheckoutLink_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CheckoutLink"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CheckoutLink]"
      },
      "ListResource_Checkout_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Checkout"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Checkout]"
      },
      "ListResource_CustomField_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomField",
              "title": "CustomField"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomField]"
      },
      "ListResource_CustomerBenefitGrant_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerBenefitGrant",
              "title": "CustomerBenefitGrant"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomerBenefitGrant]"
      },
      "ListResource_CustomerCustomerMeter_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerCustomerMeter"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomerCustomerMeter]"
      },
      "ListResource_CustomerMeter_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerMeter"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomerMeter]"
      },
      "ListResource_CustomerOrder_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerOrder"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomerOrder]"
      },
      "ListResource_CustomerPaymentMethod_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerPaymentMethod",
              "title": "CustomerPaymentMethod"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomerPaymentMethod]"
      },
      "ListResource_CustomerPortalMember_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerPortalMember"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomerPortalMember]"
      },
      "ListResource_CustomerSubscription_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerSubscription"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomerSubscription]"
      },
      "ListResource_CustomerWallet_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerWallet"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[CustomerWallet]"
      },
      "ListResource_Customer_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Customer"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Customer]"
      },
      "ListResource_Discount_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Discount",
              "title": "Discount"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Discount]"
      },
      "ListResource_Dispute_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Dispute"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Dispute]"
      },
      "ListResource_DownloadableRead_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DownloadableRead"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[DownloadableRead]"
      },
      "ListResource_EventName_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EventName"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[EventName]"
      },
      "ListResource_EventTypeWithStats_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EventTypeWithStats"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[EventTypeWithStats]"
      },
      "ListResource_Event_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Event]"
      },
      "ListResource_FileRead_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FileRead"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[FileRead]"
      },
      "ListResource_LicenseKeyRead_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/LicenseKeyRead"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[LicenseKeyRead]"
      },
      "ListResource_Member_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Member]"
      },
      "ListResource_Meter_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Meter"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Meter]"
      },
      "ListResource_Order_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Order"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Order]"
      },
      "ListResource_Organization_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Organization"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Organization]"
      },
      "ListResource_PaymentMethod_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PaymentMethod",
              "title": "PaymentMethod"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[PaymentMethod]"
      },
      "ListResource_Payment_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Payment"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Payment]"
      },
      "ListResource_Product_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Product]"
      },
      "ListResource_Refund_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Refund"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Refund]"
      },
      "ListResource_Subscription_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Subscription"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Subscription]"
      },
      "ListResource_WebhookDelivery_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[WebhookDelivery]"
      },
      "ListResource_WebhookEndpoint_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[WebhookEndpoint]"
      },
      "ManualRetryLimitExceeded": {
        "properties": {
          "error": {
            "type": "string",
            "const": "ManualRetryLimitExceeded",
            "title": "Error",
            "examples": [
              "ManualRetryLimitExceeded"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "ManualRetryLimitExceeded"
      },
      "Member": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the member."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer this member belongs to."
          },
          "email": {
            "type": "string",
            "title": "Email",
            "description": "The email address of the member.",
            "examples": [
              "member@example.com"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the member.",
            "examples": [
              "Jane Doe"
            ]
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the member in your system. This must be unique within the customer. ",
            "examples": [
              "usr_1337"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/MemberRole",
            "description": "The role of the member within the customer.",
            "examples": [
              "owner"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "customer_id",
          "email",
          "name",
          "external_id",
          "role"
        ],
        "title": "Member",
        "description": "A member of a customer."
      },
      "MemberCreateFromCustomer": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "The email address of the member.",
            "examples": [
              "member@example.com"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the member.",
                "examples": [
                  "Jane Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the member in your system. This must be unique within the customer. ",
            "examples": [
              "usr_1337"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "member",
              "billing_manager"
            ],
            "title": "Role",
            "description": "The role of the member within the customer. To assign or transfer ownership, use the member update endpoint.",
            "default": "member",
            "examples": [
              "member"
            ]
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "MemberCreateFromCustomer",
        "description": "Schema for creating a new member nested under a customer.\n\nThe customer is taken from the URL path, so it's not part of the body."
      },
      "MemberOwnerCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "The email address of the member.",
            "examples": [
              "member@example.com"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the member.",
                "examples": [
                  "Jane Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the member in your system. This must be unique within the customer. ",
            "examples": [
              "usr_1337"
            ]
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "MemberOwnerCreate",
        "description": "Schema for creating an owner member during customer creation."
      },
      "MemberRole": {
        "type": "string",
        "enum": [
          "owner",
          "billing_manager",
          "member"
        ],
        "title": "MemberRole"
      },
      "MemberSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at"
        ],
        "title": "MemberSortProperty"
      },
      "MemberUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "description": "The name of the member.",
                "examples": [
                  "Jane Doe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemberRole"
              },
              {
                "type": "null"
              }
            ],
            "description": "The role of the member within the customer.",
            "examples": [
              "member"
            ]
          }
        },
        "type": "object",
        "title": "MemberUpdate",
        "description": "Schema for updating a member."
      },
      "MetadataOutputType": {
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "type": "object"
      },
      "Meter": {
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the meter. Will be shown on customer's invoices and usage."
          },
          "unit": {
            "$ref": "#/components/schemas/MeterUnit",
            "description": "The unit of the meter."
          },
          "custom_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Label",
            "description": "The label for the custom unit."
          },
          "custom_multiplier": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Multiplier",
            "description": "The multiplier to convert from base unit to display scale."
          },
          "filter": {
            "$ref": "#/components/schemas/Filter",
            "description": "The filter to apply on events that'll be used to calculate the meter."
          },
          "aggregation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CountAggregation"
              },
              {
                "$ref": "#/components/schemas/PropertyAggregation"
              },
              {
                "$ref": "#/components/schemas/UniqueAggregation"
              }
            ],
            "title": "Aggregation",
            "description": "The aggregation to apply on the filtered events to calculate the meter.",
            "discriminator": {
              "propertyName": "func",
              "mapping": {
                "avg": "#/components/schemas/PropertyAggregation",
                "count": "#/components/schemas/CountAggregation",
                "max": "#/components/schemas/PropertyAggregation",
                "min": "#/components/schemas/PropertyAggregation",
                "sum": "#/components/schemas/PropertyAggregation",
                "unique": "#/components/schemas/UniqueAggregation"
              }
            }
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the meter."
          },
          "archived_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At",
            "description": "Whether the meter is archived and the time it was archived."
          }
        },
        "type": "object",
        "required": [
          "metadata",
          "created_at",
          "modified_at",
          "id",
          "name",
          "unit",
          "filter",
          "aggregation",
          "organization_id"
        ],
        "title": "Meter"
      },
      "MeterCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "type": "string",
            "minLength": 3,
            "title": "Name",
            "description": "The name of the meter. Will be shown on customer's invoices and usage."
          },
          "unit": {
            "$ref": "#/components/schemas/MeterUnit",
            "description": "The unit of the meter.",
            "default": "scalar"
          },
          "custom_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Label",
            "description": "The label for the custom unit, e.g. 'request'. Required when unit is 'custom'."
          },
          "custom_multiplier": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Multiplier",
            "description": "The multiplier to convert from the base unit to display scale, e.g. 1000 to display per 1000 units. Defaults to 1 when not provided."
          },
          "filter": {
            "$ref": "#/components/schemas/Filter",
            "description": "The filter to apply on events that'll be used to calculate the meter."
          },
          "aggregation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CountAggregation"
              },
              {
                "$ref": "#/components/schemas/PropertyAggregation"
              },
              {
                "$ref": "#/components/schemas/UniqueAggregation"
              }
            ],
            "title": "Aggregation",
            "description": "The aggregation to apply on the filtered events to calculate the meter.",
            "discriminator": {
              "propertyName": "func",
              "mapping": {
                "avg": "#/components/schemas/PropertyAggregation",
                "count": "#/components/schemas/CountAggregation",
                "max": "#/components/schemas/PropertyAggregation",
                "min": "#/components/schemas/PropertyAggregation",
                "sum": "#/components/schemas/PropertyAggregation",
                "unique": "#/components/schemas/UniqueAggregation"
              }
            }
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the meter. **Required unless you use an organization token.**"
          }
        },
        "type": "object",
        "required": [
          "name",
          "filter",
          "aggregation"
        ],
        "title": "MeterCreate"
      },
      "MeterCreditEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "meter.credited",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/MeterCreditedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "MeterCreditEvent",
        "description": "An event created by Polar when credits are added to a customer meter."
      },
      "MeterCreditedMetadata": {
        "properties": {
          "meter_id": {
            "type": "string",
            "title": "Meter Id"
          },
          "units": {
            "type": "integer",
            "title": "Units"
          },
          "rollover": {
            "type": "boolean",
            "title": "Rollover"
          }
        },
        "type": "object",
        "required": [
          "meter_id",
          "units",
          "rollover"
        ],
        "title": "MeterCreditedMetadata"
      },
      "MeterQuantities": {
        "properties": {
          "quantities": {
            "items": {
              "$ref": "#/components/schemas/MeterQuantity"
            },
            "type": "array",
            "title": "Quantities"
          },
          "total": {
            "type": "number",
            "title": "Total",
            "description": "The total quantity for the period.",
            "examples": [
              100.0
            ]
          }
        },
        "type": "object",
        "required": [
          "quantities",
          "total"
        ],
        "title": "MeterQuantities"
      },
      "MeterQuantity": {
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp for the current period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "quantity": {
            "type": "number",
            "title": "Quantity",
            "description": "The quantity for the current period.",
            "examples": [
              10.0
            ]
          }
        },
        "type": "object",
        "required": [
          "timestamp",
          "quantity"
        ],
        "title": "MeterQuantity"
      },
      "MeterResetEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "meter.reset",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/MeterResetMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "MeterResetEvent",
        "description": "An event created by Polar when a customer meter is reset."
      },
      "MeterResetMetadata": {
        "properties": {
          "meter_id": {
            "type": "string",
            "title": "Meter Id"
          }
        },
        "type": "object",
        "required": [
          "meter_id"
        ],
        "title": "MeterResetMetadata"
      },
      "MeterSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "name",
          "-name"
        ],
        "title": "MeterSortProperty"
      },
      "MeterUnit": {
        "type": "string",
        "enum": [
          "scalar",
          "token",
          "custom"
        ],
        "title": "MeterUnit"
      },
      "MeterUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the meter. Will be shown on customer's invoices and usage."
          },
          "unit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MeterUnit"
              },
              {
                "type": "null"
              }
            ],
            "description": "The unit of the meter."
          },
          "custom_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Label",
            "description": "The label for the custom unit. Required when unit is 'custom'."
          },
          "custom_multiplier": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Multiplier",
            "description": "The multiplier to convert from base unit to display scale. Required when unit is 'custom'."
          },
          "filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Filter",
                "description": "The filter to apply on events that'll be used to calculate the meter."
              },
              {
                "type": "null"
              }
            ],
            "description": "The filter to apply on events that'll be used to calculate the meter."
          },
          "aggregation": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CountAggregation"
                  },
                  {
                    "$ref": "#/components/schemas/PropertyAggregation"
                  },
                  {
                    "$ref": "#/components/schemas/UniqueAggregation"
                  }
                ],
                "discriminator": {
                  "propertyName": "func",
                  "mapping": {
                    "avg": "#/components/schemas/PropertyAggregation",
                    "count": "#/components/schemas/CountAggregation",
                    "max": "#/components/schemas/PropertyAggregation",
                    "min": "#/components/schemas/PropertyAggregation",
                    "sum": "#/components/schemas/PropertyAggregation",
                    "unique": "#/components/schemas/UniqueAggregation"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Aggregation",
            "description": "The aggregation to apply on the filtered events to calculate the meter."
          },
          "is_archived": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Archived",
            "description": "Whether the meter is archived. Archived meters are no longer used for billing.",
            "x-polar-cli-confirm": {
              "equals": true
            }
          }
        },
        "type": "object",
        "title": "MeterUpdate"
      },
      "Metric": {
        "properties": {
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Unique identifier for the metric."
          },
          "display_name": {
            "type": "string",
            "title": "Display Name",
            "description": "Human-readable name for the metric."
          },
          "type": {
            "$ref": "#/components/schemas/MetricType",
            "description": "Type of the metric, useful to know the unit or format of the value."
          }
        },
        "type": "object",
        "required": [
          "slug",
          "display_name",
          "type"
        ],
        "title": "Metric",
        "description": "Information about a metric."
      },
      "MetricDashboardCreate": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Display name for the dashboard."
          },
          "metrics": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Metrics",
            "description": "List of metric slugs to display in this dashboard."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning this dashboard. **Required unless you use an organization token.**"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "MetricDashboardCreate",
        "description": "Schema for creating a metrics dashboard."
      },
      "MetricDashboardSchema": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Display name for the dashboard."
          },
          "metrics": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Metrics",
            "description": "List of metric slugs displayed in this dashboard."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning this dashboard."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "metrics",
          "organization_id"
        ],
        "title": "MetricDashboardSchema",
        "description": "A user-defined metrics dashboard."
      },
      "MetricDashboardUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Display name for the dashboard."
          },
          "metrics": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Metrics",
            "description": "List of metric slugs to display in this dashboard."
          }
        },
        "type": "object",
        "title": "MetricDashboardUpdate",
        "description": "Schema for updating a metrics dashboard."
      },
      "MetricPeriod": {
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Timestamp of this period data.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "active_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Subscriptions"
          },
          "committed_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Committed Subscriptions"
          },
          "monthly_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Recurring Revenue"
          },
          "trial_monthly_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Monthly Recurring Revenue"
          },
          "committed_monthly_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Committed Monthly Recurring Revenue"
          },
          "trial_committed_monthly_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Committed Monthly Recurring Revenue"
          },
          "average_revenue_per_user": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Revenue Per User"
          },
          "checkouts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkouts"
          },
          "succeeded_checkouts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Succeeded Checkouts"
          },
          "churned_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Churned Subscriptions"
          },
          "churn_rate": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Churn Rate"
          },
          "seats_total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Total"
          },
          "seats_claimed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Claimed"
          },
          "seats_pending": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Pending"
          },
          "seat_customers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Customers"
          },
          "new_seat_customers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Seat Customers"
          },
          "churned_seat_customers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Churned Seat Customers"
          },
          "orders": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Orders"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "net_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Revenue"
          },
          "cumulative_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cumulative Revenue"
          },
          "net_cumulative_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Cumulative Revenue"
          },
          "costs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Costs"
          },
          "cumulative_costs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cumulative Costs"
          },
          "average_order_value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Order Value"
          },
          "net_average_order_value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Average Order Value"
          },
          "cost_per_user": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Per User"
          },
          "active_user_by_event": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active User By Event"
          },
          "one_time_products": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "One Time Products"
          },
          "one_time_products_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "One Time Products Revenue"
          },
          "one_time_products_net_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "One Time Products Net Revenue"
          },
          "new_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Subscriptions"
          },
          "new_subscriptions_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Subscriptions Revenue"
          },
          "new_subscriptions_net_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Subscriptions Net Revenue"
          },
          "renewed_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Renewed Subscriptions"
          },
          "renewed_subscriptions_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Renewed Subscriptions Revenue"
          },
          "renewed_subscriptions_net_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Renewed Subscriptions Net Revenue"
          },
          "canceled_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions"
          },
          "canceled_subscriptions_customer_service": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Customer Service"
          },
          "canceled_subscriptions_low_quality": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Low Quality"
          },
          "canceled_subscriptions_missing_features": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Missing Features"
          },
          "canceled_subscriptions_switched_service": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Switched Service"
          },
          "canceled_subscriptions_too_complex": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Too Complex"
          },
          "canceled_subscriptions_too_expensive": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Too Expensive"
          },
          "canceled_subscriptions_unused": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Unused"
          },
          "canceled_subscriptions_other": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Other"
          },
          "annual_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annual Recurring Revenue"
          },
          "committed_annual_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Committed Annual Recurring Revenue"
          },
          "checkouts_conversion": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkouts Conversion"
          },
          "ltv": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ltv"
          },
          "gross_margin": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gross Margin"
          },
          "gross_margin_percentage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gross Margin Percentage"
          },
          "cashflow": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cashflow"
          },
          "average_seats_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Seats Per Customer"
          },
          "seat_utilization_rate": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Utilization Rate"
          }
        },
        "type": "object",
        "required": [
          "timestamp"
        ],
        "title": "MetricPeriod"
      },
      "MetricType": {
        "type": "string",
        "enum": [
          "scalar",
          "currency",
          "currency_sub_cent",
          "percentage"
        ],
        "title": "MetricType"
      },
      "Metrics": {
        "properties": {
          "active_subscriptions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "committed_subscriptions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "monthly_recurring_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "trial_monthly_recurring_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "committed_monthly_recurring_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "trial_committed_monthly_recurring_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "average_revenue_per_user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "checkouts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "succeeded_checkouts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "churned_subscriptions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "churn_rate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "seats_total": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "seats_claimed": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "seats_pending": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "seat_customers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_seat_customers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "churned_seat_customers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "orders": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "net_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "cumulative_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "net_cumulative_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "costs": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "cumulative_costs": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "average_order_value": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "net_average_order_value": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_per_user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "active_user_by_event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "one_time_products": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "one_time_products_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "one_time_products_net_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_subscriptions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_subscriptions_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_subscriptions_net_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "renewed_subscriptions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "renewed_subscriptions_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "renewed_subscriptions_net_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions_customer_service": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions_low_quality": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions_missing_features": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions_switched_service": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions_too_complex": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions_too_expensive": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions_unused": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_subscriptions_other": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "annual_recurring_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "committed_annual_recurring_revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "checkouts_conversion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "ltv": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "gross_margin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "gross_margin_percentage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "cashflow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "average_seats_per_customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          },
          "seat_utilization_rate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metric"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "Metrics"
      },
      "MetricsIntervalLimit": {
        "properties": {
          "min_days": {
            "type": "integer",
            "title": "Min Days",
            "description": "Minimum number of days for this interval."
          },
          "max_days": {
            "type": "integer",
            "title": "Max Days",
            "description": "Maximum number of days for this interval."
          }
        },
        "type": "object",
        "required": [
          "min_days",
          "max_days"
        ],
        "title": "MetricsIntervalLimit",
        "description": "Date interval limit to get metrics for a given interval."
      },
      "MetricsIntervalsLimits": {
        "properties": {
          "hour": {
            "$ref": "#/components/schemas/MetricsIntervalLimit",
            "description": "Limits for the hour interval."
          },
          "day": {
            "$ref": "#/components/schemas/MetricsIntervalLimit",
            "description": "Limits for the day interval."
          },
          "week": {
            "$ref": "#/components/schemas/MetricsIntervalLimit",
            "description": "Limits for the week interval."
          },
          "month": {
            "$ref": "#/components/schemas/MetricsIntervalLimit",
            "description": "Limits for the month interval."
          },
          "year": {
            "$ref": "#/components/schemas/MetricsIntervalLimit",
            "description": "Limits for the year interval."
          }
        },
        "type": "object",
        "required": [
          "hour",
          "day",
          "week",
          "month",
          "year"
        ],
        "title": "MetricsIntervalsLimits",
        "description": "Date interval limits to get metrics for each interval."
      },
      "MetricsLimits": {
        "properties": {
          "min_date": {
            "type": "string",
            "format": "date",
            "title": "Min Date",
            "description": "Minimum date to get metrics."
          },
          "intervals": {
            "$ref": "#/components/schemas/MetricsIntervalsLimits",
            "description": "Limits for each interval."
          }
        },
        "type": "object",
        "required": [
          "min_date",
          "intervals"
        ],
        "title": "MetricsLimits",
        "description": "Date limits to get metrics."
      },
      "MetricsResponse": {
        "properties": {
          "periods": {
            "items": {
              "$ref": "#/components/schemas/MetricPeriod"
            },
            "type": "array",
            "title": "Periods",
            "description": "List of data for each timestamp."
          },
          "totals": {
            "$ref": "#/components/schemas/MetricsTotals",
            "description": "Totals for the whole selected period."
          },
          "metrics": {
            "$ref": "#/components/schemas/Metrics",
            "description": "Information about the returned metrics."
          }
        },
        "type": "object",
        "required": [
          "periods",
          "totals",
          "metrics"
        ],
        "title": "MetricsResponse",
        "description": "Metrics response schema."
      },
      "MetricsTotals": {
        "properties": {
          "active_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Subscriptions"
          },
          "committed_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Committed Subscriptions"
          },
          "monthly_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Recurring Revenue"
          },
          "trial_monthly_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Monthly Recurring Revenue"
          },
          "committed_monthly_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Committed Monthly Recurring Revenue"
          },
          "trial_committed_monthly_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Committed Monthly Recurring Revenue"
          },
          "average_revenue_per_user": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Revenue Per User"
          },
          "checkouts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkouts"
          },
          "succeeded_checkouts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Succeeded Checkouts"
          },
          "churned_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Churned Subscriptions"
          },
          "churn_rate": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Churn Rate"
          },
          "seats_total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Total"
          },
          "seats_claimed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Claimed"
          },
          "seats_pending": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Pending"
          },
          "seat_customers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Customers"
          },
          "new_seat_customers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Seat Customers"
          },
          "churned_seat_customers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Churned Seat Customers"
          },
          "orders": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Orders"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "net_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Revenue"
          },
          "cumulative_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cumulative Revenue"
          },
          "net_cumulative_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Cumulative Revenue"
          },
          "costs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Costs"
          },
          "cumulative_costs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cumulative Costs"
          },
          "average_order_value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Order Value"
          },
          "net_average_order_value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Average Order Value"
          },
          "cost_per_user": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Per User"
          },
          "active_user_by_event": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active User By Event"
          },
          "one_time_products": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "One Time Products"
          },
          "one_time_products_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "One Time Products Revenue"
          },
          "one_time_products_net_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "One Time Products Net Revenue"
          },
          "new_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Subscriptions"
          },
          "new_subscriptions_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Subscriptions Revenue"
          },
          "new_subscriptions_net_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Subscriptions Net Revenue"
          },
          "renewed_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Renewed Subscriptions"
          },
          "renewed_subscriptions_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Renewed Subscriptions Revenue"
          },
          "renewed_subscriptions_net_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Renewed Subscriptions Net Revenue"
          },
          "canceled_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions"
          },
          "canceled_subscriptions_customer_service": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Customer Service"
          },
          "canceled_subscriptions_low_quality": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Low Quality"
          },
          "canceled_subscriptions_missing_features": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Missing Features"
          },
          "canceled_subscriptions_switched_service": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Switched Service"
          },
          "canceled_subscriptions_too_complex": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Too Complex"
          },
          "canceled_subscriptions_too_expensive": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Too Expensive"
          },
          "canceled_subscriptions_unused": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Unused"
          },
          "canceled_subscriptions_other": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled Subscriptions Other"
          },
          "annual_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annual Recurring Revenue"
          },
          "committed_annual_recurring_revenue": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Committed Annual Recurring Revenue"
          },
          "checkouts_conversion": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkouts Conversion"
          },
          "ltv": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ltv"
          },
          "gross_margin": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gross Margin"
          },
          "gross_margin_percentage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gross Margin Percentage"
          },
          "cashflow": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cashflow"
          },
          "average_seats_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Seats Per Customer"
          },
          "seat_utilization_rate": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Utilization Rate"
          }
        },
        "type": "object",
        "title": "MetricsTotals"
      },
      "MissingInvoiceBillingDetails": {
        "properties": {
          "error": {
            "type": "string",
            "const": "MissingInvoiceBillingDetails",
            "title": "Error",
            "examples": [
              "MissingInvoiceBillingDetails"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "MissingInvoiceBillingDetails"
      },
      "NotOpenCheckout": {
        "properties": {
          "error": {
            "type": "string",
            "const": "NotOpenCheckout",
            "title": "Error",
            "examples": [
              "NotOpenCheckout"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "NotOpenCheckout"
      },
      "NotPermitted": {
        "properties": {
          "error": {
            "type": "string",
            "const": "NotPermitted",
            "title": "Error",
            "examples": [
              "NotPermitted"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "NotPermitted"
      },
      "OAuth2ClientConfiguration": {
        "properties": {
          "redirect_uris": {
            "items": {
              "type": "string",
              "minLength": 1,
              "format": "uri"
            },
            "type": "array",
            "title": "Redirect Uris"
          },
          "token_endpoint_auth_method": {
            "type": "string",
            "enum": [
              "client_secret_basic",
              "client_secret_post",
              "none"
            ],
            "title": "Token Endpoint Auth Method",
            "default": "client_secret_post"
          },
          "grant_types": {
            "items": {
              "type": "string",
              "enum": [
                "authorization_code",
                "refresh_token"
              ]
            },
            "type": "array",
            "title": "Grant Types",
            "default": [
              "authorization_code",
              "refresh_token"
            ]
          },
          "response_types": {
            "items": {
              "type": "string",
              "const": "code"
            },
            "type": "array",
            "title": "Response Types",
            "default": [
              "code"
            ]
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": "openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write"
          },
          "client_name": {
            "type": "string",
            "title": "Client Name"
          },
          "client_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Uri"
          },
          "logo_uri": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Uri"
          },
          "tos_uri": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tos Uri"
          },
          "policy_uri": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Uri"
          },
          "default_sub_type": {
            "$ref": "#/components/schemas/SubType",
            "default": "user"
          }
        },
        "type": "object",
        "required": [
          "redirect_uris",
          "client_name"
        ],
        "title": "OAuth2ClientConfiguration"
      },
      "OAuth2ClientConfigurationUpdate": {
        "properties": {
          "redirect_uris": {
            "items": {
              "type": "string",
              "minLength": 1,
              "format": "uri"
            },
            "type": "array",
            "title": "Redirect Uris"
          },
          "token_endpoint_auth_method": {
            "type": "string",
            "enum": [
              "client_secret_basic",
              "client_secret_post",
              "none"
            ],
            "title": "Token Endpoint Auth Method",
            "default": "client_secret_post"
          },
          "grant_types": {
            "items": {
              "type": "string",
              "enum": [
                "authorization_code",
                "refresh_token"
              ]
            },
            "type": "array",
            "title": "Grant Types",
            "default": [
              "authorization_code",
              "refresh_token"
            ]
          },
          "response_types": {
            "items": {
              "type": "string",
              "const": "code"
            },
            "type": "array",
            "title": "Response Types",
            "default": [
              "code"
            ]
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": "openid profile email user:read user:write organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write transactions:read transactions:write payouts:read payouts:write products:read products:write benefits:read benefits:write events:read events:write meters:read meters:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write members:read members:write wallets:read wallets:write disputes:read disputes:write customer_meters:read customer_sessions:write member_sessions:write customer_seats:read customer_seats:write orders:read orders:write refunds:read refunds:write payments:read metrics:read metrics:write webhooks:read webhooks:write license_keys:read license_keys:write customer_portal:read customer_portal:write notifications:read notifications:write notification_recipients:read notification_recipients:write"
          },
          "client_name": {
            "type": "string",
            "title": "Client Name"
          },
          "client_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Uri"
          },
          "logo_uri": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Uri"
          },
          "tos_uri": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tos Uri"
          },
          "policy_uri": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Uri"
          },
          "default_sub_type": {
            "$ref": "#/components/schemas/SubType",
            "default": "user"
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          }
        },
        "type": "object",
        "required": [
          "redirect_uris",
          "client_name",
          "client_id"
        ],
        "title": "OAuth2ClientConfigurationUpdate"
      },
      "OAuth2ClientPublic": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "client_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Name"
          },
          "client_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Uri"
          },
          "logo_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Uri"
          },
          "tos_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tos Uri"
          },
          "policy_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Uri"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "client_id",
          "client_name",
          "client_uri",
          "logo_uri",
          "tos_uri",
          "policy_uri"
        ],
        "title": "OAuth2ClientPublic"
      },
      "OffSessionChargesNotEnabled": {
        "properties": {
          "error": {
            "type": "string",
            "const": "OffSessionChargesNotEnabled",
            "title": "Error",
            "examples": [
              "OffSessionChargesNotEnabled"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "OffSessionChargesNotEnabled"
      },
      "Order": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus",
            "examples": [
              "paid"
            ]
          },
          "paid": {
            "type": "boolean",
            "title": "Paid",
            "description": "Whether the order has been paid for.",
            "examples": [
              true
            ]
          },
          "subtotal_amount": {
            "type": "integer",
            "title": "Subtotal Amount",
            "description": "Amount in cents, before discounts and taxes.",
            "examples": [
              10000
            ]
          },
          "discount_amount": {
            "type": "integer",
            "title": "Discount Amount",
            "description": "Discount amount in cents.",
            "examples": [
              1000
            ]
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount",
            "description": "Amount in cents, after discounts but before taxes.",
            "examples": [
              9000
            ]
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount",
            "description": "Sales tax amount in cents.",
            "examples": [
              720
            ]
          },
          "total_amount": {
            "type": "integer",
            "title": "Total Amount",
            "description": "Amount in cents, after discounts and taxes.",
            "examples": [
              9720
            ]
          },
          "applied_balance_amount": {
            "type": "integer",
            "title": "Applied Balance Amount",
            "description": "Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance,  or decrease it, if the customer has a positive balance.Amount in cents.",
            "examples": [
              0
            ]
          },
          "due_amount": {
            "type": "integer",
            "title": "Due Amount",
            "description": "Amount in cents that is due for this order.",
            "examples": [
              0
            ]
          },
          "refunded_amount": {
            "type": "integer",
            "title": "Refunded Amount",
            "description": "Amount refunded in cents.",
            "examples": [
              0
            ]
          },
          "refunded_tax_amount": {
            "type": "integer",
            "title": "Refunded Tax Amount",
            "description": "Sales tax refunded in cents.",
            "examples": [
              0
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "examples": [
              "usd"
            ]
          },
          "billing_reason": {
            "$ref": "#/components/schemas/OrderBillingReason"
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name of the customer that should appear on the invoice. "
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number",
            "description": "The invoice number associated with this order. `null` while the order is in `draft` status; assigned at finalize."
          },
          "is_invoice_generated": {
            "type": "boolean",
            "title": "Is Invoice Generated",
            "description": "Whether an invoice has been generated for this order."
          },
          "receipt_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipt Number",
            "description": "The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Number of seats purchased (for seat-based one-time orders)."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Number of units purchased (for unit-based pricing)."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id"
          },
          "next_payment_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Payment Attempt At",
            "description": "When the next automatic payment retry is scheduled. `null` if the order is not in dunning or all retries have been exhausted."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "platform_fee_amount": {
            "type": "integer",
            "title": "Platform Fee Amount",
            "description": "Platform fee amount in cents.",
            "examples": [
              500
            ]
          },
          "platform_fee_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform Fee Currency",
            "description": "Currency of the platform fee.",
            "examples": [
              "usd"
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/OrderCustomer"
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrderProduct"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase"
                  }
                ],
                "title": "OrderDiscount"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "subscription": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrderSubscription"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrderItemSchema"
            },
            "type": "array",
            "title": "Items",
            "description": "Line items composing the order."
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "A summary description of the order.",
            "examples": [
              "Pro Plan"
            ]
          },
          "refundable_amount": {
            "type": "integer",
            "title": "Refundable Amount",
            "description": "Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.",
            "readOnly": true,
            "examples": [
              9000
            ]
          },
          "refundable_tax_amount": {
            "type": "integer",
            "title": "Refundable Tax Amount",
            "description": "Sales tax in cents that would be refunded if the full refundable amount is refunded.",
            "readOnly": true,
            "examples": [
              720
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "status",
          "paid",
          "subtotal_amount",
          "discount_amount",
          "net_amount",
          "tax_amount",
          "total_amount",
          "applied_balance_amount",
          "due_amount",
          "refunded_amount",
          "refunded_tax_amount",
          "currency",
          "billing_reason",
          "billing_name",
          "billing_address",
          "invoice_number",
          "is_invoice_generated",
          "receipt_number",
          "units",
          "customer_id",
          "product_id",
          "discount_id",
          "subscription_id",
          "checkout_id",
          "metadata",
          "platform_fee_amount",
          "platform_fee_currency",
          "customer",
          "product",
          "discount",
          "subscription",
          "items",
          "description",
          "refundable_amount",
          "refundable_tax_amount"
        ],
        "title": "Order"
      },
      "OrderBillingReason": {
        "type": "string",
        "enum": [
          "purchase",
          "subscription_create",
          "subscription_cycle",
          "subscription_update",
          "subscription_meter_cycle"
        ],
        "title": "OrderBillingReason"
      },
      "OrderBillingReasonInternal": {
        "type": "string",
        "enum": [
          "purchase",
          "subscription_create",
          "subscription_cycle",
          "subscription_cycle_after_trial",
          "subscription_cancel",
          "subscription_update",
          "subscription_meter_cycle"
        ],
        "title": "OrderBillingReasonInternal",
        "description": "Internal billing reasons with additional granularity."
      },
      "OrderCreate": {
        "properties": {
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization the order belongs to. **Required unless you use an organization token.** The customer and product must belong to this organization."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer the order is for. Must belong to the order's organization."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the one-time product to charge for. Must belong to the order's organization. Only fixed-price, free and unit-based products are supported."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency",
            "description": "The currency to charge in (ISO 4217, lowercase, e.g. `usd`). Defaults to the organization's default currency; specify it to force a different one, or when the product isn't priced in the organization's default currency."
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount",
            "description": "A custom amount to charge, in the smallest currency unit. Overrides the product's price; defaults to the product's configured price (0 for free products). A positive amount must be at least the currency's minimum. Can't be combined with `units`."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "The number of units to charge for. Required when the product has unit-based pricing, and rejected otherwise. The amount comes from the price's tiers. Can't be combined with `amount`."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "A custom description for the order's line item, shown on the invoice and receipt (e.g. `5,000 tokens`). Defaults to the product name."
          }
        },
        "type": "object",
        "required": [
          "customer_id",
          "product_id"
        ],
        "title": "OrderCreate",
        "description": "Schema to create a draft order for an off-session charge."
      },
      "OrderCustomer": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified",
            "description": "Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.",
            "examples": [
              true
            ]
          },
          "type": {
            "$ref": "#/components/schemas/CustomerType",
            "description": "The type of customer: 'individual' for single users, 'team' for customers with multiple members.",
            "examples": [
              "individual"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the customer.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id",
            "description": "The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details."
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "first_user_event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "First User Event At",
            "description": "Timestamp of the first event ingested for this customer. Can predate `created_at`, and is null if no event was ever ingested."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "examples": [
              "https://www.gravatar.com/avatar/xxx?d=404"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "email_verified",
          "type",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "organization_id",
          "deleted_at",
          "first_user_event_at",
          "avatar_url"
        ],
        "title": "OrderCustomer"
      },
      "OrderExportColumn": {
        "type": "string",
        "enum": [
          "email",
          "created_at",
          "product",
          "net_amount",
          "currency",
          "status",
          "invoice_number",
          "customer_name",
          "billing_name",
          "billing_country",
          "subtotal_amount",
          "discount_amount",
          "tax_amount",
          "total_amount",
          "refunded_amount",
          "billing_reason"
        ],
        "title": "OrderExportColumn"
      },
      "OrderFinalize": {
        "properties": {
          "payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method Id",
            "description": "ID of the payment method to charge. Must belong to the order's customer. Falls back to the customer's default payment method when unset."
          }
        },
        "type": "object",
        "title": "OrderFinalize",
        "description": "Schema to finalize a draft order and trigger an off-session charge."
      },
      "OrderInvoice": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The URL to the invoice."
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "OrderInvoice",
        "description": "Order's invoice data."
      },
      "OrderItemSchema": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Description of the line item charge.",
            "examples": [
              "Pro Plan"
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "Amount in cents, before discounts and taxes.",
            "examples": [
              10000
            ]
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount",
            "description": "Sales tax amount in cents.",
            "examples": [
              720
            ]
          },
          "proration": {
            "type": "boolean",
            "title": "Proration",
            "description": "Whether this charge is due to a proration.",
            "examples": [
              false
            ]
          },
          "product_price_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Price Id",
            "description": "Associated price ID, if any."
          },
          "start_timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Timestamp",
            "description": "Start of the period covered by this line item, if any."
          },
          "end_timestamp": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "End Timestamp",
            "description": "End of the period covered by this line item, if any."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "label",
          "amount",
          "tax_amount",
          "proration",
          "product_price_id",
          "start_timestamp",
          "end_timestamp"
        ],
        "title": "OrderItemSchema",
        "description": "An order line item."
      },
      "OrderNotDraft": {
        "properties": {
          "error": {
            "type": "string",
            "const": "OrderNotDraft",
            "title": "Error",
            "examples": [
              "OrderNotDraft"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "OrderNotDraft"
      },
      "OrderNotEligibleForInvoice": {
        "properties": {
          "error": {
            "type": "string",
            "const": "OrderNotEligibleForInvoice",
            "title": "Error",
            "examples": [
              "OrderNotEligibleForInvoice"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "OrderNotEligibleForInvoice"
      },
      "OrderNotEligibleForRetry": {
        "properties": {
          "error": {
            "type": "string",
            "const": "OrderNotEligibleForRetry",
            "title": "Error",
            "examples": [
              "OrderNotEligibleForRetry"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "OrderNotEligibleForRetry"
      },
      "OrderPaidEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "order.paid",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/OrderPaidMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "OrderPaidEvent",
        "description": "An event created by Polar when an order is paid."
      },
      "OrderPaidMetadata": {
        "properties": {
          "order_id": {
            "type": "string",
            "title": "Order Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "billing_type": {
            "type": "string",
            "title": "Billing Type"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount"
          },
          "applied_balance_amount": {
            "type": "integer",
            "title": "Applied Balance Amount"
          },
          "discount_amount": {
            "type": "integer",
            "title": "Discount Amount"
          },
          "discount_id": {
            "type": "string",
            "title": "Discount Id"
          },
          "platform_fee": {
            "type": "integer",
            "title": "Platform Fee"
          },
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "amount"
        ],
        "title": "OrderPaidMetadata"
      },
      "OrderProduct": {
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products."
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval."
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. None when no meter cycle is set."
          },
          "is_recurring": {
            "type": "boolean",
            "title": "Is Recurring",
            "description": "Whether the product is a subscription."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the product is archived and no longer available."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the product."
          }
        },
        "type": "object",
        "required": [
          "metadata",
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "name",
          "description",
          "visibility",
          "recurring_interval",
          "recurring_interval_count",
          "meter_interval",
          "meter_interval_count",
          "is_recurring",
          "is_archived",
          "organization_id"
        ],
        "title": "OrderProduct"
      },
      "OrderReceipt": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The URL to the receipt PDF."
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "OrderReceipt",
        "description": "Order's receipt data."
      },
      "OrderRefundedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "order.refunded",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/OrderRefundedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "OrderRefundedEvent",
        "description": "An event created by Polar when an order is refunded."
      },
      "OrderRefundedMetadata": {
        "properties": {
          "order_id": {
            "type": "string",
            "title": "Order Id"
          },
          "refunded_amount": {
            "type": "integer",
            "title": "Refunded Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "refunded_amount",
          "currency"
        ],
        "title": "OrderRefundedMetadata"
      },
      "OrderSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "status",
          "-status",
          "invoice_number",
          "-invoice_number",
          "amount",
          "-amount",
          "net_amount",
          "-net_amount",
          "customer",
          "-customer",
          "product",
          "-product",
          "discount",
          "-discount",
          "subscription",
          "-subscription"
        ],
        "title": "OrderSortProperty"
      },
      "OrderStatus": {
        "type": "string",
        "enum": [
          "draft",
          "pending",
          "paid",
          "refunded",
          "partially_refunded",
          "void"
        ],
        "title": "OrderStatus"
      },
      "OrderSubscription": {
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount of the subscription.",
            "examples": [
              10000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The currency of the subscription.",
            "examples": [
              "usd"
            ]
          },
          "recurring_interval": {
            "$ref": "#/components/schemas/RecurringInterval",
            "description": "The interval at which the subscription recurs.",
            "examples": [
              "month"
            ]
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on."
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus",
            "description": "The status of the subscription.",
            "examples": [
              "active"
            ]
          },
          "current_period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period Start",
            "description": "The start timestamp of the current billing period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "current_meter_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Meter Period Start",
            "description": "The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence."
          },
          "current_meter_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Meter Period End",
            "description": "The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew."
          },
          "trial_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "The end timestamp of the trial period, if any."
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "description": "Whether the subscription will be canceled at the end of the current period."
          },
          "canceled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled At",
            "description": "The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`."
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "The timestamp when the subscription ended."
          },
          "past_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Past Due At",
            "description": "The timestamp when the subscription entered `past_due` status."
          },
          "pause_at_period_end": {
            "type": "boolean",
            "title": "Pause At Period End",
            "description": "Whether the subscription will be paused at the end of the current period."
          },
          "paused_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At",
            "description": "The timestamp when the subscription was paused."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Resumes At",
            "description": "The timestamp when a paused subscription is scheduled to automatically resume, if set."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the subscribed customer."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the subscribed product."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "The ID of the applied discount, if any."
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "The number of seats for seat-based subscriptions. None for non-seat subscriptions."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "The number of units for unit-based subscriptions. None for non-unit subscriptions."
          },
          "customer_cancellation_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCancellationReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_cancellation_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Cancellation Comment"
          }
        },
        "type": "object",
        "required": [
          "metadata",
          "created_at",
          "modified_at",
          "id",
          "amount",
          "currency",
          "recurring_interval",
          "recurring_interval_count",
          "status",
          "current_period_start",
          "current_period_end",
          "current_meter_period_start",
          "current_meter_period_end",
          "trial_start",
          "trial_end",
          "cancel_at_period_end",
          "canceled_at",
          "started_at",
          "ends_at",
          "ended_at",
          "pause_at_period_end",
          "paused_at",
          "resumes_at",
          "customer_id",
          "product_id",
          "discount_id",
          "checkout_id",
          "units",
          "customer_cancellation_reason",
          "customer_cancellation_comment"
        ],
        "title": "OrderSubscription"
      },
      "OrderUnvoidedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "order.unvoided",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/OrderUnvoidedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "OrderUnvoidedEvent",
        "description": "An event created by Polar when an order is unvoided."
      },
      "OrderUnvoidedMetadata": {
        "properties": {
          "order_id": {
            "type": "string",
            "title": "Order Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "amount",
          "currency"
        ],
        "title": "OrderUnvoidedMetadata"
      },
      "OrderUpdate": {
        "properties": {
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name of the customer that should appear on the invoice."
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "The address of the customer that should appear on the invoice. Country and state fields cannot be updated."
          }
        },
        "type": "object",
        "title": "OrderUpdate",
        "description": "Schema to update an order."
      },
      "OrderUser": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "public_name": {
            "type": "string",
            "title": "Public Name"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "github_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Github Username"
          }
        },
        "type": "object",
        "required": [
          "id",
          "public_name"
        ],
        "title": "OrderUser"
      },
      "OrderVoidedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "order.voided",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/OrderVoidedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "OrderVoidedEvent",
        "description": "An event created by Polar when an order is voided."
      },
      "OrderVoidedMetadata": {
        "properties": {
          "order_id": {
            "type": "string",
            "title": "Order Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "amount",
          "currency"
        ],
        "title": "OrderVoidedMetadata"
      },
      "Organization": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Organization name shown in checkout, customer portal, emails etc."
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Unique organization slug in checkout, customer portal and credit card statements."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "description": "Avatar URL shown in checkout, customer portal, emails etc."
          },
          "proration_behavior": {
            "$ref": "#/components/schemas/SubscriptionProrationBehavior",
            "description": "Proration behavior applied when customer updates their subscription from the portal."
          },
          "allow_customer_updates": {
            "type": "boolean",
            "title": "Allow Customer Updates",
            "description": "Whether customers can update their subscriptions from the customer portal."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Public support email."
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website",
            "description": "Official website of the organization."
          },
          "socials": {
            "items": {
              "$ref": "#/components/schemas/OrganizationSocialLink"
            },
            "type": "array",
            "title": "Socials",
            "description": "Links to social profiles."
          },
          "status": {
            "$ref": "#/components/schemas/OrganizationStatus",
            "description": "Current organization status"
          },
          "details_submitted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Details Submitted At",
            "description": "When the business details were submitted for review."
          },
          "onboarding_resubmission_requested_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Onboarding Resubmission Requested At",
            "description": "When Polar requested that the organization review and resubmit its onboarding information, if applicable."
          },
          "sso_enforced": {
            "type": "boolean",
            "title": "Sso Enforced",
            "description": "Whether members must access this organization through its SSO connection."
          },
          "default_presentment_currency": {
            "type": "string",
            "title": "Default Presentment Currency",
            "description": "Default presentment currency. Used as fallback in checkout and customer portal, if the customer's local currency is not available."
          },
          "default_tax_behavior": {
            "$ref": "#/components/schemas/TaxBehaviorOption",
            "description": "Default tax behavior applied on products."
          },
          "feature_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationFeatureSettings"
              },
              {
                "type": "null"
              }
            ],
            "description": "Organization feature settings"
          },
          "subscription_settings": {
            "$ref": "#/components/schemas/OrganizationSubscriptionSettings",
            "description": "Settings related to subscriptions management"
          },
          "customer_email_settings": {
            "$ref": "#/components/schemas/OrganizationCustomerEmailSettings",
            "description": "Settings related to customer emails"
          },
          "customer_portal_settings": {
            "$ref": "#/components/schemas/OrganizationCustomerPortalSettings",
            "description": "Settings related to the customer portal"
          },
          "dispute_settings": {
            "$ref": "#/components/schemas/OrganizationDisputeSettings",
            "description": "Settings related to disputes"
          },
          "embed_hosts": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Embed Hosts",
            "description": "Hosts allowed to embed this organization's checkout. An entry is a host and an optional port, without a scheme: HTTPS is always allowed, and HTTP too for local hosts \u2014 `localhost`, any `.localhost` or `.local` name, and loopback or private addresses. `*.example.com` matches any subdomain, but not `example.com` itself. An app origin such as `chrome-extension://abcdef` carries its scheme, having no host to match on."
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "AD",
                  "AE",
                  "AF",
                  "AG",
                  "AI",
                  "AL",
                  "AM",
                  "AO",
                  "AQ",
                  "AR",
                  "AS",
                  "AT",
                  "AU",
                  "AW",
                  "AX",
                  "AZ",
                  "BA",
                  "BB",
                  "BD",
                  "BE",
                  "BF",
                  "BG",
                  "BH",
                  "BI",
                  "BJ",
                  "BL",
                  "BM",
                  "BN",
                  "BO",
                  "BQ",
                  "BR",
                  "BS",
                  "BT",
                  "BV",
                  "BW",
                  "BY",
                  "BZ",
                  "CA",
                  "CC",
                  "CD",
                  "CF",
                  "CG",
                  "CH",
                  "CI",
                  "CK",
                  "CL",
                  "CM",
                  "CN",
                  "CO",
                  "CR",
                  "CU",
                  "CV",
                  "CW",
                  "CX",
                  "CY",
                  "CZ",
                  "DE",
                  "DJ",
                  "DK",
                  "DM",
                  "DO",
                  "DZ",
                  "EC",
                  "EE",
                  "EG",
                  "EH",
                  "ER",
                  "ES",
                  "ET",
                  "FI",
                  "FJ",
                  "FK",
                  "FM",
                  "FO",
                  "FR",
                  "GA",
                  "GB",
                  "GD",
                  "GE",
                  "GF",
                  "GG",
                  "GH",
                  "GI",
                  "GL",
                  "GM",
                  "GN",
                  "GP",
                  "GQ",
                  "GR",
                  "GS",
                  "GT",
                  "GU",
                  "GW",
                  "GY",
                  "HK",
                  "HM",
                  "HN",
                  "HR",
                  "HT",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IM",
                  "IN",
                  "IO",
                  "IQ",
                  "IR",
                  "IS",
                  "IT",
                  "JE",
                  "JM",
                  "JO",
                  "JP",
                  "KE",
                  "KG",
                  "KH",
                  "KI",
                  "KM",
                  "KN",
                  "KP",
                  "KR",
                  "KW",
                  "KY",
                  "KZ",
                  "LA",
                  "LB",
                  "LC",
                  "LI",
                  "LK",
                  "LR",
                  "LS",
                  "LT",
                  "LU",
                  "LV",
                  "LY",
                  "MA",
                  "MC",
                  "MD",
                  "ME",
                  "MF",
                  "MG",
                  "MH",
                  "MK",
                  "ML",
                  "MM",
                  "MN",
                  "MO",
                  "MP",
                  "MQ",
                  "MR",
                  "MS",
                  "MT",
                  "MU",
                  "MV",
                  "MW",
                  "MX",
                  "MY",
                  "MZ",
                  "NA",
                  "NC",
                  "NE",
                  "NF",
                  "NG",
                  "NI",
                  "NL",
                  "NO",
                  "NP",
                  "NR",
                  "NU",
                  "NZ",
                  "OM",
                  "PA",
                  "PE",
                  "PF",
                  "PG",
                  "PH",
                  "PK",
                  "PL",
                  "PM",
                  "PN",
                  "PR",
                  "PS",
                  "PT",
                  "PW",
                  "PY",
                  "QA",
                  "RE",
                  "RO",
                  "RS",
                  "RU",
                  "RW",
                  "SA",
                  "SB",
                  "SC",
                  "SD",
                  "SE",
                  "SG",
                  "SH",
                  "SI",
                  "SJ",
                  "SK",
                  "SL",
                  "SM",
                  "SN",
                  "SO",
                  "SR",
                  "SS",
                  "ST",
                  "SV",
                  "SX",
                  "SY",
                  "SZ",
                  "TC",
                  "TD",
                  "TF",
                  "TG",
                  "TH",
                  "TJ",
                  "TK",
                  "TL",
                  "TM",
                  "TN",
                  "TO",
                  "TR",
                  "TT",
                  "TV",
                  "TW",
                  "TZ",
                  "UA",
                  "UG",
                  "UM",
                  "US",
                  "UY",
                  "UZ",
                  "VA",
                  "VC",
                  "VE",
                  "VG",
                  "VI",
                  "VN",
                  "VU",
                  "WF",
                  "WS",
                  "YE",
                  "YT",
                  "ZA",
                  "ZM",
                  "ZW"
                ],
                "title": "CountryAlpha2",
                "x-speakeasy-enums": [
                  "AD",
                  "AE",
                  "AF",
                  "AG",
                  "AI",
                  "AL",
                  "AM",
                  "AO",
                  "AQ",
                  "AR",
                  "AS",
                  "AT",
                  "AU",
                  "AW",
                  "AX",
                  "AZ",
                  "BA",
                  "BB",
                  "BD",
                  "BE",
                  "BF",
                  "BG",
                  "BH",
                  "BI",
                  "BJ",
                  "BL",
                  "BM",
                  "BN",
                  "BO",
                  "BQ",
                  "BR",
                  "BS",
                  "BT",
                  "BV",
                  "BW",
                  "BY",
                  "BZ",
                  "CA",
                  "CC",
                  "CD",
                  "CF",
                  "CG",
                  "CH",
                  "CI",
                  "CK",
                  "CL",
                  "CM",
                  "CN",
                  "CO",
                  "CR",
                  "CU",
                  "CV",
                  "CW",
                  "CX",
                  "CY",
                  "CZ",
                  "DE",
                  "DJ",
                  "DK",
                  "DM",
                  "DO",
                  "DZ",
                  "EC",
                  "EE",
                  "EG",
                  "EH",
                  "ER",
                  "ES",
                  "ET",
                  "FI",
                  "FJ",
                  "FK",
                  "FM",
                  "FO",
                  "FR",
                  "GA",
                  "GB",
                  "GD",
                  "GE",
                  "GF",
                  "GG",
                  "GH",
                  "GI",
                  "GL",
                  "GM",
                  "GN",
                  "GP",
                  "GQ",
                  "GR",
                  "GS",
                  "GT",
                  "GU",
                  "GW",
                  "GY",
                  "HK",
                  "HM",
                  "HN",
                  "HR",
                  "HT",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IM",
                  "IN",
                  "IO",
                  "IQ",
                  "IR",
                  "IS",
                  "IT",
                  "JE",
                  "JM",
                  "JO",
                  "JP",
                  "KE",
                  "KG",
                  "KH",
                  "KI",
                  "KM",
                  "KN",
                  "KP",
                  "KR",
                  "KW",
                  "KY",
                  "KZ",
                  "LA",
                  "LB",
                  "LC",
                  "LI",
                  "LK",
                  "LR",
                  "LS",
                  "LT",
                  "LU",
                  "LV",
                  "LY",
                  "MA",
                  "MC",
                  "MD",
                  "ME",
                  "MF",
                  "MG",
                  "MH",
                  "MK",
                  "ML",
                  "MM",
                  "MN",
                  "MO",
                  "MP",
                  "MQ",
                  "MR",
                  "MS",
                  "MT",
                  "MU",
                  "MV",
                  "MW",
                  "MX",
                  "MY",
                  "MZ",
                  "NA",
                  "NC",
                  "NE",
                  "NF",
                  "NG",
                  "NI",
                  "NL",
                  "NO",
                  "NP",
                  "NR",
                  "NU",
                  "NZ",
                  "OM",
                  "PA",
                  "PE",
                  "PF",
                  "PG",
                  "PH",
                  "PK",
                  "PL",
                  "PM",
                  "PN",
                  "PR",
                  "PS",
                  "PT",
                  "PW",
                  "PY",
                  "QA",
                  "RE",
                  "RO",
                  "RS",
                  "RU",
                  "RW",
                  "SA",
                  "SB",
                  "SC",
                  "SD",
                  "SE",
                  "SG",
                  "SH",
                  "SI",
                  "SJ",
                  "SK",
                  "SL",
                  "SM",
                  "SN",
                  "SO",
                  "SR",
                  "SS",
                  "ST",
                  "SV",
                  "SX",
                  "SY",
                  "SZ",
                  "TC",
                  "TD",
                  "TF",
                  "TG",
                  "TH",
                  "TJ",
                  "TK",
                  "TL",
                  "TM",
                  "TN",
                  "TO",
                  "TR",
                  "TT",
                  "TV",
                  "TW",
                  "TZ",
                  "UA",
                  "UG",
                  "UM",
                  "US",
                  "UY",
                  "UZ",
                  "VA",
                  "VC",
                  "VE",
                  "VG",
                  "VI",
                  "VN",
                  "VU",
                  "WF",
                  "WS",
                  "YE",
                  "YT",
                  "ZA",
                  "ZM",
                  "ZW"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Two-letter country code (ISO 3166-1 alpha-2)."
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id",
            "description": "ID of the transactions account."
          },
          "payout_account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payout Account Id",
            "description": "ID of the payout account."
          },
          "capabilities": {
            "$ref": "#/components/schemas/OrganizationCapabilities",
            "description": "Capabilities currently granted to the organization."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "slug",
          "avatar_url",
          "proration_behavior",
          "allow_customer_updates",
          "email",
          "website",
          "socials",
          "status",
          "details_submitted_at",
          "onboarding_resubmission_requested_at",
          "sso_enforced",
          "default_presentment_currency",
          "default_tax_behavior",
          "feature_settings",
          "subscription_settings",
          "customer_email_settings",
          "customer_portal_settings",
          "dispute_settings",
          "embed_hosts",
          "account_id",
          "payout_account_id",
          "capabilities"
        ],
        "title": "Organization"
      },
      "OrganizationAvatarFileCreate": {
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "mime_type": {
            "type": "string",
            "pattern": "^image\\/(jpeg|png|gif|webp|svg\\+xml)$",
            "title": "Mime Type",
            "description": "MIME type of the file. Only images are supported for this type of file."
          },
          "size": {
            "type": "integer",
            "maximum": 1048576.0,
            "title": "Size",
            "description": "Size of the file. A maximum of 1 MB is allowed for this type of file."
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "upload": {
            "$ref": "#/components/schemas/S3FileCreateMultipart"
          },
          "service": {
            "type": "string",
            "const": "organization_avatar",
            "title": "Service"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "type": "object",
        "required": [
          "name",
          "mime_type",
          "size",
          "upload",
          "service"
        ],
        "title": "OrganizationAvatarFileCreate",
        "description": "Schema to create a file to be used as an organization avatar."
      },
      "OrganizationAvatarFileRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "storage_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Version"
          },
          "checksum_etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Etag"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "checksum_sha256_hex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Hex"
          },
          "last_modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified At"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "service": {
            "type": "string",
            "const": "organization_avatar",
            "title": "Service"
          },
          "is_uploaded": {
            "type": "boolean",
            "title": "Is Uploaded"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "size_readable": {
            "type": "string",
            "title": "Size Readable",
            "readOnly": true
          },
          "public_url": {
            "type": "string",
            "title": "Public Url",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "name",
          "path",
          "mime_type",
          "size",
          "storage_version",
          "checksum_etag",
          "checksum_sha256_base64",
          "checksum_sha256_hex",
          "last_modified_at",
          "version",
          "service",
          "is_uploaded",
          "created_at",
          "size_readable",
          "public_url"
        ],
        "title": "OrganizationAvatarFileRead",
        "description": "File to be used as an organization avatar."
      },
      "OrganizationCapabilities": {
        "properties": {
          "checkout_payments": {
            "type": "boolean",
            "title": "Checkout Payments",
            "description": "Whether the organization can accept new checkout payments."
          },
          "subscription_renewals": {
            "type": "boolean",
            "title": "Subscription Renewals",
            "description": "Whether the organization can process subscription renewals."
          },
          "payouts": {
            "type": "boolean",
            "title": "Payouts",
            "description": "Whether the organization can withdraw its balance."
          },
          "refunds": {
            "type": "boolean",
            "title": "Refunds",
            "description": "Whether the organization can issue refunds."
          },
          "api_access": {
            "type": "boolean",
            "title": "Api Access",
            "description": "Whether the organization can access the API."
          },
          "dashboard_access": {
            "type": "boolean",
            "title": "Dashboard Access",
            "description": "Whether the organization can access the dashboard."
          }
        },
        "type": "object",
        "required": [
          "checkout_payments",
          "subscription_renewals",
          "payouts",
          "refunds",
          "api_access",
          "dashboard_access"
        ],
        "title": "OrganizationCapabilities"
      },
      "OrganizationCompanyLegalEntitySchema": {
        "properties": {
          "type": {
            "type": "string",
            "const": "company",
            "title": "Type"
          },
          "registered_name": {
            "type": "string",
            "title": "Registered Name"
          }
        },
        "type": "object",
        "required": [
          "type",
          "registered_name"
        ],
        "title": "OrganizationCompanyLegalEntitySchema"
      },
      "OrganizationCreate": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 3,
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "maxLength": 64,
            "minLength": 3,
            "title": "Slug"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "legal_entity": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/OrganizationIndividualLegalEntitySchema"
                  },
                  {
                    "$ref": "#/components/schemas/OrganizationCompanyLegalEntitySchema"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "company": "#/components/schemas/OrganizationCompanyLegalEntitySchema",
                    "individual": "#/components/schemas/OrganizationIndividualLegalEntitySchema"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Entity"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Public support email."
          },
          "website": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website",
            "description": "Official website of the organization."
          },
          "socials": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/OrganizationSocialLink"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Socials",
            "description": "Link to social profiles."
          },
          "details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "Additional, private, business details Polar needs about active organizations for compliance (KYC)."
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "AD",
                  "AE",
                  "AF",
                  "AG",
                  "AI",
                  "AL",
                  "AM",
                  "AO",
                  "AQ",
                  "AR",
                  "AS",
                  "AT",
                  "AU",
                  "AW",
                  "AX",
                  "AZ",
                  "BA",
                  "BB",
                  "BD",
                  "BE",
                  "BF",
                  "BG",
                  "BH",
                  "BI",
                  "BJ",
                  "BL",
                  "BM",
                  "BN",
                  "BO",
                  "BQ",
                  "BR",
                  "BS",
                  "BT",
                  "BV",
                  "BW",
                  "BY",
                  "BZ",
                  "CA",
                  "CC",
                  "CD",
                  "CF",
                  "CG",
                  "CH",
                  "CI",
                  "CK",
                  "CL",
                  "CM",
                  "CN",
                  "CO",
                  "CR",
                  "CV",
                  "CW",
                  "CX",
                  "CY",
                  "CZ",
                  "DE",
                  "DJ",
                  "DK",
                  "DM",
                  "DO",
                  "DZ",
                  "EC",
                  "EE",
                  "EG",
                  "EH",
                  "ER",
                  "ES",
                  "ET",
                  "FI",
                  "FJ",
                  "FK",
                  "FM",
                  "FO",
                  "FR",
                  "GA",
                  "GB",
                  "GD",
                  "GE",
                  "GF",
                  "GG",
                  "GH",
                  "GI",
                  "GL",
                  "GM",
                  "GN",
                  "GP",
                  "GQ",
                  "GR",
                  "GS",
                  "GT",
                  "GU",
                  "GW",
                  "GY",
                  "HK",
                  "HM",
                  "HN",
                  "HR",
                  "HT",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IM",
                  "IN",
                  "IO",
                  "IQ",
                  "IS",
                  "IT",
                  "JE",
                  "JM",
                  "JO",
                  "JP",
                  "KE",
                  "KG",
                  "KH",
                  "KI",
                  "KM",
                  "KN",
                  "KR",
                  "KW",
                  "KY",
                  "KZ",
                  "LA",
                  "LB",
                  "LC",
                  "LI",
                  "LK",
                  "LR",
                  "LS",
                  "LT",
                  "LU",
                  "LV",
                  "LY",
                  "MA",
                  "MC",
                  "MD",
                  "ME",
                  "MF",
                  "MG",
                  "MH",
                  "MK",
                  "ML",
                  "MM",
                  "MN",
                  "MO",
                  "MP",
                  "MQ",
                  "MR",
                  "MS",
                  "MT",
                  "MU",
                  "MV",
                  "MW",
                  "MX",
                  "MY",
                  "MZ",
                  "NA",
                  "NC",
                  "NE",
                  "NF",
                  "NG",
                  "NI",
                  "NL",
                  "NO",
                  "NP",
                  "NR",
                  "NU",
                  "NZ",
                  "OM",
                  "PA",
                  "PE",
                  "PF",
                  "PG",
                  "PH",
                  "PK",
                  "PL",
                  "PM",
                  "PN",
                  "PR",
                  "PS",
                  "PT",
                  "PW",
                  "PY",
                  "QA",
                  "RE",
                  "RO",
                  "RS",
                  "RW",
                  "SA",
                  "SB",
                  "SC",
                  "SD",
                  "SE",
                  "SG",
                  "SH",
                  "SI",
                  "SJ",
                  "SK",
                  "SL",
                  "SM",
                  "SN",
                  "SO",
                  "SR",
                  "SS",
                  "ST",
                  "SV",
                  "SX",
                  "SZ",
                  "TC",
                  "TD",
                  "TF",
                  "TG",
                  "TH",
                  "TJ",
                  "TK",
                  "TL",
                  "TM",
                  "TN",
                  "TO",
                  "TR",
                  "TT",
                  "TV",
                  "TW",
                  "TZ",
                  "UA",
                  "UG",
                  "UM",
                  "US",
                  "UY",
                  "UZ",
                  "VA",
                  "VC",
                  "VE",
                  "VG",
                  "VI",
                  "VN",
                  "VU",
                  "WF",
                  "WS",
                  "YE",
                  "YT",
                  "ZA",
                  "ZM",
                  "ZW"
                ],
                "title": "CountryAlpha2Input",
                "x-speakeasy-enums": [
                  "AD",
                  "AE",
                  "AF",
                  "AG",
                  "AI",
                  "AL",
                  "AM",
                  "AO",
                  "AQ",
                  "AR",
                  "AS",
                  "AT",
                  "AU",
                  "AW",
                  "AX",
                  "AZ",
                  "BA",
                  "BB",
                  "BD",
                  "BE",
                  "BF",
                  "BG",
                  "BH",
                  "BI",
                  "BJ",
                  "BL",
                  "BM",
                  "BN",
                  "BO",
                  "BQ",
                  "BR",
                  "BS",
                  "BT",
                  "BV",
                  "BW",
                  "BY",
                  "BZ",
                  "CA",
                  "CC",
                  "CD",
                  "CF",
                  "CG",
                  "CH",
                  "CI",
                  "CK",
                  "CL",
                  "CM",
                  "CN",
                  "CO",
                  "CR",
                  "CV",
                  "CW",
                  "CX",
                  "CY",
                  "CZ",
                  "DE",
                  "DJ",
                  "DK",
                  "DM",
                  "DO",
                  "DZ",
                  "EC",
                  "EE",
                  "EG",
                  "EH",
                  "ER",
                  "ES",
                  "ET",
                  "FI",
                  "FJ",
                  "FK",
                  "FM",
                  "FO",
                  "FR",
                  "GA",
                  "GB",
                  "GD",
                  "GE",
                  "GF",
                  "GG",
                  "GH",
                  "GI",
                  "GL",
                  "GM",
                  "GN",
                  "GP",
                  "GQ",
                  "GR",
                  "GS",
                  "GT",
                  "GU",
                  "GW",
                  "GY",
                  "HK",
                  "HM",
                  "HN",
                  "HR",
                  "HT",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IM",
                  "IN",
                  "IO",
                  "IQ",
                  "IS",
                  "IT",
                  "JE",
                  "JM",
                  "JO",
                  "JP",
                  "KE",
                  "KG",
                  "KH",
                  "KI",
                  "KM",
                  "KN",
                  "KR",
                  "KW",
                  "KY",
                  "KZ",
                  "LA",
                  "LB",
                  "LC",
                  "LI",
                  "LK",
                  "LR",
                  "LS",
                  "LT",
                  "LU",
                  "LV",
                  "LY",
                  "MA",
                  "MC",
                  "MD",
                  "ME",
                  "MF",
                  "MG",
                  "MH",
                  "MK",
                  "ML",
                  "MM",
                  "MN",
                  "MO",
                  "MP",
                  "MQ",
                  "MR",
                  "MS",
                  "MT",
                  "MU",
                  "MV",
                  "MW",
                  "MX",
                  "MY",
                  "MZ",
                  "NA",
                  "NC",
                  "NE",
                  "NF",
                  "NG",
                  "NI",
                  "NL",
                  "NO",
                  "NP",
                  "NR",
                  "NU",
                  "NZ",
                  "OM",
                  "PA",
                  "PE",
                  "PF",
                  "PG",
                  "PH",
                  "PK",
                  "PL",
                  "PM",
                  "PN",
                  "PR",
                  "PS",
                  "PT",
                  "PW",
                  "PY",
                  "QA",
                  "RE",
                  "RO",
                  "RS",
                  "RW",
                  "SA",
                  "SB",
                  "SC",
                  "SD",
                  "SE",
                  "SG",
                  "SH",
                  "SI",
                  "SJ",
                  "SK",
                  "SL",
                  "SM",
                  "SN",
                  "SO",
                  "SR",
                  "SS",
                  "ST",
                  "SV",
                  "SX",
                  "SZ",
                  "TC",
                  "TD",
                  "TF",
                  "TG",
                  "TH",
                  "TJ",
                  "TK",
                  "TL",
                  "TM",
                  "TN",
                  "TO",
                  "TR",
                  "TT",
                  "TV",
                  "TW",
                  "TZ",
                  "UA",
                  "UG",
                  "UM",
                  "US",
                  "UY",
                  "UZ",
                  "VA",
                  "VC",
                  "VE",
                  "VG",
                  "VI",
                  "VN",
                  "VU",
                  "WF",
                  "WS",
                  "YE",
                  "YT",
                  "ZA",
                  "ZM",
                  "ZW"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Two-letter country code (ISO 3166-1 alpha-2)."
          },
          "feature_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationFeatureSettingsUpdate"
              },
              {
                "type": "null"
              }
            ]
          },
          "subscription_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationSubscriptionSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_email_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationCustomerEmailSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_portal_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationCustomerPortalSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_presentment_currency": {
            "$ref": "#/components/schemas/PresentmentCurrency",
            "description": "Default presentment currency for the organization",
            "default": "usd"
          },
          "default_tax_behavior": {
            "$ref": "#/components/schemas/TaxBehaviorOption",
            "description": "Default tax behavior applied on products.",
            "default": "location"
          }
        },
        "type": "object",
        "required": [
          "name",
          "slug"
        ],
        "title": "OrganizationCreate"
      },
      "OrganizationCustomerEmailSettings": {
        "properties": {
          "order_confirmation": {
            "type": "boolean",
            "title": "Order Confirmation"
          },
          "payment_method_expiration_reminder": {
            "type": "boolean",
            "title": "Payment Method Expiration Reminder"
          },
          "subscription_cancellation": {
            "type": "boolean",
            "title": "Subscription Cancellation"
          },
          "subscription_confirmation": {
            "type": "boolean",
            "title": "Subscription Confirmation"
          },
          "subscription_cycled": {
            "type": "boolean",
            "title": "Subscription Cycled"
          },
          "subscription_cycled_after_trial": {
            "type": "boolean",
            "title": "Subscription Cycled After Trial"
          },
          "subscription_past_due": {
            "type": "boolean",
            "title": "Subscription Past Due"
          },
          "subscription_paused": {
            "type": "boolean",
            "title": "Subscription Paused"
          },
          "subscription_resumed": {
            "type": "boolean",
            "title": "Subscription Resumed"
          },
          "subscription_renewal_reminder": {
            "type": "boolean",
            "title": "Subscription Renewal Reminder"
          },
          "subscription_revoked": {
            "type": "boolean",
            "title": "Subscription Revoked"
          },
          "subscription_trial_conversion_reminder": {
            "type": "boolean",
            "title": "Subscription Trial Conversion Reminder"
          },
          "subscription_uncanceled": {
            "type": "boolean",
            "title": "Subscription Uncanceled"
          },
          "subscription_updated": {
            "type": "boolean",
            "title": "Subscription Updated"
          }
        },
        "type": "object",
        "required": [
          "order_confirmation",
          "payment_method_expiration_reminder",
          "subscription_cancellation",
          "subscription_confirmation",
          "subscription_cycled",
          "subscription_cycled_after_trial",
          "subscription_past_due",
          "subscription_paused",
          "subscription_resumed",
          "subscription_renewal_reminder",
          "subscription_revoked",
          "subscription_trial_conversion_reminder",
          "subscription_uncanceled",
          "subscription_updated"
        ],
        "title": "OrganizationCustomerEmailSettings"
      },
      "OrganizationCustomerPortalSettings": {
        "properties": {
          "usage": {
            "$ref": "#/components/schemas/CustomerPortalUsageSettings"
          },
          "subscription": {
            "$ref": "#/components/schemas/CustomerPortalSubscriptionSettings"
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerPortalCustomerSettings"
          }
        },
        "type": "object",
        "required": [
          "usage",
          "subscription"
        ],
        "title": "OrganizationCustomerPortalSettings"
      },
      "OrganizationDetails": {
        "properties": {
          "about": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "About",
            "description": "Brief information about you and your business.",
            "deprecated": true
          },
          "product_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Description",
            "description": "Description of digital products being sold."
          },
          "selling_categories": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Selling Categories",
            "description": "Categories of products being sold."
          },
          "pricing_models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Pricing Models",
            "description": "Pricing models used by the organization."
          },
          "intended_use": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intended Use",
            "description": "How the organization will integrate and use Polar.",
            "deprecated": true
          },
          "customer_acquisition": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Customer Acquisition",
            "description": "Main customer acquisition channels.",
            "deprecated": true
          },
          "future_annual_revenue": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Future Annual Revenue",
            "description": "Estimated revenue in the next 12 months",
            "deprecated": true
          },
          "switching": {
            "type": "boolean",
            "title": "Switching",
            "description": "Switching from another platform?",
            "default": false
          },
          "switching_from": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "paddle",
                  "lemon_squeezy",
                  "gumroad",
                  "stripe",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Switching From",
            "description": "Which platform the organization is migrating from."
          },
          "previous_annual_revenue": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Annual Revenue",
            "description": "Revenue from last year if applicable.",
            "deprecated": true
          }
        },
        "type": "object",
        "title": "OrganizationDetails"
      },
      "OrganizationDisputeSettings": {
        "properties": {
          "auto_accept_below_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Accept Below Amount"
          }
        },
        "type": "object",
        "required": [
          "auto_accept_below_amount"
        ],
        "title": "OrganizationDisputeSettings",
        "description": "`auto_accept_below_amount` is in Polar's settlement currency (USD)."
      },
      "OrganizationDisputeSettingsUpdate": {
        "properties": {
          "auto_accept_below_amount": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Accept Below Amount",
            "description": "Concede disputes below this amount, in USD cents, without asking the organization. A dispute charged in another currency converts at the rate its payment settled at. `null` turns it off. The disputed amount and the processor's dispute fee are still deducted."
          }
        },
        "type": "object",
        "title": "OrganizationDisputeSettingsUpdate"
      },
      "OrganizationFeatureSettings": {
        "properties": {
          "issue_funding_enabled": {
            "type": "boolean",
            "title": "Issue Funding Enabled",
            "description": "If this organization has issue funding enabled",
            "default": false
          },
          "wallets_enabled": {
            "type": "boolean",
            "title": "Wallets Enabled",
            "description": "If this organization has Wallets enabled",
            "default": false
          },
          "member_model_enabled": {
            "type": "boolean",
            "title": "Member Model Enabled",
            "description": "If this organization has the Member model enabled",
            "default": false
          },
          "checkout_localization_enabled": {
            "type": "boolean",
            "title": "Checkout Localization Enabled",
            "description": "If this organization has checkout localization enabled",
            "default": false
          },
          "overview_metrics": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overview Metrics",
            "description": "Ordered list of metric slugs shown on the dashboard overview."
          },
          "reset_proration_behavior_enabled": {
            "type": "boolean",
            "title": "Reset Proration Behavior Enabled",
            "description": "If this organization has access to reset proration behavior.",
            "default": false
          },
          "off_session_charges_enabled": {
            "type": "boolean",
            "title": "Off Session Charges Enabled",
            "description": "If this organization can create and finalize draft orders via the API (off-session charges against a saved payment method).",
            "default": false
          },
          "meter_cycling_enabled": {
            "type": "boolean",
            "title": "Meter Cycling Enabled",
            "description": "If this organization can set a separate meter cycle on recurring products (a meter interval independent of the billing interval).",
            "default": false
          },
          "slack_benefit_enabled": {
            "type": "boolean",
            "title": "Slack Benefit Enabled",
            "description": "Enables the slack shared channel benefit",
            "default": false
          },
          "preview_access_enabled": {
            "type": "boolean",
            "title": "Preview Access Enabled",
            "description": "If this organization has preview access to new features enabled",
            "default": false
          },
          "disputes_enabled": {
            "type": "boolean",
            "title": "Disputes Enabled",
            "description": "If this organization has the disputes dashboard enabled",
            "default": false
          },
          "sso_enabled": {
            "type": "boolean",
            "title": "Sso Enabled",
            "description": "If this organization has single sign-on configuration enabled",
            "default": false
          },
          "dispute_auto_accept_enabled": {
            "type": "boolean",
            "title": "Dispute Auto Accept Enabled",
            "description": "If this organization can set a threshold below which Polar concedes disputes on its behalf. Requires `disputes_enabled`.",
            "default": false
          },
          "compass_enabled": {
            "type": "boolean",
            "title": "Compass Enabled",
            "description": "If this organization has the split product navigation (Billing / Compass / Customers) enabled in the dashboard",
            "default": false
          },
          "merchant_migration_enabled": {
            "type": "boolean",
            "title": "Merchant Migration Enabled",
            "description": "If this organization can migrate its billing from another provider (e.g. Stripe) to Polar.",
            "default": false
          }
        },
        "type": "object",
        "title": "OrganizationFeatureSettings"
      },
      "OrganizationFeatureSettingsUpdate": {
        "properties": {
          "member_model_enabled": {
            "type": "boolean",
            "title": "Member Model Enabled",
            "description": "If this organization has the Member model enabled",
            "default": false
          },
          "checkout_localization_enabled": {
            "type": "boolean",
            "title": "Checkout Localization Enabled",
            "description": "If this organization has checkout localization enabled",
            "default": false
          },
          "overview_metrics": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overview Metrics",
            "description": "Ordered list of metric slugs shown on the dashboard overview."
          }
        },
        "type": "object",
        "title": "OrganizationFeatureSettingsUpdate",
        "description": "Feature settings that organizations can update themselves.\n\nOther feature settings are managed by Polar staff: they're ignored if\nprovided and keep their current value."
      },
      "OrganizationIndividualLegalEntitySchema": {
        "properties": {
          "type": {
            "type": "string",
            "const": "individual",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "OrganizationIndividualLegalEntitySchema"
      },
      "OrganizationNotReadyForPayments": {
        "properties": {
          "error": {
            "type": "string",
            "const": "OrganizationNotReadyForPayments",
            "title": "Error",
            "examples": [
              "OrganizationNotReadyForPayments"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "OrganizationNotReadyForPayments"
      },
      "OrganizationNotificationSettings": {
        "properties": {
          "new_order": {
            "type": "boolean",
            "title": "New Order"
          },
          "new_subscription": {
            "type": "boolean",
            "title": "New Subscription"
          },
          "chargeback_prevention": {
            "type": "boolean",
            "title": "Chargeback Prevention"
          },
          "subscription_renewal": {
            "type": "boolean",
            "title": "Subscription Renewal"
          }
        },
        "type": "object",
        "required": [
          "new_order",
          "new_subscription",
          "chargeback_prevention",
          "subscription_renewal"
        ],
        "title": "OrganizationNotificationSettings"
      },
      "OrganizationSocialLink": {
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/OrganizationSocialPlatforms",
            "description": "The social platform of the URL"
          },
          "url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Url",
            "description": "The URL to the organization profile"
          }
        },
        "type": "object",
        "required": [
          "platform",
          "url"
        ],
        "title": "OrganizationSocialLink"
      },
      "OrganizationSocialPlatforms": {
        "type": "string",
        "enum": [
          "x",
          "github",
          "facebook",
          "instagram",
          "youtube",
          "tiktok",
          "linkedin",
          "threads",
          "discord",
          "other"
        ],
        "title": "OrganizationSocialPlatforms"
      },
      "OrganizationSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "slug",
          "-slug",
          "name",
          "-name",
          "next_review_threshold",
          "-next_review_threshold",
          "days_in_status",
          "-days_in_status"
        ],
        "title": "OrganizationSortProperty"
      },
      "OrganizationStatus": {
        "type": "string",
        "enum": [
          "created",
          "review",
          "snoozed",
          "denied",
          "active",
          "blocked",
          "offboarding",
          "offboarded"
        ],
        "title": "OrganizationStatus"
      },
      "OrganizationSubscriptionSettings": {
        "properties": {
          "allow_multiple_subscriptions": {
            "type": "boolean",
            "title": "Allow Multiple Subscriptions"
          },
          "proration_behavior": {
            "type": "string",
            "enum": [
              "invoice",
              "prorate",
              "next_period"
            ],
            "title": "PublicSubscriptionProrationBehavior"
          },
          "benefit_revocation_grace_period": {
            "type": "integer",
            "title": "Benefit Revocation Grace Period"
          },
          "prevent_trial_abuse": {
            "type": "boolean",
            "title": "Prevent Trial Abuse"
          },
          "allow_customer_updates": {
            "type": "boolean",
            "title": "Allow Customer Updates"
          }
        },
        "type": "object",
        "required": [
          "allow_multiple_subscriptions",
          "proration_behavior",
          "benefit_revocation_grace_period",
          "prevent_trial_abuse",
          "allow_customer_updates"
        ],
        "title": "OrganizationSubscriptionSettings"
      },
      "OrganizationUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Public support email."
          },
          "website": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website",
            "description": "Official website of the organization."
          },
          "socials": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/OrganizationSocialLink"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Socials",
            "description": "Links to social profiles."
          },
          "details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "Additional, private, business details Polar needs about active organizations for compliance (KYC)."
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "AD",
                  "AE",
                  "AF",
                  "AG",
                  "AI",
                  "AL",
                  "AM",
                  "AO",
                  "AQ",
                  "AR",
                  "AS",
                  "AT",
                  "AU",
                  "AW",
                  "AX",
                  "AZ",
                  "BA",
                  "BB",
                  "BD",
                  "BE",
                  "BF",
                  "BG",
                  "BH",
                  "BI",
                  "BJ",
                  "BL",
                  "BM",
                  "BN",
                  "BO",
                  "BQ",
                  "BR",
                  "BS",
                  "BT",
                  "BV",
                  "BW",
                  "BY",
                  "BZ",
                  "CA",
                  "CC",
                  "CD",
                  "CF",
                  "CG",
                  "CH",
                  "CI",
                  "CK",
                  "CL",
                  "CM",
                  "CN",
                  "CO",
                  "CR",
                  "CV",
                  "CW",
                  "CX",
                  "CY",
                  "CZ",
                  "DE",
                  "DJ",
                  "DK",
                  "DM",
                  "DO",
                  "DZ",
                  "EC",
                  "EE",
                  "EG",
                  "EH",
                  "ER",
                  "ES",
                  "ET",
                  "FI",
                  "FJ",
                  "FK",
                  "FM",
                  "FO",
                  "FR",
                  "GA",
                  "GB",
                  "GD",
                  "GE",
                  "GF",
                  "GG",
                  "GH",
                  "GI",
                  "GL",
                  "GM",
                  "GN",
                  "GP",
                  "GQ",
                  "GR",
                  "GS",
                  "GT",
                  "GU",
                  "GW",
                  "GY",
                  "HK",
                  "HM",
                  "HN",
                  "HR",
                  "HT",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IM",
                  "IN",
                  "IO",
                  "IQ",
                  "IS",
                  "IT",
                  "JE",
                  "JM",
                  "JO",
                  "JP",
                  "KE",
                  "KG",
                  "KH",
                  "KI",
                  "KM",
                  "KN",
                  "KR",
                  "KW",
                  "KY",
                  "KZ",
                  "LA",
                  "LB",
                  "LC",
                  "LI",
                  "LK",
                  "LR",
                  "LS",
                  "LT",
                  "LU",
                  "LV",
                  "LY",
                  "MA",
                  "MC",
                  "MD",
                  "ME",
                  "MF",
                  "MG",
                  "MH",
                  "MK",
                  "ML",
                  "MM",
                  "MN",
                  "MO",
                  "MP",
                  "MQ",
                  "MR",
                  "MS",
                  "MT",
                  "MU",
                  "MV",
                  "MW",
                  "MX",
                  "MY",
                  "MZ",
                  "NA",
                  "NC",
                  "NE",
                  "NF",
                  "NG",
                  "NI",
                  "NL",
                  "NO",
                  "NP",
                  "NR",
                  "NU",
                  "NZ",
                  "OM",
                  "PA",
                  "PE",
                  "PF",
                  "PG",
                  "PH",
                  "PK",
                  "PL",
                  "PM",
                  "PN",
                  "PR",
                  "PS",
                  "PT",
                  "PW",
                  "PY",
                  "QA",
                  "RE",
                  "RO",
                  "RS",
                  "RW",
                  "SA",
                  "SB",
                  "SC",
                  "SD",
                  "SE",
                  "SG",
                  "SH",
                  "SI",
                  "SJ",
                  "SK",
                  "SL",
                  "SM",
                  "SN",
                  "SO",
                  "SR",
                  "SS",
                  "ST",
                  "SV",
                  "SX",
                  "SZ",
                  "TC",
                  "TD",
                  "TF",
                  "TG",
                  "TH",
                  "TJ",
                  "TK",
                  "TL",
                  "TM",
                  "TN",
                  "TO",
                  "TR",
                  "TT",
                  "TV",
                  "TW",
                  "TZ",
                  "UA",
                  "UG",
                  "UM",
                  "US",
                  "UY",
                  "UZ",
                  "VA",
                  "VC",
                  "VE",
                  "VG",
                  "VI",
                  "VN",
                  "VU",
                  "WF",
                  "WS",
                  "YE",
                  "YT",
                  "ZA",
                  "ZM",
                  "ZW"
                ],
                "title": "CountryAlpha2Input",
                "x-speakeasy-enums": [
                  "AD",
                  "AE",
                  "AF",
                  "AG",
                  "AI",
                  "AL",
                  "AM",
                  "AO",
                  "AQ",
                  "AR",
                  "AS",
                  "AT",
                  "AU",
                  "AW",
                  "AX",
                  "AZ",
                  "BA",
                  "BB",
                  "BD",
                  "BE",
                  "BF",
                  "BG",
                  "BH",
                  "BI",
                  "BJ",
                  "BL",
                  "BM",
                  "BN",
                  "BO",
                  "BQ",
                  "BR",
                  "BS",
                  "BT",
                  "BV",
                  "BW",
                  "BY",
                  "BZ",
                  "CA",
                  "CC",
                  "CD",
                  "CF",
                  "CG",
                  "CH",
                  "CI",
                  "CK",
                  "CL",
                  "CM",
                  "CN",
                  "CO",
                  "CR",
                  "CV",
                  "CW",
                  "CX",
                  "CY",
                  "CZ",
                  "DE",
                  "DJ",
                  "DK",
                  "DM",
                  "DO",
                  "DZ",
                  "EC",
                  "EE",
                  "EG",
                  "EH",
                  "ER",
                  "ES",
                  "ET",
                  "FI",
                  "FJ",
                  "FK",
                  "FM",
                  "FO",
                  "FR",
                  "GA",
                  "GB",
                  "GD",
                  "GE",
                  "GF",
                  "GG",
                  "GH",
                  "GI",
                  "GL",
                  "GM",
                  "GN",
                  "GP",
                  "GQ",
                  "GR",
                  "GS",
                  "GT",
                  "GU",
                  "GW",
                  "GY",
                  "HK",
                  "HM",
                  "HN",
                  "HR",
                  "HT",
                  "HU",
                  "ID",
                  "IE",
                  "IL",
                  "IM",
                  "IN",
                  "IO",
                  "IQ",
                  "IS",
                  "IT",
                  "JE",
                  "JM",
                  "JO",
                  "JP",
                  "KE",
                  "KG",
                  "KH",
                  "KI",
                  "KM",
                  "KN",
                  "KR",
                  "KW",
                  "KY",
                  "KZ",
                  "LA",
                  "LB",
                  "LC",
                  "LI",
                  "LK",
                  "LR",
                  "LS",
                  "LT",
                  "LU",
                  "LV",
                  "LY",
                  "MA",
                  "MC",
                  "MD",
                  "ME",
                  "MF",
                  "MG",
                  "MH",
                  "MK",
                  "ML",
                  "MM",
                  "MN",
                  "MO",
                  "MP",
                  "MQ",
                  "MR",
                  "MS",
                  "MT",
                  "MU",
                  "MV",
                  "MW",
                  "MX",
                  "MY",
                  "MZ",
                  "NA",
                  "NC",
                  "NE",
                  "NF",
                  "NG",
                  "NI",
                  "NL",
                  "NO",
                  "NP",
                  "NR",
                  "NU",
                  "NZ",
                  "OM",
                  "PA",
                  "PE",
                  "PF",
                  "PG",
                  "PH",
                  "PK",
                  "PL",
                  "PM",
                  "PN",
                  "PR",
                  "PS",
                  "PT",
                  "PW",
                  "PY",
                  "QA",
                  "RE",
                  "RO",
                  "RS",
                  "RW",
                  "SA",
                  "SB",
                  "SC",
                  "SD",
                  "SE",
                  "SG",
                  "SH",
                  "SI",
                  "SJ",
                  "SK",
                  "SL",
                  "SM",
                  "SN",
                  "SO",
                  "SR",
                  "SS",
                  "ST",
                  "SV",
                  "SX",
                  "SZ",
                  "TC",
                  "TD",
                  "TF",
                  "TG",
                  "TH",
                  "TJ",
                  "TK",
                  "TL",
                  "TM",
                  "TN",
                  "TO",
                  "TR",
                  "TT",
                  "TV",
                  "TW",
                  "TZ",
                  "UA",
                  "UG",
                  "UM",
                  "US",
                  "UY",
                  "UZ",
                  "VA",
                  "VC",
                  "VE",
                  "VG",
                  "VI",
                  "VN",
                  "VU",
                  "WF",
                  "WS",
                  "YE",
                  "YT",
                  "ZA",
                  "ZM",
                  "ZW"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Two-letter country code (ISO 3166-1 alpha-2)."
          },
          "feature_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationFeatureSettingsUpdate"
              },
              {
                "type": "null"
              }
            ]
          },
          "subscription_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationSubscriptionSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_email_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationCustomerEmailSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_portal_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationCustomerPortalSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "dispute_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationDisputeSettingsUpdate"
              },
              {
                "type": "null"
              }
            ]
          },
          "embed_hosts": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "description": "Hosts allowed to embed this organization's checkout. An entry is a host and an optional port, without a scheme: HTTPS is always allowed, and HTTP too for local hosts \u2014 `localhost`, any `.localhost` or `.local` name, and loopback or private addresses. `*.example.com` matches any subdomain, but not `example.com` itself. An app origin such as `chrome-extension://abcdef` carries its scheme, having no host to match on.",
                "examples": [
                  [
                    "example.com",
                    "*.example.com",
                    "localhost:3000"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Hosts"
          },
          "default_presentment_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PresentmentCurrency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Default presentment currency for the organization"
          },
          "default_tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "Default tax behavior applied on products."
          },
          "sso_enforced": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Enforced",
            "description": "Whether members must access this organization through its SSO connection. Turning this on requires an active SSO session for this organization and at least one enabled SSO connection."
          }
        },
        "type": "object",
        "title": "OrganizationUpdate"
      },
      "Pagination": {
        "properties": {
          "total_count": {
            "type": "integer",
            "title": "Total Count"
          },
          "max_page": {
            "type": "integer",
            "title": "Max Page"
          }
        },
        "type": "object",
        "required": [
          "total_count",
          "max_page"
        ],
        "title": "Pagination"
      },
      "PauseResumeNotAllowed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PauseResumeNotAllowed",
            "title": "Error",
            "examples": [
              "PauseResumeNotAllowed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PauseResumeNotAllowed"
      },
      "Payment": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CardPayment"
          },
          {
            "$ref": "#/components/schemas/KrCardPayment"
          },
          {
            "$ref": "#/components/schemas/GenericPayment"
          }
        ]
      },
      "PaymentActionRequired": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentActionRequired",
            "title": "Error",
            "examples": [
              "PaymentActionRequired"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentActionRequired"
      },
      "PaymentAlreadyInProgress": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentAlreadyInProgress",
            "title": "Error",
            "examples": [
              "PaymentAlreadyInProgress"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentAlreadyInProgress"
      },
      "PaymentError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentError",
            "title": "Error",
            "examples": [
              "PaymentError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentError"
      },
      "PaymentFailed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentFailed",
            "title": "Error",
            "examples": [
              "PaymentFailed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentFailed"
      },
      "PaymentMethod": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CustomerPaymentMethodCard"
          },
          {
            "$ref": "#/components/schemas/CustomerPaymentMethodKrCard"
          },
          {
            "$ref": "#/components/schemas/CustomerPaymentMethodGeneric"
          }
        ]
      },
      "PaymentMethodCard": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "type": {
            "type": "string",
            "const": "card",
            "title": "Type"
          },
          "method_metadata": {
            "$ref": "#/components/schemas/PaymentMethodCardMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "processor",
          "customer_id",
          "type",
          "method_metadata"
        ],
        "title": "PaymentMethodCard"
      },
      "PaymentMethodCardMetadata": {
        "properties": {
          "brand": {
            "type": "string",
            "title": "Brand"
          },
          "last4": {
            "type": "string",
            "title": "Last4"
          },
          "exp_month": {
            "type": "integer",
            "title": "Exp Month"
          },
          "exp_year": {
            "type": "integer",
            "title": "Exp Year"
          },
          "wallet": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wallet"
          }
        },
        "type": "object",
        "required": [
          "brand",
          "last4",
          "exp_month",
          "exp_year"
        ],
        "title": "PaymentMethodCardMetadata"
      },
      "PaymentMethodGeneric": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "processor",
          "customer_id",
          "type"
        ],
        "title": "PaymentMethodGeneric"
      },
      "PaymentMethodInUseByActiveSubscription": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentMethodInUseByActiveSubscription",
            "title": "Error",
            "examples": [
              "PaymentMethodInUseByActiveSubscription"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentMethodInUseByActiveSubscription"
      },
      "PaymentMethodKrCard": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "processor": {
            "$ref": "#/components/schemas/PaymentProcessor"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "type": {
            "type": "string",
            "const": "kr_card",
            "title": "Type"
          },
          "method_metadata": {
            "$ref": "#/components/schemas/PaymentMethodKrCardMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "processor",
          "customer_id",
          "type",
          "method_metadata"
        ],
        "title": "PaymentMethodKrCard"
      },
      "PaymentMethodKrCardMetadata": {
        "properties": {
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand"
          },
          "last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last4"
          }
        },
        "type": "object",
        "required": [
          "brand",
          "last4"
        ],
        "title": "PaymentMethodKrCardMetadata"
      },
      "PaymentMethodRequired": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentMethodRequired",
            "title": "Error",
            "examples": [
              "PaymentMethodRequired"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentMethodRequired"
      },
      "PaymentMethodSetupFailed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentMethodSetupFailed",
            "title": "Error",
            "examples": [
              "PaymentMethodSetupFailed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentMethodSetupFailed"
      },
      "PaymentNotReady": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentNotReady",
            "title": "Error",
            "examples": [
              "PaymentNotReady"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentNotReady"
      },
      "PaymentProcessor": {
        "type": "string",
        "enum": [
          "stripe"
        ],
        "title": "PaymentProcessor"
      },
      "PaymentSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "status",
          "-status",
          "amount",
          "-amount",
          "method",
          "-method"
        ],
        "title": "PaymentSortProperty"
      },
      "PaymentStatus": {
        "type": "string",
        "enum": [
          "pending",
          "succeeded",
          "failed"
        ],
        "title": "PaymentStatus"
      },
      "PaymentTrigger": {
        "type": "string",
        "enum": [
          "purchase",
          "subscription_cycle",
          "retry_dunning",
          "retry_customer",
          "retry_payment_method_update",
          "retry_admin"
        ],
        "title": "PaymentTrigger"
      },
      "PendingSubscriptionUpdate": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "applies_at": {
            "type": "string",
            "format": "date-time",
            "title": "Applies At",
            "description": "The date and time when the subscription update will be applied.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID of the new product to apply to the subscription. If `null`, the product won't be changed."
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "Number of seats to apply to the subscription. If `null`, the number of seats won't be changed."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "Number of units to apply to the subscription. If `null`, the number of units won't be changed."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "applies_at",
          "product_id",
          "seats",
          "units"
        ],
        "title": "PendingSubscriptionUpdate",
        "description": "Pending update to be applied to a subscription at the beginning of the next period."
      },
      "PortalAuthenticatedUser": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "description": "Type of authenticated user: 'customer' or 'member'"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "User's name, if available."
          },
          "email": {
            "type": "string",
            "title": "Email",
            "description": "User's email address."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "Associated customer ID."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "Member ID. Only set for members."
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role",
            "description": "Member role (owner, billing_manager, member). Only set for members."
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "email",
          "customer_id"
        ],
        "title": "PortalAuthenticatedUser",
        "description": "Information about the authenticated portal user."
      },
      "PresentmentCurrency": {
        "type": "string",
        "enum": [
          "aed",
          "all",
          "amd",
          "aoa",
          "ars",
          "aud",
          "awg",
          "azn",
          "bam",
          "bbd",
          "bdt",
          "bif",
          "bmd",
          "bnd",
          "bob",
          "brl",
          "bsd",
          "bwp",
          "bzd",
          "cad",
          "cdf",
          "chf",
          "clp",
          "cny",
          "cop",
          "crc",
          "cve",
          "czk",
          "djf",
          "dkk",
          "dop",
          "dzd",
          "egp",
          "etb",
          "eur",
          "fjd",
          "fkp",
          "gbp",
          "gel",
          "gip",
          "gmd",
          "gnf",
          "gtq",
          "gyd",
          "hkd",
          "hnl",
          "htg",
          "huf",
          "idr",
          "ils",
          "inr",
          "isk",
          "jmd",
          "jpy",
          "kes",
          "kgs",
          "khr",
          "kmf",
          "krw",
          "kyd",
          "kzt",
          "lak",
          "lkr",
          "lrd",
          "lsl",
          "mad",
          "mdl",
          "mga",
          "mkd",
          "mnt",
          "mop",
          "mur",
          "mvr",
          "mwk",
          "mxn",
          "myr",
          "mzn",
          "nad",
          "ngn",
          "nio",
          "nok",
          "npr",
          "nzd",
          "pab",
          "pen",
          "pgk",
          "php",
          "pkr",
          "pln",
          "pyg",
          "qar",
          "ron",
          "rsd",
          "rwf",
          "sar",
          "sbd",
          "scr",
          "sek",
          "sgd",
          "shp",
          "sos",
          "srd",
          "szl",
          "thb",
          "tjs",
          "top",
          "try",
          "ttd",
          "twd",
          "tzs",
          "uah",
          "ugx",
          "usd",
          "uyu",
          "uzs",
          "vnd",
          "vuv",
          "wst",
          "xaf",
          "xcd",
          "xcg",
          "xof",
          "xpf",
          "yer",
          "zar",
          "zmw"
        ],
        "title": "PresentmentCurrency"
      },
      "Product": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products."
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval."
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. None when no meter cycle is set."
          },
          "is_recurring": {
            "type": "boolean",
            "title": "Is Recurring",
            "description": "Whether the product is a subscription."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the product is archived and no longer available."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the product."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "is_deletable": {
            "type": "boolean",
            "title": "Is Deletable",
            "description": "Whether the product can be permanently deleted. Products referenced by an order, subscription, trial or discount cannot be deleted."
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                },
                {
                  "$ref": "#/components/schemas/ProductPrice"
                }
              ]
            },
            "type": "array",
            "title": "Prices",
            "description": "List of prices for this product."
          },
          "benefits": {
            "items": {
              "$ref": "#/components/schemas/Benefit",
              "title": "Benefit"
            },
            "type": "array",
            "title": "Benefits",
            "description": "List of benefits granted by the product."
          },
          "medias": {
            "items": {
              "$ref": "#/components/schemas/ProductMediaFileRead"
            },
            "type": "array",
            "title": "Medias",
            "description": "List of medias associated to the product."
          },
          "attached_custom_fields": {
            "items": {
              "$ref": "#/components/schemas/AttachedCustomField"
            },
            "type": "array",
            "title": "Attached Custom Fields",
            "description": "List of custom fields attached to the product."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "trial_interval",
          "trial_interval_count",
          "name",
          "description",
          "visibility",
          "recurring_interval",
          "recurring_interval_count",
          "meter_interval",
          "meter_interval_count",
          "is_recurring",
          "is_archived",
          "organization_id",
          "metadata",
          "is_deletable",
          "prices",
          "benefits",
          "medias",
          "attached_custom_fields"
        ],
        "title": "Product",
        "description": "A product."
      },
      "ProductBenefitsUpdate": {
        "properties": {
          "benefits": {
            "items": {
              "type": "string",
              "format": "uuid4",
              "description": "The benefit ID."
            },
            "type": "array",
            "title": "Benefits",
            "description": "List of benefit IDs. Each one must be on the same organization as the product."
          }
        },
        "type": "object",
        "required": [
          "benefits"
        ],
        "title": "ProductBenefitsUpdate",
        "description": "Schema to update the benefits granted by a product."
      },
      "ProductBillingType": {
        "type": "string",
        "enum": [
          "one_time",
          "recurring"
        ],
        "title": "ProductBillingType"
      },
      "ProductCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ProductCreateRecurring"
          },
          {
            "$ref": "#/components/schemas/ProductCreateOneTime"
          }
        ]
      },
      "ProductCreateOneTime": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "type": "string",
            "maxLength": 64,
            "minLength": 3,
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product.",
            "default": "public"
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ProductPriceFixedCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceCustomCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceSeatBasedCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceUnitBasedCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceMeteredUnitCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceMeteredTiersCreate"
                }
              ],
              "discriminator": {
                "propertyName": "amount_type",
                "mapping": {
                  "custom": "#/components/schemas/ProductPriceCustomCreate",
                  "fixed": "#/components/schemas/ProductPriceFixedCreate",
                  "metered_tiers": "#/components/schemas/ProductPriceMeteredTiersCreate",
                  "metered_unit": "#/components/schemas/ProductPriceMeteredUnitCreate",
                  "seat_based": "#/components/schemas/ProductPriceSeatBasedCreate",
                  "unit_based": "#/components/schemas/ProductPriceUnitBasedCreate"
                }
              }
            },
            "type": "array",
            "minItems": 1,
            "title": "ProductPriceCreateList",
            "description": "List of available prices for this product. It may combine at most one fixed price with one seat-based price (billed as `fixed + seat_charge`), or contain a single custom or free price, plus any number of metered prices. A free price cannot be combined with other prices, and a custom price cannot be combined with a fixed or seat-based price. Metered prices are not supported on one-time purchase products."
          },
          "medias": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid4"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Medias",
            "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."
          },
          "attached_custom_fields": {
            "items": {
              "$ref": "#/components/schemas/AttachedCustomFieldCreate"
            },
            "type": "array",
            "title": "Attached Custom Fields",
            "description": "List of custom fields to attach."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the product. **Required unless you use an organization token.**"
          },
          "recurring_interval": {
            "type": "null",
            "title": "Recurring Interval",
            "description": "States that the product is a one-time purchase."
          },
          "recurring_interval_count": {
            "type": "null",
            "title": "Recurring Interval Count",
            "description": "One-time products don't have a recurring interval count."
          }
        },
        "type": "object",
        "required": [
          "name",
          "prices"
        ],
        "title": "ProductCreateOneTime"
      },
      "ProductCreateRecurring": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "name": {
            "type": "string",
            "maxLength": 64,
            "minLength": 3,
            "title": "Name",
            "description": "The name of the product."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "visibility": {
            "$ref": "#/components/schemas/ProductVisibility",
            "description": "The visibility of the product.",
            "default": "public"
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ProductPriceFixedCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceCustomCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceSeatBasedCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceUnitBasedCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceMeteredUnitCreate"
                },
                {
                  "$ref": "#/components/schemas/ProductPriceMeteredTiersCreate"
                }
              ],
              "discriminator": {
                "propertyName": "amount_type",
                "mapping": {
                  "custom": "#/components/schemas/ProductPriceCustomCreate",
                  "fixed": "#/components/schemas/ProductPriceFixedCreate",
                  "metered_tiers": "#/components/schemas/ProductPriceMeteredTiersCreate",
                  "metered_unit": "#/components/schemas/ProductPriceMeteredUnitCreate",
                  "seat_based": "#/components/schemas/ProductPriceSeatBasedCreate",
                  "unit_based": "#/components/schemas/ProductPriceUnitBasedCreate"
                }
              }
            },
            "type": "array",
            "minItems": 1,
            "title": "ProductPriceCreateList",
            "description": "List of available prices for this product. It may combine at most one fixed price with one seat-based price (billed as `fixed + seat_charge`), or contain a single custom or free price, plus any number of metered prices. A free price cannot be combined with other prices, and a custom price cannot be combined with a fixed or seat-based price. Metered prices are not supported on one-time purchase products."
          },
          "medias": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid4"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Medias",
            "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."
          },
          "attached_custom_fields": {
            "items": {
              "$ref": "#/components/schemas/AttachedCustomFieldCreate"
            },
            "type": "array",
            "title": "Attached Custom Fields",
            "description": "List of custom fields to attach."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The ID of the organization owning the product. **Required unless you use an organization token.**"
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "recurring_interval": {
            "$ref": "#/components/schemas/RecurringInterval",
            "description": "The recurring interval of the product."
          },
          "recurring_interval_count": {
            "type": "integer",
            "maximum": 999.0,
            "minimum": 1.0,
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.",
            "default": 1
          },
          "meter_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional meter cycle, independent of the billing interval. When set, overage settlement, meter resets and meter-credit grants run on this cadence rather than the billing interval \u2014 e.g. yearly billing with monthly credits. It must evenly divide the billing interval. If `None`, metered concerns follow the billing interval. **Once set, it can't be changed.**"
          },
          "meter_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 999.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Meter Interval Count",
            "description": "Number of meter interval units. Defaults to 1 when `meter_interval` is set. Ignored when `meter_interval` is `None`."
          }
        },
        "type": "object",
        "required": [
          "name",
          "prices",
          "recurring_interval"
        ],
        "title": "ProductCreateRecurring"
      },
      "ProductMediaFileCreate": {
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "mime_type": {
            "type": "string",
            "pattern": "^image\\/(jpeg|png|gif|webp|svg\\+xml)$",
            "title": "Mime Type",
            "description": "MIME type of the file. Only images are supported for this type of file."
          },
          "size": {
            "type": "integer",
            "maximum": 10485760.0,
            "title": "Size",
            "description": "Size of the file. A maximum of 10 MB is allowed for this type of file."
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "upload": {
            "$ref": "#/components/schemas/S3FileCreateMultipart"
          },
          "service": {
            "type": "string",
            "const": "product_media",
            "title": "Service"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "type": "object",
        "required": [
          "name",
          "mime_type",
          "size",
          "upload",
          "service"
        ],
        "title": "ProductMediaFileCreate",
        "description": "Schema to create a file to be used as a product media file."
      },
      "ProductMediaFileRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "storage_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Version"
          },
          "checksum_etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Etag"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "checksum_sha256_hex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Hex"
          },
          "last_modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified At"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "service": {
            "type": "string",
            "const": "product_media",
            "title": "Service"
          },
          "is_uploaded": {
            "type": "boolean",
            "title": "Is Uploaded"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "size_readable": {
            "type": "string",
            "title": "Size Readable",
            "readOnly": true
          },
          "public_url": {
            "type": "string",
            "title": "Public Url",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "name",
          "path",
          "mime_type",
          "size",
          "storage_version",
          "checksum_etag",
          "checksum_sha256_base64",
          "checksum_sha256_hex",
          "last_modified_at",
          "version",
          "service",
          "is_uploaded",
          "created_at",
          "size_readable",
          "public_url"
        ],
        "title": "ProductMediaFileRead",
        "description": "File to be used as a product media file."
      },
      "ProductNotDeletable": {
        "properties": {
          "error": {
            "type": "string",
            "const": "ProductNotDeletable",
            "title": "Error",
            "examples": [
              "ProductNotDeletable"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "ProductNotDeletable"
      },
      "ProductPrice": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ProductPriceFixed"
          },
          {
            "$ref": "#/components/schemas/ProductPriceCustom"
          },
          {
            "$ref": "#/components/schemas/ProductPriceSeatBased"
          },
          {
            "$ref": "#/components/schemas/ProductPriceUnitBased"
          },
          {
            "$ref": "#/components/schemas/ProductPriceMeteredUnit"
          },
          {
            "$ref": "#/components/schemas/ProductPriceMeteredTiers"
          }
        ],
        "discriminator": {
          "propertyName": "amount_type",
          "mapping": {
            "custom": "#/components/schemas/ProductPriceCustom",
            "fixed": "#/components/schemas/ProductPriceFixed",
            "metered_tiers": "#/components/schemas/ProductPriceMeteredTiers",
            "metered_unit": "#/components/schemas/ProductPriceMeteredUnit",
            "seat_based": "#/components/schemas/ProductPriceSeatBased",
            "unit_based": "#/components/schemas/ProductPriceUnitBased"
          }
        }
      },
      "ProductPriceCustom": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the price."
          },
          "source": {
            "$ref": "#/components/schemas/ProductPriceSource",
            "description": "The source of the price . `catalog` is a predefined price, while `ad_hoc` is a price created dynamically on a Checkout session."
          },
          "amount_type": {
            "type": "string",
            "const": "custom",
            "title": "Amount Type"
          },
          "price_currency": {
            "type": "string",
            "title": "Price Currency",
            "description": "The currency in which the customer will be charged."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If null, it defaults to the organization's default tax behavior."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the price is archived and no longer available."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the product owning the price."
          },
          "minimum_amount": {
            "type": "integer",
            "title": "Minimum Amount",
            "description": "The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'."
          },
          "maximum_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum Amount",
            "description": "The maximum amount the customer can pay."
          },
          "preset_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preset Amount",
            "description": "The initial amount shown to the customer."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "minimum_amount",
          "maximum_amount",
          "preset_amount"
        ],
        "title": "ProductPriceCustom",
        "description": "A pay-what-you-want price for a product."
      },
      "ProductPriceCustomCreate": {
        "properties": {
          "amount_type": {
            "type": "string",
            "const": "custom",
            "title": "Amount Type"
          },
          "price_currency": {
            "$ref": "#/components/schemas/PresentmentCurrency",
            "description": "The currency in which the customer will be charged.",
            "default": "usd"
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If not set, it will default to the organization's default tax behavior."
          },
          "minimum_amount": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Minimum Amount",
            "description": "The minimum amount the customer can pay. If set to 0, the price is 'free or pay what you want' and $0 is accepted. If set to a value below the minimum price amount for the currency, it will be rejected. Defaults to the minimum price amount for the currency. Minimum per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units",
            "default": 50
          },
          "maximum_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0,
                "description": "The price in cents.\nMinimum amounts per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum Amount",
            "description": "The maximum amount the customer can pay. Maximum per currency:\n- USD: 999,999.99\n- EUR: 999,999.99\n- GBP: 999,999.99\n- ARS: 1,400,000\n- CDF: 2,800,000\n- COP: 4,000,000\n- IDR: 16,000,000\n- KHR: 4,000,000\n- LAK: 21,000,000\n- MNT: 3,500,000\n- MWK: 1,750,000\n- NGN: 1,550,000\n- TZS: 2,500,000\n- UGX: 3,700,000\n- UZS: 12,500,000\n- Other currencies: 99,999,999 minor units"
          },
          "preset_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0,
                "description": "The price in cents.\nMinimum amounts per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preset Amount",
            "description": "The initial amount shown to the customer. If 0, the customer will see $0 as the default. If set to a value below the minimum price amount for the currency, it will be rejected.Minimum per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units"
          }
        },
        "type": "object",
        "required": [
          "amount_type"
        ],
        "title": "ProductPriceCustomCreate",
        "description": "Schema to create a pay-what-you-want price."
      },
      "ProductPriceFixed": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the price."
          },
          "source": {
            "$ref": "#/components/schemas/ProductPriceSource",
            "description": "The source of the price . `catalog` is a predefined price, while `ad_hoc` is a price created dynamically on a Checkout session."
          },
          "amount_type": {
            "type": "string",
            "const": "fixed",
            "title": "Amount Type"
          },
          "price_currency": {
            "type": "string",
            "title": "Price Currency",
            "description": "The currency in which the customer will be charged."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If null, it defaults to the organization's default tax behavior."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the price is archived and no longer available."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the product owning the price."
          },
          "price_amount": {
            "type": "integer",
            "title": "Price Amount",
            "description": "The price in cents."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "price_amount"
        ],
        "title": "ProductPriceFixed",
        "description": "A fixed price for a product."
      },
      "ProductPriceFixedCreate": {
        "properties": {
          "amount_type": {
            "type": "string",
            "const": "fixed",
            "title": "Amount Type"
          },
          "price_currency": {
            "$ref": "#/components/schemas/PresentmentCurrency",
            "description": "The currency in which the customer will be charged.",
            "default": "usd"
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If not set, it will default to the organization's default tax behavior."
          },
          "price_amount": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Price Amount",
            "description": "The price in cents. Set to `0` for a free price.\nMinimum amounts per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units"
          }
        },
        "type": "object",
        "required": [
          "amount_type",
          "price_amount"
        ],
        "title": "ProductPriceFixedCreate",
        "description": "Schema to create a fixed price."
      },
      "ProductPriceMeter": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the meter."
          },
          "unit": {
            "$ref": "#/components/schemas/MeterUnit",
            "description": "The unit of the meter."
          },
          "custom_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Label",
            "description": "The label for the custom unit."
          },
          "custom_multiplier": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Multiplier",
            "description": "The multiplier to convert from base unit to display scale."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "unit",
          "custom_label",
          "custom_multiplier"
        ],
        "title": "ProductPriceMeter",
        "description": "A meter associated to a metered price."
      },
      "ProductPriceMeteredTiers": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the price."
          },
          "source": {
            "$ref": "#/components/schemas/ProductPriceSource",
            "description": "The source of the price . `catalog` is a predefined price, while `ad_hoc` is a price created dynamically on a Checkout session."
          },
          "amount_type": {
            "type": "string",
            "const": "metered_tiers",
            "title": "Amount Type"
          },
          "price_currency": {
            "type": "string",
            "title": "Price Currency",
            "description": "The currency in which the customer will be charged."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If null, it defaults to the organization's default tax behavior."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the price is archived and no longer available."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the product owning the price."
          },
          "cap_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cap Amount",
            "description": "The maximum amount in cents that can be charged, regardless of the number of units consumed."
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter associated to the price."
          },
          "meter": {
            "$ref": "#/components/schemas/ProductPriceMeter",
            "description": "The meter associated to the price."
          },
          "tiers": {
            "$ref": "#/components/schemas/Tiers",
            "description": "The pricing tiers based on consumed units."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "cap_amount",
          "meter_id",
          "meter",
          "tiers"
        ],
        "title": "ProductPriceMeteredTiers",
        "description": "A metered, usage-based, price for a product, billed from tiers."
      },
      "ProductPriceMeteredTiersCreate": {
        "properties": {
          "amount_type": {
            "type": "string",
            "const": "metered_tiers",
            "title": "Amount Type"
          },
          "price_currency": {
            "$ref": "#/components/schemas/PresentmentCurrency",
            "description": "The currency in which the customer will be charged.",
            "default": "usd"
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If not set, it will default to the organization's default tax behavior."
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter associated to the price."
          },
          "tiers": {
            "$ref": "#/components/schemas/TiersInput",
            "description": "Tiered pricing based on consumed units."
          },
          "cap_amount": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cap Amount",
            "description": "Optional maximum amount in cents that can be charged, regardless of the number of units consumed."
          }
        },
        "type": "object",
        "required": [
          "amount_type",
          "meter_id",
          "tiers"
        ],
        "title": "ProductPriceMeteredTiersCreate",
        "description": "Schema to create a metered price billed from tiers on consumed units."
      },
      "ProductPriceMeteredUnit": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the price."
          },
          "source": {
            "$ref": "#/components/schemas/ProductPriceSource",
            "description": "The source of the price . `catalog` is a predefined price, while `ad_hoc` is a price created dynamically on a Checkout session."
          },
          "amount_type": {
            "type": "string",
            "const": "metered_unit",
            "title": "Amount Type"
          },
          "price_currency": {
            "type": "string",
            "title": "Price Currency",
            "description": "The currency in which the customer will be charged."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If null, it defaults to the organization's default tax behavior."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the price is archived and no longer available."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the product owning the price."
          },
          "cap_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cap Amount",
            "description": "The maximum amount in cents that can be charged, regardless of the number of units consumed."
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter associated to the price."
          },
          "meter": {
            "$ref": "#/components/schemas/ProductPriceMeter",
            "description": "The meter associated to the price."
          },
          "unit_amount": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unit Amount",
            "description": "The price per unit in cents."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "cap_amount",
          "meter_id",
          "meter",
          "unit_amount"
        ],
        "title": "ProductPriceMeteredUnit",
        "description": "A metered, usage-based, price for a product, with a fixed unit price."
      },
      "ProductPriceMeteredUnitCreate": {
        "properties": {
          "amount_type": {
            "type": "string",
            "const": "metered_unit",
            "title": "Amount Type"
          },
          "price_currency": {
            "$ref": "#/components/schemas/PresentmentCurrency",
            "description": "The currency in which the customer will be charged.",
            "default": "usd"
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If not set, it will default to the organization's default tax behavior."
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter associated to the price."
          },
          "unit_amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,5}|(?=[\\d.]{1,18}0*$)\\d{0,5}\\.\\d{0,12}0*$)"
              }
            ],
            "title": "Unit Amount",
            "description": "The price per unit in cents. Supports up to 12 decimal places."
          },
          "cap_amount": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2147483647.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cap Amount",
            "description": "Optional maximum amount in cents that can be charged, regardless of the number of units consumed."
          }
        },
        "type": "object",
        "required": [
          "amount_type",
          "meter_id",
          "unit_amount"
        ],
        "title": "ProductPriceMeteredUnitCreate",
        "description": "Schema to create a metered price with a fixed unit price."
      },
      "ProductPriceSeatBased": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the price."
          },
          "source": {
            "$ref": "#/components/schemas/ProductPriceSource",
            "description": "The source of the price . `catalog` is a predefined price, while `ad_hoc` is a price created dynamically on a Checkout session."
          },
          "amount_type": {
            "type": "string",
            "const": "seat_based",
            "title": "Amount Type"
          },
          "price_currency": {
            "type": "string",
            "title": "Price Currency",
            "description": "The currency in which the customer will be charged."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If null, it defaults to the organization's default tax behavior."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the price is archived and no longer available."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the product owning the price."
          },
          "seat_tiers": {
            "$ref": "#/components/schemas/ProductPriceSeatTiers-Output",
            "description": "Tiered pricing based on seat quantity"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "seat_tiers"
        ],
        "title": "ProductPriceSeatBased",
        "description": "A seat-based price for a product."
      },
      "ProductPriceSeatBasedCreate": {
        "properties": {
          "amount_type": {
            "type": "string",
            "const": "seat_based",
            "title": "Amount Type"
          },
          "price_currency": {
            "$ref": "#/components/schemas/PresentmentCurrency",
            "description": "The currency in which the customer will be charged.",
            "default": "usd"
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If not set, it will default to the organization's default tax behavior."
          },
          "seat_tiers": {
            "$ref": "#/components/schemas/ProductPriceSeatTiers-Input",
            "description": "Tiered pricing based on seat quantity"
          }
        },
        "type": "object",
        "required": [
          "amount_type",
          "seat_tiers"
        ],
        "title": "ProductPriceSeatBasedCreate",
        "description": "Schema to create a seat-based price with volume-based tiers."
      },
      "ProductPriceSeatTier": {
        "properties": {
          "min_seats": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Min Seats",
            "description": "Minimum number of seats (inclusive)"
          },
          "max_seats": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Seats",
            "description": "Maximum number of seats (inclusive). None for unlimited."
          },
          "price_per_seat": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Price Per Seat",
            "description": "Price per seat in cents for this tier"
          }
        },
        "type": "object",
        "required": [
          "min_seats",
          "price_per_seat"
        ],
        "title": "ProductPriceSeatTier",
        "description": "A pricing tier for seat-based pricing."
      },
      "ProductPriceSeatTiers-Input": {
        "properties": {
          "seat_tier_type": {
            "$ref": "#/components/schemas/SeatTierType",
            "description": "How tiers are applied. 'volume' prices all seats at the matching tier's rate. 'graduated' prices each tier's range independently.",
            "default": "volume"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/ProductPriceSeatTier"
            },
            "type": "array",
            "minItems": 1,
            "title": "Tiers",
            "description": "List of pricing tiers"
          }
        },
        "type": "object",
        "required": [
          "tiers"
        ],
        "title": "ProductPriceSeatTiers",
        "description": "List of pricing tiers for seat-based pricing.\n\nThe minimum and maximum seat limits are derived from the tiers:\n- minimum_seats = first tier's min_seats\n- maximum_seats = last tier's max_seats (None for unlimited)"
      },
      "ProductPriceSeatTiers-Output": {
        "properties": {
          "seat_tier_type": {
            "$ref": "#/components/schemas/SeatTierType",
            "description": "How tiers are applied. 'volume' prices all seats at the matching tier's rate. 'graduated' prices each tier's range independently.",
            "default": "volume"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/ProductPriceSeatTier"
            },
            "type": "array",
            "minItems": 1,
            "title": "Tiers",
            "description": "List of pricing tiers"
          },
          "minimum_seats": {
            "type": "integer",
            "title": "Minimum Seats",
            "description": "Minimum number of seats required for purchase, derived from first tier.",
            "readOnly": true
          },
          "maximum_seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum Seats",
            "description": "Maximum number of seats allowed for purchase, derived from last tier. None for unlimited.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "tiers",
          "minimum_seats",
          "maximum_seats"
        ],
        "title": "ProductPriceSeatTiers",
        "description": "List of pricing tiers for seat-based pricing.\n\nThe minimum and maximum seat limits are derived from the tiers:\n- minimum_seats = first tier's min_seats\n- maximum_seats = last tier's max_seats (None for unlimited)"
      },
      "ProductPriceSource": {
        "type": "string",
        "enum": [
          "catalog",
          "ad_hoc"
        ],
        "title": "ProductPriceSource"
      },
      "ProductPriceType": {
        "type": "string",
        "enum": [
          "one_time",
          "recurring"
        ],
        "title": "ProductPriceType"
      },
      "ProductPriceUnitBased": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the price."
          },
          "source": {
            "$ref": "#/components/schemas/ProductPriceSource",
            "description": "The source of the price . `catalog` is a predefined price, while `ad_hoc` is a price created dynamically on a Checkout session."
          },
          "amount_type": {
            "type": "string",
            "const": "unit_based",
            "title": "Amount Type"
          },
          "price_currency": {
            "type": "string",
            "title": "Price Currency",
            "description": "The currency in which the customer will be charged."
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If null, it defaults to the organization's default tax behavior."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether the price is archived and no longer available."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the product owning the price."
          },
          "tiers": {
            "$ref": "#/components/schemas/Tiers",
            "description": "Tiered pricing based on the purchased unit quantity."
          },
          "minimum_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minimum Units",
            "description": "The minimum purchasable quantity (inclusive)."
          },
          "unit_label": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "object",
                "minLength": 1,
                "examples": [
                  {
                    "en": {
                      "=1": "seat",
                      "other": "seats"
                    }
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit Label",
            "description": "Per-locale unit nouns shown at checkout and on invoices. `null` defaults to \"unit\"/\"units\"."
          },
          "maximum_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum Units",
            "description": "The maximum purchasable quantity, from the last tier's bound. `null` for unlimited.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "tiers",
          "minimum_units",
          "unit_label",
          "maximum_units"
        ],
        "title": "ProductPriceUnitBased",
        "description": "A unit-based price for a product: the buyer picks a quantity of units,\npays for it up-front. On subscriptions, quantity changes are prorated."
      },
      "ProductPriceUnitBasedCreate": {
        "properties": {
          "amount_type": {
            "type": "string",
            "const": "unit_based",
            "title": "Amount Type"
          },
          "price_currency": {
            "$ref": "#/components/schemas/PresentmentCurrency",
            "description": "The currency in which the customer will be charged.",
            "default": "usd"
          },
          "tax_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxBehaviorOption"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tax behavior of the price. If not set, it will default to the organization's default tax behavior."
          },
          "tiers": {
            "$ref": "#/components/schemas/TiersInput",
            "description": "Tiered pricing based on the purchased unit quantity."
          },
          "minimum_units": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Minimum Units",
            "description": "The minimum purchasable quantity (inclusive). Defaults to 1 when not set."
          },
          "unit_label": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "object",
                "minLength": 1,
                "examples": [
                  {
                    "en": {
                      "=1": "seat",
                      "other": "seats"
                    }
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit Label",
            "description": "Per-locale unit nouns shown at checkout and on invoices. `{\"en\": {\"=1\": \"device\", \"other\": \"devices\"}}`. Defaults to \"unit\"/\"units\" when unset."
          }
        },
        "type": "object",
        "required": [
          "amount_type",
          "tiers"
        ],
        "title": "ProductPriceUnitBasedCreate",
        "description": "Schema to create a unit-based price: the buyer picks a quantity of units,\npays for it up-front. On subscriptions, quantity changes are prorated."
      },
      "ProductSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "name",
          "-name",
          "price_amount_type",
          "-price_amount_type",
          "price_amount",
          "-price_amount"
        ],
        "title": "ProductSortProperty"
      },
      "ProductUpdate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "trial_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrialInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The interval unit for the trial period."
          },
          "trial_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Interval Count",
            "description": "The number of interval units for the trial period."
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "minLength": 3,
                "description": "The name of the product."
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "The description of the product."
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ],
            "description": "The recurring interval of the product. If `None`, the product is a one-time purchase. **Can only be set on legacy recurring products. Once set, it can't be changed.**"
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 999.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. Once set, it can't be changed.**"
          },
          "is_archived": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Archived",
            "description": "Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally.",
            "x-polar-cli-confirm": {
              "equals": true
            }
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProductVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visibility of the product."
          },
          "prices": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExistingProductPrice"
                    },
                    {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/ProductPriceFixedCreate"
                        },
                        {
                          "$ref": "#/components/schemas/ProductPriceCustomCreate"
                        },
                        {
                          "$ref": "#/components/schemas/ProductPriceSeatBasedCreate"
                        },
                        {
                          "$ref": "#/components/schemas/ProductPriceUnitBasedCreate"
                        },
                        {
                          "$ref": "#/components/schemas/ProductPriceMeteredUnitCreate"
                        },
                        {
                          "$ref": "#/components/schemas/ProductPriceMeteredTiersCreate"
                        }
                      ],
                      "discriminator": {
                        "propertyName": "amount_type",
                        "mapping": {
                          "custom": "#/components/schemas/ProductPriceCustomCreate",
                          "fixed": "#/components/schemas/ProductPriceFixedCreate",
                          "metered_tiers": "#/components/schemas/ProductPriceMeteredTiersCreate",
                          "metered_unit": "#/components/schemas/ProductPriceMeteredUnitCreate",
                          "seat_based": "#/components/schemas/ProductPriceSeatBasedCreate",
                          "unit_based": "#/components/schemas/ProductPriceUnitBasedCreate"
                        }
                      }
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prices",
            "description": "List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object."
          },
          "medias": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid4"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Medias",
            "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."
          },
          "attached_custom_fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AttachedCustomFieldCreate"
                },
                "type": "array",
                "description": "List of custom fields to attach."
              },
              {
                "type": "null"
              }
            ],
            "title": "Attached Custom Fields"
          }
        },
        "type": "object",
        "title": "ProductUpdate",
        "description": "Schema to update a product."
      },
      "ProductVisibility": {
        "type": "string",
        "enum": [
          "draft",
          "private",
          "public"
        ],
        "title": "Visibility"
      },
      "PropertyAggregation": {
        "properties": {
          "func": {
            "type": "string",
            "enum": [
              "sum",
              "max",
              "min",
              "avg"
            ],
            "title": "Func"
          },
          "property": {
            "type": "string",
            "title": "Property"
          }
        },
        "type": "object",
        "required": [
          "func",
          "property"
        ],
        "title": "PropertyAggregation"
      },
      "RecurringInterval": {
        "type": "string",
        "enum": [
          "day",
          "week",
          "month",
          "year"
        ],
        "title": "RecurringInterval"
      },
      "Refund": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "status": {
            "$ref": "#/components/schemas/RefundStatus"
          },
          "reason": {
            "$ref": "#/components/schemas/RefundReason"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "order_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Order Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "revoke_benefits": {
            "type": "boolean",
            "title": "Revoke Benefits"
          },
          "dispute": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RefundDispute"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "metadata",
          "status",
          "reason",
          "amount",
          "tax_amount",
          "currency",
          "organization_id",
          "order_id",
          "subscription_id",
          "customer_id",
          "revoke_benefits",
          "dispute"
        ],
        "title": "Refund"
      },
      "RefundCreate": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "order_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Order Id"
          },
          "reason": {
            "type": "string",
            "enum": [
              "duplicate",
              "fraudulent",
              "customer_request",
              "service_disruption",
              "satisfaction_guarantee",
              "other"
            ],
            "title": "Reason",
            "description": "Reason for the refund."
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Amount",
            "description": "Amount to refund in cents. Minimum is 1."
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment",
            "description": "An internal comment about the refund."
          },
          "revoke_benefits": {
            "type": "boolean",
            "title": "Revoke Benefits",
            "description": "Should this refund trigger the associated customer benefits to be revoked?\n\n**Note:**\nOnly allowed in case the `order` is a one-time purchase.\nSubscriptions automatically revoke customer benefits once the\nsubscription itself is revoked, i.e fully canceled.",
            "default": false,
            "x-polar-cli-confirm": {
              "equals": true
            }
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "reason",
          "amount"
        ],
        "title": "RefundCreate"
      },
      "RefundDispute": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "status": {
            "$ref": "#/components/schemas/DisputeStatus",
            "description": "Status of the dispute. `prevented` means we issued a refund before the dispute was escalated, avoiding any fees.",
            "examples": [
              "needs_response",
              "prevented"
            ]
          },
          "resolved": {
            "type": "boolean",
            "title": "Resolved",
            "description": "Whether the dispute has been resolved (won or lost).",
            "examples": [
              false
            ]
          },
          "closed": {
            "type": "boolean",
            "title": "Closed",
            "description": "Whether the dispute is closed (prevented, won, or lost).",
            "examples": [
              false
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "Amount in cents disputed.",
            "examples": [
              1000
            ]
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount",
            "description": "Tax amount in cents disputed.",
            "examples": [
              200
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "Currency code of the dispute.",
            "examples": [
              "usd"
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "The reason for the dispute as reported by the card network (e.g. `fraudulent`, `product_not_received`). `None` until the processor reports it.",
            "examples": [
              "fraudulent"
            ]
          },
          "evidence_due_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Due By",
            "description": "Deadline to submit evidence in response to the dispute. `None` when no response is required."
          },
          "past_due": {
            "type": "boolean",
            "title": "Past Due",
            "description": "Whether the evidence submission deadline has passed.",
            "examples": [
              false
            ]
          },
          "order_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Order Id",
            "description": "The ID of the order associated with the dispute.",
            "examples": [
              "57107b74-8400-4d80-a2fc-54c2b4239cb3"
            ]
          },
          "payment_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Payment Id",
            "description": "The ID of the payment associated with the dispute.",
            "examples": [
              "42b94870-36b9-4573-96b6-b90b1c99a353"
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "status",
          "resolved",
          "closed",
          "amount",
          "tax_amount",
          "currency",
          "reason",
          "evidence_due_by",
          "past_due",
          "order_id",
          "payment_id"
        ],
        "title": "RefundDispute",
        "description": "Dispute associated with a refund,\nin case we prevented a dispute by issuing a refund."
      },
      "RefundReason": {
        "type": "string",
        "enum": [
          "duplicate",
          "fraudulent",
          "customer_request",
          "service_disruption",
          "satisfaction_guarantee",
          "dispute_prevention",
          "other"
        ],
        "title": "RefundReason"
      },
      "RefundSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "amount",
          "-amount"
        ],
        "title": "RefundSortProperty"
      },
      "RefundStatus": {
        "type": "string",
        "enum": [
          "pending",
          "succeeded",
          "failed",
          "canceled"
        ],
        "title": "RefundStatus"
      },
      "RefundedAlready": {
        "properties": {
          "error": {
            "type": "string",
            "const": "RefundedAlready",
            "title": "Error",
            "examples": [
              "RefundedAlready"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "RefundedAlready"
      },
      "ResourceNotFound": {
        "properties": {
          "error": {
            "type": "string",
            "const": "ResourceNotFound",
            "title": "Error",
            "examples": [
              "ResourceNotFound"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "ResourceNotFound"
      },
      "RevokeTokenResponse": {
        "properties": {},
        "type": "object",
        "title": "RevokeTokenResponse"
      },
      "RotateNotPermitted": {
        "properties": {
          "error": {
            "type": "string",
            "const": "RotateNotPermitted",
            "title": "Error",
            "examples": [
              "RotateNotPermitted"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "RotateNotPermitted"
      },
      "RotatedLicenseKey": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "customer": {
            "$ref": "#/components/schemas/LicenseKeyCustomer"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The benefit ID."
          },
          "key": {
            "type": "string",
            "title": "Key"
          },
          "display_key": {
            "type": "string",
            "title": "Display Key"
          },
          "status": {
            "type": "string",
            "enum": [
              "granted",
              "disabled"
            ],
            "title": "Status"
          },
          "limit_activations": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Activations"
          },
          "usage": {
            "type": "integer",
            "title": "Usage"
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          },
          "validations": {
            "type": "integer",
            "title": "Validations"
          },
          "last_validated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Validated At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "organization_id",
          "customer_id",
          "customer",
          "benefit_id",
          "key",
          "display_key",
          "status",
          "limit_activations",
          "usage",
          "limit_usage",
          "validations",
          "last_validated_at",
          "expires_at"
        ],
        "title": "RotatedLicenseKey"
      },
      "S3DownloadURL": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Headers",
            "default": {}
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          }
        },
        "type": "object",
        "required": [
          "url",
          "expires_at"
        ],
        "title": "S3DownloadURL"
      },
      "S3FileCreateMultipart": {
        "properties": {
          "parts": {
            "items": {
              "$ref": "#/components/schemas/S3FileCreatePart"
            },
            "type": "array",
            "maxItems": 10000,
            "title": "Parts"
          }
        },
        "type": "object",
        "required": [
          "parts"
        ],
        "title": "S3FileCreateMultipart"
      },
      "S3FileCreatePart": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "chunk_start": {
            "type": "integer",
            "title": "Chunk Start"
          },
          "chunk_end": {
            "type": "integer",
            "title": "Chunk End"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          }
        },
        "type": "object",
        "required": [
          "number",
          "chunk_start",
          "chunk_end"
        ],
        "title": "S3FileCreatePart"
      },
      "S3FileUploadCompletedPart": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "checksum_etag": {
            "type": "string",
            "title": "Checksum Etag"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          }
        },
        "type": "object",
        "required": [
          "number",
          "checksum_etag",
          "checksum_sha256_base64"
        ],
        "title": "S3FileUploadCompletedPart"
      },
      "S3FileUploadMultipart": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/S3FileUploadPart"
            },
            "type": "array",
            "title": "Parts"
          }
        },
        "type": "object",
        "required": [
          "id",
          "path",
          "parts"
        ],
        "title": "S3FileUploadMultipart"
      },
      "S3FileUploadPart": {
        "properties": {
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "chunk_start": {
            "type": "integer",
            "title": "Chunk Start"
          },
          "chunk_end": {
            "type": "integer",
            "title": "Chunk End"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Headers",
            "default": {}
          }
        },
        "type": "object",
        "required": [
          "number",
          "chunk_start",
          "chunk_end",
          "url",
          "expires_at"
        ],
        "title": "S3FileUploadPart"
      },
      "SSOEnforcementRequiresConnection": {
        "properties": {
          "error": {
            "type": "string",
            "const": "SSOEnforcementRequiresConnection",
            "title": "Error",
            "examples": [
              "SSOEnforcementRequiresConnection"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "SSOEnforcementRequiresConnection"
      },
      "Scope": {
        "type": "string",
        "enum": [
          "openid",
          "profile",
          "email",
          "user:read",
          "user:write",
          "organizations:read",
          "organizations:write",
          "custom_fields:read",
          "custom_fields:write",
          "discounts:read",
          "discounts:write",
          "checkout_links:read",
          "checkout_links:write",
          "checkouts:read",
          "checkouts:write",
          "transactions:read",
          "transactions:write",
          "payouts:read",
          "payouts:write",
          "products:read",
          "products:write",
          "benefits:read",
          "benefits:write",
          "events:read",
          "events:write",
          "meters:read",
          "meters:write",
          "files:read",
          "files:write",
          "subscriptions:read",
          "subscriptions:write",
          "customers:read",
          "customers:write",
          "members:read",
          "members:write",
          "wallets:read",
          "wallets:write",
          "disputes:read",
          "disputes:write",
          "customer_meters:read",
          "customer_sessions:write",
          "member_sessions:write",
          "customer_seats:read",
          "customer_seats:write",
          "orders:read",
          "orders:write",
          "refunds:read",
          "refunds:write",
          "payments:read",
          "metrics:read",
          "metrics:write",
          "webhooks:read",
          "webhooks:write",
          "license_keys:read",
          "license_keys:write",
          "customer_portal:read",
          "customer_portal:write",
          "notifications:read",
          "notifications:write",
          "notification_recipients:read",
          "notification_recipients:write",
          "organization_access_tokens:read",
          "organization_access_tokens:write"
        ],
        "title": "Scope",
        "enumNames": {
          "benefits:read": "Read benefits",
          "benefits:write": "Create or modify benefits",
          "checkout_links:read": "Read checkout links",
          "checkout_links:write": "Create or modify checkout links",
          "checkouts:read": "Read checkout sessions",
          "checkouts:write": "Create or modify checkout sessions",
          "custom_fields:read": "Read custom fields",
          "custom_fields:write": "Create or modify custom fields",
          "customer_meters:read": "Read customer meters",
          "customer_portal:read": "Read your orders, subscriptions and benefits",
          "customer_portal:write": "Create or modify your orders, subscriptions and benefits",
          "customer_seats:read": "Read customer seats",
          "customer_seats:write": "Create or modify customer seats",
          "customer_sessions:write": "Create or modify customer sessions",
          "customers:read": "Read customers",
          "customers:write": "Create or modify customers",
          "discounts:read": "Read discounts",
          "discounts:write": "Create or modify discounts",
          "disputes:read": "Read disputes",
          "disputes:write": "Create or modify disputes",
          "email": "Read your email address",
          "events:read": "Read events",
          "events:write": "Create events",
          "files:read": "Read file uploads",
          "files:write": "Create or modify file uploads",
          "license_keys:read": "Read license keys",
          "license_keys:write": "Modify license keys",
          "member_sessions:write": "Create or modify member sessions",
          "members:read": "Read members",
          "members:write": "Create or modify members",
          "meters:read": "Read meters",
          "meters:write": "Create or modify meters",
          "metrics:read": "Read metrics",
          "metrics:write": "Create or modify metric definitions",
          "notification_recipients:read": "Read notification recipients",
          "notification_recipients:write": "Create or modify notification recipients",
          "notifications:read": "Read notifications",
          "notifications:write": "Mark notifications as read",
          "openid": "OpenID",
          "orders:read": "Read orders made on your organizations",
          "orders:write": "Modify orders made on your organizations",
          "organization_access_tokens:read": "Read organization access tokens",
          "organization_access_tokens:write": "Create or modify organization access tokens",
          "organizations:read": "Read your organizations",
          "organizations:write": "Create or modify organizations",
          "payments:read": "Read payments made on your organizations",
          "payouts:read": "Read payouts",
          "payouts:write": "Create or modify payouts",
          "products:read": "Read products",
          "products:write": "Create or modify products",
          "profile": "Read your profile",
          "refunds:read": "Read refunds made on your organizations",
          "refunds:write": "Create or modify refunds",
          "subscriptions:read": "Read subscriptions made on your organizations",
          "subscriptions:write": "Create or modify subscriptions made on your organizations",
          "transactions:read": "Read transactions",
          "transactions:write": "Create or modify transactions",
          "user:read": "Read your user account",
          "user:write": "Manage your user account",
          "wallets:read": "Read wallets",
          "wallets:write": "Create or modify wallets",
          "webhooks:read": "Read webhooks",
          "webhooks:write": "Create or modify webhooks"
        }
      },
      "SeatAssign": {
        "properties": {
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "Subscription ID. Required if neither order_id nor checkout_id is provided."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id",
            "description": "Order ID for one-time purchases. Required if subscription_id is not provided."
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Email of the customer to assign the seat to"
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "External customer ID for the seat assignment"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "Customer ID for the seat assignment"
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "External member ID for the seat assignment. Can be used alone (lookup existing member) or with email (create/validate member)."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "Member ID for the seat assignment."
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata",
            "description": "Additional metadata for the seat (max 10 keys, 1KB total)"
          },
          "immediate_claim": {
            "type": "boolean",
            "title": "Immediate Claim",
            "description": "If true, the seat will be immediately claimed without sending an invitation email. API-only feature.",
            "default": false
          }
        },
        "type": "object",
        "title": "SeatAssign"
      },
      "SeatClaim": {
        "properties": {
          "invitation_token": {
            "type": "string",
            "title": "Invitation Token",
            "description": "Invitation token to claim the seat"
          }
        },
        "type": "object",
        "required": [
          "invitation_token"
        ],
        "title": "SeatClaim"
      },
      "SeatClaimInfo": {
        "properties": {
          "product_name": {
            "type": "string",
            "title": "Product Name",
            "description": "Name of the product"
          },
          "product_id": {
            "type": "string",
            "format": "uuid",
            "title": "Product Id",
            "description": "ID of the product"
          },
          "organization_name": {
            "type": "string",
            "title": "Organization Name",
            "description": "Name of the organization"
          },
          "organization_slug": {
            "type": "string",
            "title": "Organization Slug",
            "description": "Slug of the organization"
          },
          "customer_email": {
            "type": "string",
            "title": "Customer Email",
            "description": "Email of the customer assigned to this seat"
          },
          "can_claim": {
            "type": "boolean",
            "title": "Can Claim",
            "description": "Whether the seat can be claimed"
          }
        },
        "type": "object",
        "required": [
          "product_name",
          "product_id",
          "organization_name",
          "organization_slug",
          "customer_email",
          "can_claim"
        ],
        "title": "SeatClaimInfo",
        "description": "Read-only information about a seat claim invitation.\nSafe for email scanners - no side effects when fetched."
      },
      "SeatStatus": {
        "type": "string",
        "enum": [
          "pending",
          "claimed",
          "revoked"
        ],
        "title": "SeatStatus"
      },
      "SeatTierType": {
        "type": "string",
        "enum": [
          "volume",
          "graduated"
        ],
        "title": "SeatTierType"
      },
      "SeatsList": {
        "properties": {
          "seats": {
            "items": {
              "$ref": "#/components/schemas/CustomerSeat"
            },
            "type": "array",
            "title": "Seats",
            "description": "List of seats"
          },
          "available_seats": {
            "type": "integer",
            "title": "Available Seats",
            "description": "Number of available seats"
          },
          "total_seats": {
            "type": "integer",
            "title": "Total Seats",
            "description": "Total number of seats for the subscription"
          }
        },
        "type": "object",
        "required": [
          "seats",
          "available_seats",
          "total_seats"
        ],
        "title": "SeatsList"
      },
      "SubType": {
        "type": "string",
        "enum": [
          "user",
          "organization"
        ],
        "title": "SubType"
      },
      "Subscription": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount of the subscription.",
            "examples": [
              10000
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "The currency of the subscription.",
            "examples": [
              "usd"
            ]
          },
          "recurring_interval": {
            "$ref": "#/components/schemas/RecurringInterval",
            "description": "The interval at which the subscription recurs.",
            "examples": [
              "month"
            ]
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count",
            "description": "Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on."
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus",
            "description": "The status of the subscription.",
            "examples": [
              "active"
            ]
          },
          "current_period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period Start",
            "description": "The start timestamp of the current billing period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "current_meter_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Meter Period Start",
            "description": "The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence."
          },
          "current_meter_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Meter Period End",
            "description": "The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew."
          },
          "trial_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "The end timestamp of the trial period, if any."
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "description": "Whether the subscription will be canceled at the end of the current period."
          },
          "canceled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled At",
            "description": "The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`."
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "The timestamp when the subscription ended."
          },
          "past_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Past Due At",
            "description": "The timestamp when the subscription entered `past_due` status."
          },
          "pause_at_period_end": {
            "type": "boolean",
            "title": "Pause At Period End",
            "description": "Whether the subscription will be paused at the end of the current period."
          },
          "paused_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At",
            "description": "The timestamp when the subscription was paused."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Resumes At",
            "description": "The timestamp when a paused subscription is scheduled to automatically resume, if set."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the subscribed customer."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the subscribed product."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "The ID of the applied discount, if any."
          },
          "checkout_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkout Id"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats",
            "description": "The number of seats for seat-based subscriptions. None for non-seat subscriptions."
          },
          "units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Units",
            "description": "The number of units for unit-based subscriptions. None for non-unit subscriptions."
          },
          "customer_cancellation_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCancellationReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_cancellation_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Cancellation Comment"
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "custom_field_data": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2026-01-01T00:00:00.000000Z"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Custom Field Data",
            "description": "Key-value object storing custom field values."
          },
          "customer": {
            "$ref": "#/components/schemas/SubscriptionCustomer"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "discount": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase"
                  },
                  {
                    "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase"
                  }
                ],
                "title": "SubscriptionDiscount"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "prices": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LegacyRecurringProductPrice"
                },
                {
                  "$ref": "#/components/schemas/ProductPrice"
                }
              ]
            },
            "type": "array",
            "title": "Prices",
            "description": "List of enabled prices for the subscription."
          },
          "meters": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionMeter"
            },
            "type": "array",
            "title": "Meters",
            "description": "List of meters associated with the subscription."
          },
          "pending_update": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PendingSubscriptionUpdate"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "amount",
          "currency",
          "recurring_interval",
          "recurring_interval_count",
          "status",
          "current_period_start",
          "current_period_end",
          "current_meter_period_start",
          "current_meter_period_end",
          "trial_start",
          "trial_end",
          "cancel_at_period_end",
          "canceled_at",
          "started_at",
          "ends_at",
          "ended_at",
          "pause_at_period_end",
          "paused_at",
          "resumes_at",
          "customer_id",
          "product_id",
          "discount_id",
          "checkout_id",
          "units",
          "customer_cancellation_reason",
          "customer_cancellation_comment",
          "metadata",
          "customer",
          "product",
          "discount",
          "prices",
          "meters",
          "pending_update"
        ],
        "title": "Subscription"
      },
      "SubscriptionBillingPeriodUpdatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.billing_period_updated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionBillingPeriodUpdatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionBillingPeriodUpdatedEvent",
        "description": "An event created by Polar when a subscription billing period is updated."
      },
      "SubscriptionBillingPeriodUpdatedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "old_period_end": {
            "type": "string",
            "title": "Old Period End"
          },
          "new_period_end": {
            "type": "string",
            "title": "New Period End"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "old_period_end",
          "new_period_end"
        ],
        "title": "SubscriptionBillingPeriodUpdatedMetadata"
      },
      "SubscriptionCancel": {
        "properties": {
          "customer_cancellation_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCancellationReason"
              },
              {
                "type": "null"
              }
            ],
            "description": "Customer reason for cancellation.\n\nHelpful to monitor reasons behind churn for future improvements.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you know based on direct conversations, i.e support, with\nthe customer.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s)."
          },
          "customer_cancellation_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Cancellation Comment",
            "description": "Customer feedback and why they decided to cancel.\n\n**IMPORTANT:**\nDo not use this to store internal notes! It's intended to be input\nfrom the customer and is therefore also available in their Polar\npurchases library.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you copy a message directly from a customer\nconversation, i.e support."
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "description": "Cancel an active subscription once the current period ends.\n\nOr uncancel a subscription currently set to be revoked at period end.",
            "x-polar-cli-confirm": {
              "equals": true
            }
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "cancel_at_period_end"
        ],
        "title": "SubscriptionCancel"
      },
      "SubscriptionCanceledEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.canceled",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionCanceledMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionCanceledEvent",
        "description": "An event created by Polar when a subscription is canceled."
      },
      "SubscriptionCanceledMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          },
          "customer_cancellation_reason": {
            "type": "string",
            "title": "Customer Cancellation Reason"
          },
          "customer_cancellation_comment": {
            "type": "string",
            "title": "Customer Cancellation Comment"
          },
          "canceled_at": {
            "type": "string",
            "title": "Canceled At"
          },
          "ends_at": {
            "type": "string",
            "title": "Ends At"
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "amount",
          "currency",
          "recurring_interval",
          "recurring_interval_count",
          "canceled_at"
        ],
        "title": "SubscriptionCanceledMetadata"
      },
      "SubscriptionCreateCustomer": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the recurring product to subscribe to. Must be a free product, otherwise the customer should go through a checkout flow.",
            "examples": [
              "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23"
            ]
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer to create the subscription for.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          }
        },
        "type": "object",
        "required": [
          "product_id",
          "customer_id"
        ],
        "title": "SubscriptionCreateCustomer",
        "description": "Create a subscription for an existing customer."
      },
      "SubscriptionCreateExternalCustomer": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The ID of the recurring product to subscribe to. Must be a free product, otherwise the customer should go through a checkout flow.",
            "examples": [
              "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23"
            ]
          },
          "external_customer_id": {
            "type": "string",
            "title": "External Customer Id",
            "description": "The ID of the customer in your system to create the subscription for. It must already exist in Polar."
          }
        },
        "type": "object",
        "required": [
          "product_id",
          "external_customer_id"
        ],
        "title": "SubscriptionCreateExternalCustomer",
        "description": "Create a subscription for an existing customer identified by an external ID."
      },
      "SubscriptionCreatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.created",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionCreatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionCreatedEvent",
        "description": "An event created by Polar when a subscription is created."
      },
      "SubscriptionCreatedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          },
          "started_at": {
            "type": "string",
            "title": "Started At"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "product_id",
          "amount",
          "currency",
          "recurring_interval",
          "recurring_interval_count",
          "started_at"
        ],
        "title": "SubscriptionCreatedMetadata"
      },
      "SubscriptionCustomer": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the customer.",
            "examples": [
              "992fae2a-2a17-4b7a-8d9e-e287cf90131b"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataOutputType"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id",
            "description": "The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.",
            "examples": [
              "usr_1337"
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "The email address of the customer. This must be unique within the organization.",
            "examples": [
              "customer@example.com"
            ]
          },
          "email_verified": {
            "type": "boolean",
            "title": "Email Verified",
            "description": "Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.",
            "examples": [
              true
            ]
          },
          "type": {
            "$ref": "#/components/schemas/CustomerType",
            "description": "The type of customer: 'individual' for single users, 'team' for customers with multiple members.",
            "examples": [
              "individual"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the customer.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.",
            "examples": [
              "John Doe"
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/components/schemas/TaxIDFormat"
                  }
                ],
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "examples": [
                  [
                    "911144442",
                    "us_ein"
                  ],
                  [
                    "FR61954506077",
                    "eu_vat"
                  ]
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the customer.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "default_payment_method_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Payment Method Id",
            "description": "The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details."
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "first_user_event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "First User Event At",
            "description": "Timestamp of the first event ingested for this customer. Can predate `created_at`, and is null if no event was ever ingested."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "examples": [
              "https://www.gravatar.com/avatar/xxx?d=404"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "metadata",
          "email_verified",
          "type",
          "name",
          "billing_name",
          "billing_address",
          "tax_id",
          "organization_id",
          "deleted_at",
          "first_user_event_at",
          "avatar_url"
        ],
        "title": "SubscriptionCustomer"
      },
      "SubscriptionCycledEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.cycled",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionCycledMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionCycledEvent",
        "description": "An event created by Polar when a subscription is cycled."
      },
      "SubscriptionCycledMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          }
        },
        "type": "object",
        "required": [
          "subscription_id"
        ],
        "title": "SubscriptionCycledMetadata"
      },
      "SubscriptionExportColumn": {
        "type": "string",
        "enum": [
          "email",
          "started_at",
          "product",
          "amount",
          "currency",
          "status",
          "recurring_interval",
          "customer_name",
          "billing_name",
          "billing_country",
          "net_amount",
          "discount",
          "seats",
          "current_period_start",
          "current_period_end",
          "cancel_at_period_end",
          "canceled_at",
          "ends_at",
          "ended_at",
          "cancellation_reason",
          "trial_start",
          "trial_end"
        ],
        "title": "SubscriptionExportColumn"
      },
      "SubscriptionLocked": {
        "properties": {
          "error": {
            "type": "string",
            "const": "SubscriptionLocked",
            "title": "Error",
            "examples": [
              "SubscriptionLocked"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "SubscriptionLocked"
      },
      "SubscriptionMeter": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "consumed_units": {
            "type": "number",
            "title": "Consumed Units",
            "description": "The number of consumed units so far in this billing period.",
            "examples": [
              25.0
            ]
          },
          "credited_units": {
            "type": "integer",
            "title": "Credited Units",
            "description": "The number of credited units so far in this billing period.",
            "examples": [
              100
            ]
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount due in cents so far in this billing period.",
            "examples": [
              0
            ]
          },
          "meter_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Meter Id",
            "description": "The ID of the meter.",
            "examples": [
              "d498a884-e2cd-4d3e-8002-f536468a8b22"
            ]
          },
          "meter": {
            "$ref": "#/components/schemas/Meter",
            "description": "The meter associated with this subscription."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "consumed_units",
          "credited_units",
          "amount",
          "meter_id",
          "meter"
        ],
        "title": "SubscriptionMeter",
        "description": "Current consumption and spending for a subscription meter."
      },
      "SubscriptionMigratedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.migrated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionMigratedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionMigratedEvent",
        "description": "An event created by Polar when a subscription is migrated to Polar."
      },
      "SubscriptionMigratedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "provider_subscription_id": {
            "type": "string",
            "title": "Provider Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "provider",
          "provider_subscription_id",
          "product_id"
        ],
        "title": "SubscriptionMigratedMetadata"
      },
      "SubscriptionNotScheduledToCancel": {
        "properties": {
          "error": {
            "type": "string",
            "const": "SubscriptionNotScheduledToCancel",
            "title": "Error",
            "examples": [
              "SubscriptionNotScheduledToCancel"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "SubscriptionNotScheduledToCancel"
      },
      "SubscriptionPastDueEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.past_due",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionPastDueMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionPastDueEvent",
        "description": "An event created by Polar when a subscription becomes past due."
      },
      "SubscriptionPastDueMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "past_due_at": {
            "type": "string",
            "title": "Past Due At"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "past_due_at"
        ],
        "title": "SubscriptionPastDueMetadata"
      },
      "SubscriptionPause": {
        "properties": {
          "pause_at_period_end": {
            "type": "boolean",
            "title": "Pause At Period End",
            "description": "Pause an active subscription at the end of the current period.\n\nOr cancel a scheduled pause on a subscription set to be paused at\nperiod end.",
            "x-polar-cli-confirm": {
              "equals": true
            }
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Resumes At",
            "description": "Date at which the paused subscription should automatically resume.\n\nIf not set, the subscription stays paused until it is resumed manually.\nMust be after the current period end."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pause_at_period_end"
        ],
        "title": "SubscriptionPause"
      },
      "SubscriptionPausedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.paused",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionPausedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionPausedEvent",
        "description": "An event created by Polar when a subscription is paused."
      },
      "SubscriptionPausedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          },
          "paused_at": {
            "type": "string",
            "title": "Paused At"
          },
          "resumes_at": {
            "type": "string",
            "title": "Resumes At"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "paused_at"
        ],
        "title": "SubscriptionPausedMetadata"
      },
      "SubscriptionProductUpdatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.product_updated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionProductUpdatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionProductUpdatedEvent",
        "description": "An event created by Polar when a subscription changes the product."
      },
      "SubscriptionProductUpdatedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "old_product_id": {
            "type": "string",
            "title": "Old Product Id"
          },
          "new_product_id": {
            "type": "string",
            "title": "New Product Id"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "old_product_id",
          "new_product_id"
        ],
        "title": "SubscriptionProductUpdatedMetadata"
      },
      "SubscriptionProrationBehavior": {
        "type": "string",
        "enum": [
          "invoice",
          "prorate",
          "next_period",
          "reset"
        ],
        "title": "SubscriptionProrationBehavior"
      },
      "SubscriptionReactivatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.reactivated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionReactivatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionReactivatedEvent",
        "description": "An event created by Polar when a past due subscription is recovered."
      },
      "SubscriptionReactivatedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          }
        },
        "type": "object",
        "required": [
          "subscription_id"
        ],
        "title": "SubscriptionReactivatedMetadata"
      },
      "SubscriptionReinstatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.reinstated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionReinstatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionReinstatedEvent",
        "description": "An event created by Polar when a canceled subscription is reinstated."
      },
      "SubscriptionReinstatedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          }
        },
        "type": "object",
        "required": [
          "subscription_id"
        ],
        "title": "SubscriptionReinstatedMetadata"
      },
      "SubscriptionResume": {
        "properties": {
          "resume": {
            "type": "boolean",
            "const": true,
            "title": "Resume",
            "description": "Resume a paused subscription immediately, starting a new billing period and charging the customer.",
            "x-polar-cli-confirm": {
              "equals": true
            }
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "resume"
        ],
        "title": "SubscriptionResume"
      },
      "SubscriptionResumedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.resumed",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionResumedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionResumedEvent",
        "description": "An event created by Polar when a paused subscription is resumed."
      },
      "SubscriptionResumedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          }
        },
        "type": "object",
        "required": [
          "subscription_id"
        ],
        "title": "SubscriptionResumedMetadata"
      },
      "SubscriptionRevoke": {
        "properties": {
          "customer_cancellation_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCancellationReason"
              },
              {
                "type": "null"
              }
            ],
            "description": "Customer reason for cancellation.\n\nHelpful to monitor reasons behind churn for future improvements.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you know based on direct conversations, i.e support, with\nthe customer.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s)."
          },
          "customer_cancellation_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Cancellation Comment",
            "description": "Customer feedback and why they decided to cancel.\n\n**IMPORTANT:**\nDo not use this to store internal notes! It's intended to be input\nfrom the customer and is therefore also available in their Polar\npurchases library.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you copy a message directly from a customer\nconversation, i.e support."
          },
          "revoke": {
            "type": "boolean",
            "const": true,
            "title": "Revoke",
            "description": "Cancel and revoke an active subscription immediately",
            "x-polar-cli-confirm": {
              "equals": true
            }
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "revoke"
        ],
        "title": "SubscriptionRevoke"
      },
      "SubscriptionRevokedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.revoked",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionRevokedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionRevokedEvent",
        "description": "An event created by Polar when a subscription is revoked from a customer."
      },
      "SubscriptionRevokedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          }
        },
        "type": "object",
        "required": [
          "subscription_id"
        ],
        "title": "SubscriptionRevokedMetadata"
      },
      "SubscriptionSeatsUpdatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.seats_updated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionSeatsUpdatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionSeatsUpdatedEvent",
        "description": "An event created by Polar when a the seats on a subscription is changed."
      },
      "SubscriptionSeatsUpdatedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "old_seats": {
            "type": "integer",
            "title": "Old Seats"
          },
          "new_seats": {
            "type": "integer",
            "title": "New Seats"
          },
          "proration_behavior": {
            "type": "string",
            "title": "Proration Behavior"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "old_seats",
          "new_seats",
          "proration_behavior"
        ],
        "title": "SubscriptionSeatsUpdatedMetadata"
      },
      "SubscriptionSortProperty": {
        "type": "string",
        "enum": [
          "customer",
          "-customer",
          "status",
          "-status",
          "started_at",
          "-started_at",
          "current_period_end",
          "-current_period_end",
          "ended_at",
          "-ended_at",
          "ends_at",
          "-ends_at",
          "amount",
          "-amount",
          "product",
          "-product",
          "discount",
          "-discount"
        ],
        "title": "SubscriptionSortProperty"
      },
      "SubscriptionStatus": {
        "type": "string",
        "enum": [
          "incomplete",
          "incomplete_expired",
          "trialing",
          "active",
          "past_due",
          "canceled",
          "unpaid",
          "paused"
        ],
        "title": "SubscriptionStatus"
      },
      "SubscriptionUncanceledEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.uncanceled",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionUncanceledMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionUncanceledEvent",
        "description": "An event created by Polar when a subscription cancellation is reversed."
      },
      "SubscriptionUncanceledMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "type": "string",
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "type": "integer",
            "title": "Recurring Interval Count"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "product_id",
          "amount",
          "currency",
          "recurring_interval",
          "recurring_interval_count"
        ],
        "title": "SubscriptionUncanceledMetadata"
      },
      "SubscriptionUnitsUpdatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.units_updated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionUnitsUpdatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionUnitsUpdatedEvent",
        "description": "An event created by Polar when the units on a subscription are changed."
      },
      "SubscriptionUnitsUpdatedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          },
          "old_units": {
            "type": "integer",
            "title": "Old Units"
          },
          "new_units": {
            "type": "integer",
            "title": "New Units"
          },
          "proration_behavior": {
            "type": "string",
            "title": "Proration Behavior"
          }
        },
        "type": "object",
        "required": [
          "subscription_id",
          "old_units",
          "new_units",
          "proration_behavior"
        ],
        "title": "SubscriptionUnitsUpdatedMetadata"
      },
      "SubscriptionUpdate": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SubscriptionUpdateBase"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUpdateSeats"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUpdateUnits"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUpdateBillingPeriod"
          },
          {
            "$ref": "#/components/schemas/SubscriptionCancel"
          },
          {
            "$ref": "#/components/schemas/SubscriptionRevoke"
          },
          {
            "$ref": "#/components/schemas/SubscriptionPause"
          },
          {
            "$ref": "#/components/schemas/SubscriptionResume"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUpdateClear"
          }
        ]
      },
      "SubscriptionUpdateBase": {
        "properties": {
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "propertyNames": {
              "maxLength": 40,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Metadata",
            "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "Update subscription to another product.",
            "examples": [
              "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23"
            ]
          },
          "proration_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubscriptionProrationBehavior"
              },
              {
                "type": "null"
              }
            ],
            "description": "Determine how to handle the proration billing. If not provided, will use the default organization setting."
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id",
            "description": "Update the subscription to apply a new discount. If set to `null`, the discount will be removed. The change will be applied on the next billing cycle."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "string",
                "const": "now"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial End",
            "description": "Set or extend the trial period of the subscription. If set to `now`, the trial will end immediately and the first billing cycle will be charged synchronously. The subscription remains trialing if the payment fails."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SubscriptionUpdateBase"
      },
      "SubscriptionUpdateBillingPeriod": {
        "properties": {
          "current_billing_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Billing Period End",
            "description": "Set a new date for the end of the current billing period. The subscription will renew on this date. The new date can be earlier or later than the current period end, as long as it's in the future.\n\nIf the subscription is set to cancel at the end of the period, it'll end on this new date instead.\n\nIt is not possible to update the current billing period on a subscription that's already revoked or not active.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "current_billing_period_end"
        ],
        "title": "SubscriptionUpdateBillingPeriod"
      },
      "SubscriptionUpdateClear": {
        "properties": {
          "pending_update": {
            "type": "null",
            "title": "Pending Update",
            "description": "Clear the pending subscription update. Set to null to remove scheduled changes."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pending_update"
        ],
        "title": "SubscriptionUpdateClear"
      },
      "SubscriptionUpdateClearedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.update_cleared",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionUpdateClearedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionUpdateClearedEvent",
        "description": "An event created by Polar when a pending subscription update is cleared without being applied."
      },
      "SubscriptionUpdateClearedMetadata": {
        "properties": {
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          }
        },
        "type": "object",
        "required": [
          "subscription_id"
        ],
        "title": "SubscriptionUpdateClearedMetadata"
      },
      "SubscriptionUpdateSeats": {
        "properties": {
          "seats": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Seats",
            "description": "Update the number of seats for this subscription."
          },
          "proration_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubscriptionProrationBehavior"
              },
              {
                "type": "null"
              }
            ],
            "description": "Determine how to handle the proration billing. If not provided, will use the default organization setting."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "seats"
        ],
        "title": "SubscriptionUpdateSeats"
      },
      "SubscriptionUpdateUnits": {
        "properties": {
          "units": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Units",
            "description": "Update the number of units for this subscription."
          },
          "proration_behavior": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubscriptionProrationBehavior"
              },
              {
                "type": "null"
              }
            ],
            "description": "Determine how to handle the proration billing. If not provided, will use the default organization setting."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "units"
        ],
        "title": "SubscriptionUpdateUnits"
      },
      "SubscriptionUpdatedEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "source": {
            "type": "string",
            "const": "system",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "name": {
            "type": "string",
            "const": "subscription.updated",
            "title": "Name",
            "description": "The name of the event."
          },
          "metadata": {
            "$ref": "#/components/schemas/SubscriptionUpdatedMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "source",
          "name",
          "metadata"
        ],
        "title": "SubscriptionUpdatedEvent",
        "description": "An event created by Polar when a subscription is updated."
      },
      "SubscriptionUpdatedMetadata": {
        "properties": {
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "proration_behavior": {
            "$ref": "#/components/schemas/SubscriptionProrationBehavior"
          },
          "discount_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Id"
          },
          "trial_end": {
            "type": "string",
            "title": "Trial End"
          },
          "seats": {
            "type": "integer",
            "title": "Seats"
          },
          "units": {
            "type": "integer",
            "title": "Units"
          },
          "billing_period_end": {
            "type": "string",
            "title": "Billing Period End"
          },
          "subscription_id": {
            "type": "string",
            "title": "Subscription Id"
          }
        },
        "type": "object",
        "required": [
          "subscription_id"
        ],
        "title": "SubscriptionUpdatedMetadata"
      },
      "SubscriptionUser": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "public_name": {
            "type": "string",
            "title": "Public Name"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "github_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Github Username"
          }
        },
        "type": "object",
        "required": [
          "id",
          "public_name"
        ],
        "title": "SubscriptionUser"
      },
      "SupportCaseAttachmentFileCreate": {
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "mime_type": {
            "type": "string",
            "pattern": "^(image\\/(jpeg|png|gif|webp)|video\\/(mp4|quicktime|webm)|application\\/pdf|text\\/(csv|plain)|application\\/msword|application\\/vnd\\.openxmlformats-officedocument\\.wordprocessingml\\.document|application\\/vnd\\.ms-excel|application\\/vnd\\.openxmlformats-officedocument\\.spreadsheetml\\.sheet)$",
            "title": "Mime Type",
            "description": "MIME type of the file. Images, videos, PDF, CSV, plain text, Word and Excel documents are supported."
          },
          "size": {
            "type": "integer",
            "maximum": 262144000.0,
            "title": "Size",
            "description": "Size of the file. A maximum of 250 MB is allowed for this type of file."
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "upload": {
            "$ref": "#/components/schemas/S3FileCreateMultipart"
          },
          "service": {
            "type": "string",
            "const": "support_case_attachment",
            "title": "Service"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "type": "object",
        "required": [
          "name",
          "mime_type",
          "size",
          "upload",
          "service"
        ],
        "title": "SupportCaseAttachmentFileCreate",
        "description": "Schema to create a file attached to a support case."
      },
      "SupportCaseAttachmentFileRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "storage_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Version"
          },
          "checksum_etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Etag"
          },
          "checksum_sha256_base64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Base64"
          },
          "checksum_sha256_hex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum Sha256 Hex"
          },
          "last_modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified At"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "service": {
            "type": "string",
            "const": "support_case_attachment",
            "title": "Service"
          },
          "is_uploaded": {
            "type": "boolean",
            "title": "Is Uploaded"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "size_readable": {
            "type": "string",
            "title": "Size Readable",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "name",
          "path",
          "mime_type",
          "size",
          "storage_version",
          "checksum_etag",
          "checksum_sha256_base64",
          "checksum_sha256_hex",
          "last_modified_at",
          "version",
          "service",
          "is_uploaded",
          "created_at",
          "size_readable"
        ],
        "title": "SupportCaseAttachmentFileRead",
        "description": "File attached to a support case (private; fetched via presigned URL)."
      },
      "SystemEvent": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/MeterCreditEvent"
          },
          {
            "$ref": "#/components/schemas/MeterResetEvent"
          },
          {
            "$ref": "#/components/schemas/BenefitGrantedEvent"
          },
          {
            "$ref": "#/components/schemas/BenefitCycledEvent"
          },
          {
            "$ref": "#/components/schemas/BenefitUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/BenefitRevokedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionCycledEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionCanceledEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionRevokedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionPastDueEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionReactivatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionReinstatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionPausedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionResumedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionMigratedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUncanceledEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionProductUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionSeatsUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUnitsUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionBillingPeriodUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUpdateClearedEvent"
          },
          {
            "$ref": "#/components/schemas/OrderPaidEvent"
          },
          {
            "$ref": "#/components/schemas/OrderRefundedEvent"
          },
          {
            "$ref": "#/components/schemas/OrderVoidedEvent"
          },
          {
            "$ref": "#/components/schemas/OrderUnvoidedEvent"
          },
          {
            "$ref": "#/components/schemas/CheckoutCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/CustomerCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/CustomerUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/CustomerDeletedEvent"
          },
          {
            "$ref": "#/components/schemas/BalanceOrderEvent"
          },
          {
            "$ref": "#/components/schemas/BalanceCreditOrderEvent"
          },
          {
            "$ref": "#/components/schemas/BalanceRefundEvent"
          },
          {
            "$ref": "#/components/schemas/BalanceRefundReversalEvent"
          },
          {
            "$ref": "#/components/schemas/BalanceDisputeEvent"
          },
          {
            "$ref": "#/components/schemas/BalanceDisputeReversalEvent"
          }
        ],
        "discriminator": {
          "propertyName": "name",
          "mapping": {
            "balance.credit_order": "#/components/schemas/BalanceCreditOrderEvent",
            "balance.dispute": "#/components/schemas/BalanceDisputeEvent",
            "balance.dispute_reversal": "#/components/schemas/BalanceDisputeReversalEvent",
            "balance.order": "#/components/schemas/BalanceOrderEvent",
            "balance.refund": "#/components/schemas/BalanceRefundEvent",
            "balance.refund_reversal": "#/components/schemas/BalanceRefundReversalEvent",
            "benefit.cycled": "#/components/schemas/BenefitCycledEvent",
            "benefit.granted": "#/components/schemas/BenefitGrantedEvent",
            "benefit.revoked": "#/components/schemas/BenefitRevokedEvent",
            "benefit.updated": "#/components/schemas/BenefitUpdatedEvent",
            "checkout.created": "#/components/schemas/CheckoutCreatedEvent",
            "customer.created": "#/components/schemas/CustomerCreatedEvent",
            "customer.deleted": "#/components/schemas/CustomerDeletedEvent",
            "customer.updated": "#/components/schemas/CustomerUpdatedEvent",
            "meter.credited": "#/components/schemas/MeterCreditEvent",
            "meter.reset": "#/components/schemas/MeterResetEvent",
            "order.paid": "#/components/schemas/OrderPaidEvent",
            "order.refunded": "#/components/schemas/OrderRefundedEvent",
            "order.unvoided": "#/components/schemas/OrderUnvoidedEvent",
            "order.voided": "#/components/schemas/OrderVoidedEvent",
            "subscription.billing_period_updated": "#/components/schemas/SubscriptionBillingPeriodUpdatedEvent",
            "subscription.canceled": "#/components/schemas/SubscriptionCanceledEvent",
            "subscription.created": "#/components/schemas/SubscriptionCreatedEvent",
            "subscription.cycled": "#/components/schemas/SubscriptionCycledEvent",
            "subscription.migrated": "#/components/schemas/SubscriptionMigratedEvent",
            "subscription.past_due": "#/components/schemas/SubscriptionPastDueEvent",
            "subscription.paused": "#/components/schemas/SubscriptionPausedEvent",
            "subscription.product_updated": "#/components/schemas/SubscriptionProductUpdatedEvent",
            "subscription.reactivated": "#/components/schemas/SubscriptionReactivatedEvent",
            "subscription.reinstated": "#/components/schemas/SubscriptionReinstatedEvent",
            "subscription.resumed": "#/components/schemas/SubscriptionResumedEvent",
            "subscription.revoked": "#/components/schemas/SubscriptionRevokedEvent",
            "subscription.seats_updated": "#/components/schemas/SubscriptionSeatsUpdatedEvent",
            "subscription.uncanceled": "#/components/schemas/SubscriptionUncanceledEvent",
            "subscription.units_updated": "#/components/schemas/SubscriptionUnitsUpdatedEvent",
            "subscription.update_cleared": "#/components/schemas/SubscriptionUpdateClearedEvent",
            "subscription.updated": "#/components/schemas/SubscriptionUpdatedEvent"
          }
        }
      },
      "TaxBehavior": {
        "type": "string",
        "enum": [
          "inclusive",
          "exclusive"
        ],
        "title": "TaxBehavior"
      },
      "TaxBehaviorOption": {
        "type": "string",
        "enum": [
          "location",
          "inclusive",
          "exclusive"
        ],
        "title": "TaxBehaviorOption"
      },
      "TaxIDFormat": {
        "type": "string",
        "enum": [
          "ad_nrt",
          "ae_trn",
          "ar_cuit",
          "au_abn",
          "au_arn",
          "bg_uic",
          "bh_vat",
          "bo_tin",
          "br_cnpj",
          "br_cpf",
          "ca_bn",
          "ca_gst_hst",
          "ca_pst_bc",
          "ca_pst_mb",
          "ca_pst_sk",
          "ca_qst",
          "ch_uid",
          "ch_vat",
          "cl_tin",
          "cn_tin",
          "co_nit",
          "cr_tin",
          "de_stn",
          "do_rcn",
          "ec_ruc",
          "eg_tin",
          "es_cif",
          "eu_oss_vat",
          "eu_vat",
          "gb_vat",
          "ge_vat",
          "hk_br",
          "hr_oib",
          "hu_tin",
          "id_npwp",
          "il_vat",
          "in_gst",
          "is_vat",
          "jp_cn",
          "jp_rn",
          "jp_trn",
          "ke_pin",
          "kr_brn",
          "kz_bin",
          "li_uid",
          "mk_vat",
          "mx_rfc",
          "my_frp",
          "my_itn",
          "my_sst",
          "ng_tin",
          "no_vat",
          "no_voec",
          "nz_gst",
          "om_vat",
          "pe_ruc",
          "ph_tin",
          "ro_tin",
          "rs_pib",
          "ru_inn",
          "ru_kpp",
          "sa_vat",
          "sg_gst",
          "sg_uen",
          "si_tin",
          "sv_nit",
          "th_vat",
          "tr_tin",
          "tw_vat",
          "ua_vat",
          "us_ein",
          "uy_ruc",
          "ve_rif",
          "vn_tin",
          "za_vat",
          "mu_tan"
        ],
        "title": "TaxIDFormat",
        "description": "List of supported tax ID formats.\n\nRef: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id"
      },
      "Tier": {
        "properties": {
          "bound": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Bound"
          },
          "unit_amount": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unit Amount"
          }
        },
        "type": "object",
        "required": [
          "unit_amount"
        ],
        "title": "Tier",
        "description": "A per-unit rate up to and including `bound`.\n\nEach tier starts where the previous one ended. The first starts at\nzero. `bound` is None on the last tier if it's unbounded. Rates are\nin cents and may be fractional.\n\nRates carry no precision bound: this schema reads stored rows, and a\nbound tightened later would stop them loading. `TierInput` holds the\nrules new rates must meet."
      },
      "TierInput": {
        "properties": {
          "bound": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Bound"
          },
          "unit_amount": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 9.223372036854776e+18,
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,19}|(?=[\\d.]{1,32}0*$)\\d{0,19}\\.\\d{0,12}0*$)"
              }
            ],
            "title": "Unit Amount"
          }
        },
        "type": "object",
        "required": [
          "unit_amount"
        ],
        "title": "TierInput",
        "description": "A tier submitted through the API. Rates stop at the reach of the\nBigInteger amount columns, with 12 decimal places."
      },
      "TierType": {
        "type": "string",
        "enum": [
          "volume",
          "graduated"
        ],
        "title": "TierType"
      },
      "Tiers": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TierType"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/Tier"
            },
            "type": "array",
            "minItems": 1,
            "title": "Tiers"
          }
        },
        "type": "object",
        "required": [
          "type",
          "tiers"
        ],
        "title": "Tiers",
        "description": "The structure of the shared tiers JSONB column, used by every tiered\nprice type. Purchasable quantity bounds live in the `minimum_units` and\n`maximum_units` columns, not here."
      },
      "TiersInput": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TierType"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/TierInput"
            },
            "type": "array",
            "minItems": 1,
            "title": "Tiers"
          }
        },
        "type": "object",
        "required": [
          "type",
          "tiers"
        ],
        "title": "TiersInput",
        "description": "Tiers submitted through the API. Kept apart from `Tiers` so tightening\na rule here never stops a stored row from loading."
      },
      "TimeInterval": {
        "type": "string",
        "enum": [
          "year",
          "month",
          "week",
          "day",
          "hour"
        ],
        "title": "TimeInterval"
      },
      "TokenResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "token_type": {
            "type": "string",
            "const": "Bearer",
            "title": "Token Type"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In"
          },
          "refresh_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refresh Token"
          },
          "scope": {
            "type": "string",
            "title": "Scope"
          },
          "id_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id Token"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "token_type",
          "expires_in",
          "scope"
        ],
        "title": "TokenResponse"
      },
      "TrialAlreadyRedeemed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "TrialAlreadyRedeemed",
            "title": "Error",
            "examples": [
              "TrialAlreadyRedeemed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "TrialAlreadyRedeemed"
      },
      "TrialInterval": {
        "type": "string",
        "enum": [
          "day",
          "week",
          "month",
          "year"
        ],
        "title": "TrialInterval"
      },
      "Unauthorized": {
        "properties": {
          "error": {
            "type": "string",
            "const": "Unauthorized",
            "title": "Error",
            "examples": [
              "Unauthorized"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "Unauthorized"
      },
      "UniqueAggregation": {
        "properties": {
          "func": {
            "type": "string",
            "const": "unique",
            "title": "Func",
            "default": "unique"
          },
          "property": {
            "type": "string",
            "title": "Property"
          }
        },
        "type": "object",
        "required": [
          "property"
        ],
        "title": "UniqueAggregation"
      },
      "UpdateSubscriptionPlanNotAllowed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "UpdateSubscriptionPlanNotAllowed",
            "title": "Error",
            "examples": [
              "UpdateSubscriptionPlanNotAllowed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "UpdateSubscriptionPlanNotAllowed"
      },
      "UpdateSubscriptionSeatsNotAllowed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "UpdateSubscriptionSeatsNotAllowed",
            "title": "Error",
            "examples": [
              "UpdateSubscriptionSeatsNotAllowed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "UpdateSubscriptionSeatsNotAllowed"
      },
      "UpdateSubscriptionUnitsNotAllowed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "UpdateSubscriptionUnitsNotAllowed",
            "title": "Error",
            "examples": [
              "UpdateSubscriptionUnitsNotAllowed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "UpdateSubscriptionUnitsNotAllowed"
      },
      "UserEvent": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "The timestamp of the event.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The ID of the organization owning the event.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "ID of the customer in your Polar organization associated with the event."
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The customer associated with the event."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "ID of the customer in your system associated with the event."
          },
          "member_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Member Id",
            "description": "ID of the member within the customer's organization who performed the action inside B2B."
          },
          "external_member_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Member Id",
            "description": "ID of the member in your system within the customer's organization who performed the action inside B2B."
          },
          "child_count": {
            "type": "integer",
            "title": "Child Count",
            "description": "Number of direct child events linked to this event.",
            "default": 0
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id",
            "description": "The ID of the parent event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human readable label of the event type."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the event."
          },
          "source": {
            "type": "string",
            "const": "user",
            "title": "Source",
            "description": "The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API."
          },
          "metadata": {
            "$ref": "#/components/schemas/EventMetadataOutput"
          }
        },
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "organization_id",
          "customer_id",
          "customer",
          "external_customer_id",
          "label",
          "name",
          "source",
          "metadata"
        ],
        "title": "UserEvent",
        "description": "An event you created through the ingestion API."
      },
      "UserInfoOrganization": {
        "properties": {
          "sub": {
            "type": "string",
            "title": "Sub"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "sub"
        ],
        "title": "UserInfoOrganization"
      },
      "UserInfoUser": {
        "properties": {
          "sub": {
            "type": "string",
            "title": "Sub"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "email_verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Verified"
          }
        },
        "type": "object",
        "required": [
          "sub"
        ],
        "title": "UserInfoUser"
      },
      "ValidatedLicenseKey": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id"
          },
          "customer": {
            "$ref": "#/components/schemas/LicenseKeyCustomer"
          },
          "benefit_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Benefit Id",
            "description": "The benefit ID."
          },
          "key": {
            "type": "string",
            "title": "Key"
          },
          "display_key": {
            "type": "string",
            "title": "Display Key"
          },
          "status": {
            "type": "string",
            "const": "granted",
            "title": "Status"
          },
          "limit_activations": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Activations"
          },
          "usage": {
            "type": "integer",
            "title": "Usage"
          },
          "limit_usage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usage"
          },
          "validations": {
            "type": "integer",
            "title": "Validations"
          },
          "last_validated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Validated At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "activation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LicenseKeyActivationBase"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "organization_id",
          "customer_id",
          "customer",
          "benefit_id",
          "key",
          "display_key",
          "status",
          "limit_activations",
          "usage",
          "limit_usage",
          "validations",
          "last_validated_at",
          "expires_at"
        ],
        "title": "ValidatedLicenseKey"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "Visibility": {
        "type": "string",
        "enum": [
          "draft",
          "private",
          "public"
        ],
        "title": "Visibility"
      },
      "WebhookBenefitCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "benefit.created",
            "title": "Type",
            "examples": [
              "benefit.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Benefit",
            "title": "Benefit"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookBenefitCreatedPayload",
        "description": "Sent when a new benefit is created.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookBenefitGrantCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "benefit_grant.created",
            "title": "Type",
            "examples": [
              "benefit_grant.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/BenefitGrantWebhook",
            "title": "BenefitGrantWebhook"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookBenefitGrantCreatedPayload",
        "description": "Sent when a new benefit grant is created.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookBenefitGrantCycledPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "benefit_grant.cycled",
            "title": "Type",
            "examples": [
              "benefit_grant.cycled"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/BenefitGrantWebhook",
            "title": "BenefitGrantWebhook"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookBenefitGrantCycledPayload",
        "description": "Sent when a benefit grant is cycled,\nmeaning the related subscription has been renewed for another period.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookBenefitGrantRevokedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "benefit_grant.revoked",
            "title": "Type",
            "examples": [
              "benefit_grant.revoked"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/BenefitGrantWebhook",
            "title": "BenefitGrantWebhook"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookBenefitGrantRevokedPayload",
        "description": "Sent when a benefit grant is revoked.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookBenefitGrantUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "benefit_grant.updated",
            "title": "Type",
            "examples": [
              "benefit_grant.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/BenefitGrantWebhook",
            "title": "BenefitGrantWebhook"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookBenefitGrantUpdatedPayload",
        "description": "Sent when a benefit grant is updated.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookBenefitUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "benefit.updated",
            "title": "Type",
            "examples": [
              "benefit.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Benefit",
            "title": "Benefit"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookBenefitUpdatedPayload",
        "description": "Sent when a benefit is updated.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookCheckoutCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "checkout.created",
            "title": "Type",
            "examples": [
              "checkout.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Checkout"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCheckoutCreatedPayload",
        "description": "Sent when a new checkout is created.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookCheckoutExpiredPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "checkout.expired",
            "title": "Type",
            "examples": [
              "checkout.expired"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Checkout"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCheckoutExpiredPayload",
        "description": "Sent when a checkout expires.\n\nThis event fires when a checkout reaches its expiration time without being completed.\nDevelopers can use this to send reminder emails or track checkout abandonment.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookCheckoutUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "checkout.updated",
            "title": "Type",
            "examples": [
              "checkout.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Checkout"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCheckoutUpdatedPayload",
        "description": "Sent when a checkout is updated.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookCustomerCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "customer.created",
            "title": "Type",
            "examples": [
              "customer.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Customer"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCustomerCreatedPayload",
        "description": "Sent when a new customer is created.\n\nA customer can be created:\n\n* After a successful checkout.\n* Programmatically via the API.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookCustomerDeletedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "customer.deleted",
            "title": "Type",
            "examples": [
              "customer.deleted"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Customer"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCustomerDeletedPayload",
        "description": "Sent when a customer is deleted.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookCustomerSeatAssignedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "customer_seat.assigned",
            "title": "Type",
            "examples": [
              "customer_seat.assigned"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/CustomerSeat"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCustomerSeatAssignedPayload",
        "description": "Sent when a new customer seat is assigned.\n\nThis event is triggered when a seat is assigned to a customer by the organization.\nThe customer will receive an invitation email to claim the seat."
      },
      "WebhookCustomerSeatClaimedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "customer_seat.claimed",
            "title": "Type",
            "examples": [
              "customer_seat.claimed"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/CustomerSeat"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCustomerSeatClaimedPayload",
        "description": "Sent when a customer seat is claimed.\n\nThis event is triggered when a customer accepts the seat invitation and claims their access."
      },
      "WebhookCustomerSeatRevokedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "customer_seat.revoked",
            "title": "Type",
            "examples": [
              "customer_seat.revoked"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/CustomerSeat"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCustomerSeatRevokedPayload",
        "description": "Sent when a customer seat is revoked.\n\nThis event is triggered when access to a seat is revoked, either manually by the organization or automatically when a subscription is canceled."
      },
      "WebhookCustomerStateChangedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "customer.state_changed",
            "title": "Type",
            "examples": [
              "customer.state_changed"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/CustomerState"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCustomerStateChangedPayload",
        "description": "Sent when a customer state has changed.\n\nIt's triggered when:\n\n* Customer is created, updated or deleted.\n* A subscription is created or updated.\n* A benefit is granted or revoked.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookCustomerUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "customer.updated",
            "title": "Type",
            "examples": [
              "customer.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Customer"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookCustomerUpdatedPayload",
        "description": "Sent when a customer is updated.\n\nThis event is fired when the customer details are updated.\n\nIf you want to be notified when a customer subscription or benefit state changes, you should listen to the `customer_state_changed` event.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookDelivery": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "succeeded": {
            "type": "boolean",
            "title": "Succeeded",
            "description": "Whether the delivery was successful."
          },
          "http_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Http Code",
            "description": "The HTTP code returned by the URL. `null` if the endpoint was unreachable."
          },
          "response": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response",
            "description": "The response body returned by the URL, or the error message if the endpoint was unreachable."
          },
          "webhook_event": {
            "$ref": "#/components/schemas/WebhookEvent",
            "description": "The webhook event sent by this delivery."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "succeeded",
          "http_code",
          "response",
          "webhook_event"
        ],
        "title": "WebhookDelivery",
        "description": "A webhook delivery for a webhook event."
      },
      "WebhookDiscountCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "discount.created",
            "title": "Type",
            "examples": [
              "discount.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Discount",
            "title": "Discount"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookDiscountCreatedPayload",
        "description": "Sent when a new discount is created.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookDiscountDeletedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "discount.deleted",
            "title": "Type",
            "examples": [
              "discount.deleted"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Discount",
            "title": "Discount"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookDiscountDeletedPayload",
        "description": "Sent when a discount is deleted.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookDiscountUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "discount.updated",
            "title": "Type",
            "examples": [
              "discount.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Discount",
            "title": "Discount"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookDiscountUpdatedPayload",
        "description": "Sent when a discount is updated.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookEndpoint": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The URL where the webhook events will be sent.",
            "examples": [
              "https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "An optional name for the webhook endpoint to help organize and identify it."
          },
          "api_version": {
            "type": "string",
            "title": "Api Version",
            "description": "The API version that'll be used in event payloads."
          },
          "format": {
            "$ref": "#/components/schemas/WebhookFormat",
            "description": "The format of the webhook payload."
          },
          "secret": {
            "type": "string",
            "title": "Secret",
            "description": "The secret used to sign the webhook events.",
            "examples": [
              "whsec_ovyN6cPrTv56AApvzCaJno08SSmGJmgbWilb33N2JuK"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID associated with the webhook endpoint."
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "type": "array",
            "title": "Events",
            "description": "The events that will trigger the webhook."
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether the webhook endpoint is enabled and will receive events."
          },
          "uses_standard_webhook_signature": {
            "type": "boolean",
            "title": "Uses Standard Webhook Signature",
            "description": "Whether Polar signs deliveries to this endpoint with Standard Webhooks. False means Polar's original HMAC over the UTF-8 bytes of the full secret.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "url",
          "api_version",
          "format",
          "secret",
          "organization_id",
          "events",
          "enabled",
          "uses_standard_webhook_signature"
        ],
        "title": "WebhookEndpoint",
        "description": "A webhook endpoint."
      },
      "WebhookEndpointCreate": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Url",
            "description": "The URL where the webhook events will be sent.",
            "examples": [
              "https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "An optional name for the webhook endpoint to help organize and identify it."
          },
          "api_version": {
            "type": "string",
            "enum": [
              "2026-04"
            ],
            "title": "Api Version",
            "description": "The API version that'll be used in event payloads.",
            "default": "2026-10"
          },
          "format": {
            "$ref": "#/components/schemas/WebhookFormat",
            "description": "The format of the webhook payload."
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "type": "array",
            "title": "Events",
            "description": "The events that will trigger the webhook."
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id",
            "description": "The organization ID associated with the webhook endpoint. **Required unless you use an organization token.**"
          }
        },
        "type": "object",
        "required": [
          "url",
          "format",
          "events"
        ],
        "title": "DeprecatedWebhookEndpointCreateWithSecret"
      },
      "WebhookEndpointUpdate": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2083,
                "minLength": 1,
                "format": "uri",
                "description": "The URL where the webhook events will be sent.",
                "examples": [
                  "https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "An optional name for the webhook endpoint to help organize and identify it."
          },
          "api_version": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "2026-04"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Version",
            "description": "The API version that'll be used in event payloads."
          },
          "format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookFormat",
                "description": "The format of the webhook payload."
              },
              {
                "type": "null"
              }
            ]
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WebhookEventType"
                },
                "type": "array",
                "description": "The events that will trigger the webhook."
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled",
            "description": "Whether the webhook endpoint is enabled.",
            "x-polar-cli-confirm": {
              "equals": false
            }
          }
        },
        "type": "object",
        "title": "DeprecatedWebhookEndpointUpdateWithSecret"
      },
      "WebhookEvent": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object.",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-01-01T00:00:00.000000Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "last_http_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Http Code",
            "description": "Last HTTP code returned by the URL. `null` if no delviery has been attempted or if the endpoint was unreachable."
          },
          "succeeded": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Succeeded",
            "description": "Whether this event was successfully delivered. `null` if no delivery has been attempted."
          },
          "skipped": {
            "type": "boolean",
            "title": "Skipped",
            "description": "Whether this event was skipped because the webhook endpoint was disabled."
          },
          "api_version": {
            "type": "string",
            "title": "Api Version",
            "description": "The API version used in the payload of this event."
          },
          "payload": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payload",
            "description": "The payload of the webhook event."
          },
          "type": {
            "$ref": "#/components/schemas/WebhookEventType",
            "description": "The type of the webhook event."
          },
          "is_archived": {
            "type": "boolean",
            "title": "Is Archived",
            "description": "Whether this event is archived. Archived events can't be redelivered, and the payload is not accessible anymore."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "skipped",
          "api_version",
          "payload",
          "type",
          "is_archived"
        ],
        "title": "WebhookEvent",
        "description": "A webhook event.\n\nAn event represent something that happened in the system\nthat should be sent to the webhook endpoint.\n\nIt can be delivered multiple times until it's marked as succeeded,\neach one creating a new delivery."
      },
      "WebhookEventType": {
        "type": "string",
        "enum": [
          "checkout.created",
          "checkout.updated",
          "checkout.expired",
          "customer.created",
          "customer.updated",
          "customer.deleted",
          "customer.state_changed",
          "customer_seat.assigned",
          "customer_seat.claimed",
          "customer_seat.revoked",
          "member.created",
          "member.updated",
          "member.deleted",
          "order.created",
          "order.updated",
          "order.paid",
          "order.refunded",
          "subscription.created",
          "subscription.updated",
          "subscription.active",
          "subscription.canceled",
          "subscription.uncanceled",
          "subscription.cycled",
          "subscription.revoked",
          "subscription.past_due",
          "subscription.paused",
          "subscription.resumed",
          "subscription.migrated",
          "refund.created",
          "refund.updated",
          "product.created",
          "product.updated",
          "discount.created",
          "discount.updated",
          "discount.deleted",
          "benefit.created",
          "benefit.updated",
          "benefit_grant.created",
          "benefit_grant.cycled",
          "benefit_grant.updated",
          "benefit_grant.revoked",
          "organization.updated"
        ],
        "title": "WebhookEventType"
      },
      "WebhookFormat": {
        "type": "string",
        "enum": [
          "raw",
          "discord",
          "slack"
        ],
        "title": "WebhookFormat"
      },
      "WebhookMemberCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "member.created",
            "title": "Type",
            "examples": [
              "member.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookMemberCreatedPayload",
        "description": "Sent when a new member is created.\n\nA member represents an individual within a customer (team).\nThis event is triggered when a member is added to a customer,\neither programmatically via the API or when an owner is automatically\ncreated for a new customer.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookMemberDeletedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "member.deleted",
            "title": "Type",
            "examples": [
              "member.deleted"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookMemberDeletedPayload",
        "description": "Sent when a member is deleted.\n\nThis event is triggered when a member is removed from a customer.\nAny active seats assigned to the member will be automatically revoked.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookMemberUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "member.updated",
            "title": "Type",
            "examples": [
              "member.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookMemberUpdatedPayload",
        "description": "Sent when a member is updated.\n\nThis event is triggered when member details are updated,\nsuch as their name or role within the customer.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookOrderCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "order.created",
            "title": "Type",
            "examples": [
              "order.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookOrderCreatedPayload",
        "description": "Sent when a new order is created.\n\nA new order is created when:\n\n* A customer purchases a one-time product. In this case, `billing_reason` is set to `purchase`.\n* A customer starts a subscription. In this case, `billing_reason` is set to `subscription_create`.\n* A subscription is renewed. In this case, `billing_reason` is set to `subscription_cycle`.\n* A subscription is upgraded or downgraded with an immediate proration invoice. In this case, `billing_reason` is set to `subscription_update`.\n\n> [!WARNING]\n> The order might not be paid yet, so the `status` field might be `pending`.\n\n**Discord & Slack support:** Full"
      },
      "WebhookOrderPaidPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "order.paid",
            "title": "Type",
            "examples": [
              "order.paid"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookOrderPaidPayload",
        "description": "Sent when an order is paid.\n\nWhen you receive this event, the order is fully processed and payment has been received.\n\n**Discord & Slack support:** Full"
      },
      "WebhookOrderRefundedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "order.refunded",
            "title": "Type",
            "examples": [
              "order.refunded"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookOrderRefundedPayload",
        "description": "Sent when an order is fully or partially refunded.\n\n**Discord & Slack support:** Full"
      },
      "WebhookOrderUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "order.updated",
            "title": "Type",
            "examples": [
              "order.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookOrderUpdatedPayload",
        "description": "Sent when an order is updated.\n\nAn order is updated when:\n\n* Its status changes, e.g. from `pending` to `paid`.\n* It's refunded, partially or fully.\n\n**Discord & Slack support:** Full"
      },
      "WebhookOrganizationUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "organization.updated",
            "title": "Type",
            "examples": [
              "organization.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Organization"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookOrganizationUpdatedPayload",
        "description": "Sent when a organization is updated.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookProductCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "product.created",
            "title": "Type",
            "examples": [
              "product.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Product"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookProductCreatedPayload",
        "description": "Sent when a new product is created.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookProductUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "product.updated",
            "title": "Type",
            "examples": [
              "product.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Product"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookProductUpdatedPayload",
        "description": "Sent when a product is updated.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookRefundCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "refund.created",
            "title": "Type",
            "examples": [
              "refund.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Refund"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookRefundCreatedPayload",
        "description": "Sent when a refund is created regardless of status.\n\n**Discord & Slack support:** Full"
      },
      "WebhookRefundUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "refund.updated",
            "title": "Type",
            "examples": [
              "refund.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Refund"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookRefundUpdatedPayload",
        "description": "Sent when a refund is updated.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionActivePayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.active",
            "title": "Type",
            "examples": [
              "subscription.active"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionActivePayload",
        "description": "Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionCanceledPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.canceled",
            "title": "Type",
            "examples": [
              "subscription.canceled"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionCanceledPayload",
        "description": "Sent when a subscription is canceled.\nCustomers might still have access until the end of the current period.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.created",
            "title": "Type",
            "examples": [
              "subscription.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionCreatedPayload",
        "description": "Sent when a new subscription is created.\n\nWhen this event occurs, the subscription `status` might not be `active` yet, as we can still have to wait for the first payment to be processed.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionCycledPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.cycled",
            "title": "Type",
            "examples": [
              "subscription.cycled"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionCycledPayload",
        "description": "Sent when a subscription enters a new billing period.\n\nThe payload carries the new `current_period_start` and `current_period_end`.\nIt fires when the period rolls over, before the renewal order exists and\nregardless of whether the renewal payment succeeds \u2014 listen to `order.paid`\nif you need the payment.\n\nA trial converting to a paid subscription starts a new period, so it fires\nthere too. Read `status` to tell the two apart.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookSubscriptionMigratedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.migrated",
            "title": "Type",
            "examples": [
              "subscription.migrated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          },
          "provider": {
            "type": "string",
            "title": "Provider",
            "description": "The billing provider the subscription was migrated from.",
            "examples": [
              "stripe"
            ]
          },
          "provider_subscription_id": {
            "type": "string",
            "title": "Provider Subscription Id",
            "description": "The identifier of the subscription on the billing provider.",
            "examples": [
              "sub_1Sabc2Def3Ghi"
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data",
          "provider",
          "provider_subscription_id"
        ],
        "title": "WebhookSubscriptionMigratedPayload",
        "description": "Sent when Polar takes over billing of a subscription migrated from another provider.\n\nThis fires at cutover, once the subscription is live on Polar. `provider`\nand `provider_subscription_id` identify the subscription on the billing\nprovider so you can correlate the two.\n\n**Discord & Slack support:** Basic"
      },
      "WebhookSubscriptionPastDuePayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.past_due",
            "title": "Type",
            "examples": [
              "subscription.past_due"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionPastDuePayload",
        "description": "Sent when a subscription payment fails and the subscription enters `past_due` status.\n\nThis is a recoverable state - the customer can update their payment method to restore the subscription.\nBenefits may be revoked depending on the organization's grace period settings.\n\nIf payment retries are exhausted, a `subscription.revoked` event will be sent.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionPausedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.paused",
            "title": "Type",
            "examples": [
              "subscription.paused"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionPausedPayload",
        "description": "Sent when a subscription is paused and the customer temporarily loses access.\n\nNo order is created while paused. The subscription resumes either on its\nscheduled resume date or when resumed manually, starting a new billing period.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionResumedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.resumed",
            "title": "Type",
            "examples": [
              "subscription.resumed"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionResumedPayload",
        "description": "Sent when a paused subscription resumes, restoring the customer's access.\n\nResuming starts a new billing period and charges the customer immediately.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionRevokedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.revoked",
            "title": "Type",
            "examples": [
              "subscription.revoked"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionRevokedPayload",
        "description": "Sent when a subscription is revoked and the user loses access immediately.\nHappens when the subscription is canceled or payment retries are exhausted (status becomes `unpaid`).\n\nFor payment failures that can still be recovered, see `subscription.past_due`.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionUncanceledPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.uncanceled",
            "title": "Type",
            "examples": [
              "subscription.uncanceled"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionUncanceledPayload",
        "description": "Sent when a customer revokes a pending cancellation.\n\nWhen a customer cancels with \"at period end\", they retain access until the\nsubscription would renew. During this time, they can change their mind and\nundo the cancellation. This event is triggered when they do so.\n\n**Discord & Slack support:** Full"
      },
      "WebhookSubscriptionUpdatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.updated",
            "title": "Type",
            "examples": [
              "subscription.updated"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "examples": [
              "2026-01-01T00:00:00.000000Z"
            ]
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "api_version",
          "data"
        ],
        "title": "WebhookSubscriptionUpdatedPayload",
        "description": "Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, `subscription.past_due`, and `subscription.revoked`.\n\nTo listen specifically for renewals, listen to `subscription.cycled`.\n\n**Discord & Slack support:** On cancellation, past due, and revocation. Renewals are skipped."
      },
      "MetadataQuery": {
        "anyOf": [
          {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                {
                  "type": "array",
                  "items": {
                    "type": "boolean"
                  }
                }
              ]
            }
          },
          {
            "type": "null"
          }
        ],
        "title": "MetadataQuery"
      },
      "AuthorizationCodeTokenRequest": {
        "properties": {
          "grant_type": {
            "const": "authorization_code",
            "title": "Grant Type",
            "type": "string"
          },
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "title": "Client Secret",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "redirect_uri": {
            "format": "uri",
            "maxLength": 2083,
            "minLength": 1,
            "title": "Redirect Uri",
            "type": "string"
          }
        },
        "required": [
          "grant_type",
          "client_id",
          "client_secret",
          "code",
          "redirect_uri"
        ],
        "title": "AuthorizationCodeTokenRequest",
        "type": "object"
      },
      "RefreshTokenRequest": {
        "properties": {
          "grant_type": {
            "const": "refresh_token",
            "title": "Grant Type",
            "type": "string"
          },
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "title": "Client Secret",
            "type": "string"
          },
          "refresh_token": {
            "title": "Refresh Token",
            "type": "string"
          }
        },
        "required": [
          "grant_type",
          "client_id",
          "client_secret",
          "refresh_token"
        ],
        "title": "RefreshTokenRequest",
        "type": "object"
      },
      "WebTokenRequest": {
        "properties": {
          "grant_type": {
            "const": "web",
            "title": "Grant Type",
            "type": "string"
          },
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "title": "Client Secret",
            "type": "string"
          },
          "session_token": {
            "title": "Session Token",
            "type": "string"
          },
          "sub_type": {
            "default": "user",
            "enum": [
              "user",
              "organization"
            ],
            "title": "Sub Type",
            "type": "string"
          },
          "sub": {
            "anyOf": [
              {
                "format": "uuid4",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sub"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Scope"
          }
        },
        "required": [
          "grant_type",
          "client_id",
          "client_secret",
          "session_token"
        ],
        "title": "WebTokenRequest",
        "type": "object"
      },
      "RevokeTokenRequest": {
        "properties": {
          "token": {
            "title": "Token",
            "type": "string"
          },
          "token_type_hint": {
            "anyOf": [
              {
                "enum": [
                  "access_token",
                  "refresh_token"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Token Type Hint"
          },
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "title": "Client Secret",
            "type": "string"
          }
        },
        "required": [
          "token",
          "client_id",
          "client_secret"
        ],
        "title": "RevokeTokenRequest",
        "type": "object"
      },
      "IntrospectTokenRequest": {
        "properties": {
          "token": {
            "title": "Token",
            "type": "string"
          },
          "token_type_hint": {
            "anyOf": [
              {
                "enum": [
                  "access_token",
                  "refresh_token"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Token Type Hint"
          },
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "title": "Client Secret",
            "type": "string"
          }
        },
        "required": [
          "token",
          "client_id",
          "client_secret"
        ],
        "title": "IntrospectTokenRequest",
        "type": "object"
      }
    },
    "securitySchemes": {
      "oidc": {
        "type": "openIdConnect",
        "openIdConnectUrl": "/.well-known/openid-configuration"
      },
      "pat": {
        "type": "http",
        "description": "You can generate a **Personal Access Token** from your [settings](https://polar.sh/settings).",
        "scheme": "bearer"
      },
      "oat": {
        "type": "http",
        "description": "You can generate an **Organization Access Token** from your organization's settings.",
        "scheme": "bearer"
      },
      "customer_session": {
        "type": "http",
        "description": "Customer session tokens are specific tokens that are used to authenticate customers on your organization. You can create those sessions programmatically using the [Create Customer Session endpoint](/api-reference/customer-sessions/create-customer-session).",
        "scheme": "bearer"
      },
      "member_session": {
        "type": "http",
        "description": "Member session tokens are specific tokens that are used to authenticate members on your organization. You can create those sessions programmatically using the [Create Member Session endpoint](/api-reference/customer-sessions/create-customer-session).",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "public",
      "description": "Endpoints shown and documented in the Polar API documentation and available in our SDKs."
    },
    {
      "name": "private",
      "description": "Endpoints that should appear in the schema only in development to generate our internal JS SDK."
    },
    {
      "name": "mcp",
      "description": "Endpoints supported by Polar's MCP server."
    },
    {
      "name": "cli",
      "description": "Endpoints exposed as commands by Polar's CLI."
    }
  ]
}