{
  "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotPermitted"
                }
              }
            }
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 product ID."
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid4",
                    "description": "The product 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": "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
                }
              ],
              "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": "subscriptions",
        "x-speakeasy-name-override": "export",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.subscriptions.export()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/subscriptions/{id}": {
      "get": {
        "tags": [
          "subscriptions",
          "public"
        ],
        "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-speakeasy-group": "subscriptions",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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": "Payment required to apply the subscription update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentFailed"
                }
              }
            }
          },
          "403": {
            "description": "Subscription is already canceled or will be at the end of the period.",
            "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": "update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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": "create",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "delete",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.authorize()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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": "token",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.request_token()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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": "revoke",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.revoke_token()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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": "introspect",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.introspect_token()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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 (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.oauth2.userinfo()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "benefits",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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}/grants": {
      "get": {
        "tags": [
          "benefits",
          "public"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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    format='raw',\n    events=['checkout.created'],\n)\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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    \"format\": \"raw\",\n    \"events\": [\n      \"checkout.created\"\n    ]\n  },\n);\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/webhooks/endpoints/{id}": {
      "get": {
        "tags": [
          "webhooks",
          "public"
        ],
        "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-speakeasy-group": "webhooks",
        "x-speakeasy-name-override": "get_webhook_endpoint",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "products",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
          }
        ]
      }
    },
    "/v1/products/{id}/benefits": {
      "post": {
        "tags": [
          "products",
          "public"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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": "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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."
          }
        ],
        "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 (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.orders.export()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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();\nconsole.log(response);\n"
          }
        ]
      }
    },
    "/v1/orders/{id}": {
      "get": {
        "tags": [
          "orders",
          "public"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
                }
              }
            }
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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"
                }
              }
            }
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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"
                }
              }
            }
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.limits()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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 (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.metrics.list_dashboards()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "license_keys",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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}/activations/{activation_id}": {
      "get": {
        "tags": [
          "license_keys",
          "public"
        ],
        "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 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": "get_activation",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
                }
              }
            }
          },
          "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": "validate",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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/LicenseKeyActivationRead"
                }
              }
            }
          },
          "403": {
            "description": "License key activation not supported or limit reached. Use /validate endpoint 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 (New SDK)",
            "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 (New SDK)",
            "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 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": "deactivate",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "checkout-links",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "custom-fields",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "discounts",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.customers.export()\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "customers",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "customers",
        "x-speakeasy-name-override": "get_external",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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/members/": {
      "get": {
        "tags": [
          "members",
          "public"
        ],
        "summary": "List Members",
        "description": "List members with optional customer ID filter.\n\n**Scopes**: `members:read` `members:write`",
        "operationId": "members:list_members",
        "security": [
          {
            "oidc": [
              "members:read",
              "members:write"
            ]
          },
          {
            "pat": [
              "members:read",
              "members:write"
            ]
          },
          {
            "oat": [
              "members:read",
              "members:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by customer ID.",
              "title": "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": "null"
                }
              ],
              "description": "Filter by customer external ID.",
              "title": "External Customer Id"
            },
            "description": "Filter by 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": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResource_Member_"
                }
              }
            }
          },
          "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": "members",
        "x-speakeasy-name-override": "list_members",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nfor item in polar.members.iter_list_members(\n    page=1,\n    limit=10,\n    sorting=['-created_at'],\n):\n    print(item)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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.members.iterListMembers(\n  {\n    \"page\": 1,\n    \"limit\": 10,\n    \"sorting\": [\n      \"-created_at\"\n    ]\n  },\n)) {\n  console.log(item);\n}\n"
          }
        ]
      }
    },
    "/v1/customers/{id}/members": {
      "post": {
        "tags": [
          "customers",
          "members",
          "public"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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": {
      "post": {
        "tags": [
          "customers",
          "members",
          "public"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "customers.members",
        "x-speakeasy-name-override": "get_external",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.benefit-grants",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerBenefitGrant"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.benefit-grants",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.benefit-grants",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "list_payment_methods",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerPaymentMethod"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "add_payment_method",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
                }
              }
            }
          },
          "400": {
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "confirm_payment_method",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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 used by active subscription(s).",
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "delete_payment_method",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "request_email_update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "check_email_update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.customers",
        "x-speakeasy-name-override": "verify_email_update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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_portal.customer_meters",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerCustomerMeter"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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_portal.customer_meters",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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 or seat-based pricing not enabled"
          },
          "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": "customer_portal.seats",
        "x-speakeasy-name-override": "list_seats",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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 or seat-based pricing not enabled"
          },
          "404": {
            "description": "Subscription, order, or customer not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "customer_portal.seats",
        "x-speakeasy-name-override": "assign_seat",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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 or seat-based pricing not enabled"
          },
          "404": {
            "description": "Seat not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "customer_portal.seats",
        "x-speakeasy-name-override": "revoke_seat",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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 or seat-based pricing not enabled"
          },
          "404": {
            "description": "Seat not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-speakeasy-group": "customer_portal.seats",
        "x-speakeasy-name-override": "resend_invitation",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.seats",
        "x-speakeasy-name-override": "list_claimed_subscriptions",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerSubscription"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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_portal.customer-session",
        "x-speakeasy-name-override": "introspect",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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_portal.customer-session",
        "x-speakeasy-name-override": "get_authenticated_user",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.downloadables",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/DownloadableRead"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.license_keys",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/LicenseKeyRead"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.license_keys",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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/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"
                }
              }
            }
          },
          "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-speakeasy-group": "customer_portal.license_keys",
        "x-speakeasy-name-override": "validate",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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/LicenseKeyActivationRead"
                }
              }
            }
          },
          "403": {
            "description": "License key activation not supported or limit reached. Use /validate endpoint 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": "customer_portal.license_keys",
        "x-speakeasy-name-override": "activate",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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 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": "customer_portal.license_keys",
        "x-speakeasy-name-override": "deactivate",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.members",
        "x-speakeasy-name-override": "list_members",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerPortalMember"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.members",
        "x-speakeasy-name-override": "add_member",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.members",
        "x-speakeasy-name-override": "update_member",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.members",
        "x-speakeasy-name-override": "remove_member",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.orders",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerOrder"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.orders",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.orders",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.orders",
        "x-speakeasy-name-override": "generate_invoice",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.orders",
        "x-speakeasy-name-override": "invoice",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.orders",
        "x-speakeasy-name-override": "receipt",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.orders",
        "x-speakeasy-name-override": "get_payment_status",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.orders",
        "x-speakeasy-name-override": "confirm_retry_payment",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.organizations",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.subscriptions",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerSubscription"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.subscriptions",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
                    }
                  ],
                  "title": "Response 403 Customer Portal:Subscriptions:Update"
                }
              }
            }
          },
          "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": "customer_portal.subscriptions",
        "x-speakeasy-name-override": "update",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.subscriptions",
        "x-speakeasy-name-override": "cancel",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.wallets",
        "x-speakeasy-name-override": "list",
        "x-polar-pagination": {
          "type": "page_limit",
          "item_schema": {
            "$ref": "#/components/schemas/CustomerWallet"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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": "customer_portal.wallets",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 or seat-based pricing not enabled"
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 or seat-based pricing not enabled"
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 or seat-based pricing not enabled"
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 or seat-based pricing not enabled"
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
                }
              }
            }
          },
          "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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 (New SDK)",
            "source": "from polar.v2026_04 import Polar\n\npolar = Polar(\"polar_oat_xxx\")\n\nresponse = polar.events.ingest(\n    events=[{'name': 'string',\n      'customer_id': '00000000-0000-4000-8000-000000000000'}],\n)\nprint(response)\n"
          },
          {
            "lang": "TypeScript (New SDK)",
            "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        \"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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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-speakeasy-group": "meters",
        "x-speakeasy-name-override": "get",
        "x-codeSamples": [
          {
            "lang": "Python (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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"
        ],
        "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 (New SDK)",
            "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 (New SDK)",
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "sidebarTitle": "subscription.resumed"
          }
        }
      }
    },
    "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "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": {
            "sidebarTitle": "benefit_grant.revoked"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Account": {
        "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name"
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_additional_info": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Additional Info"
          },
          "billing_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Notes"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "credit_balance": {
            "type": "integer",
            "title": "Credit Balance"
          },
          "payout_interval": {
            "type": "integer",
            "title": "Payout Interval",
            "description": "Minimum delay, in seconds, between two payout requests."
          },
          "payout_transaction_delay": {
            "type": "string",
            "format": "duration",
            "title": "Payout Transaction Delay",
            "description": "Delay after which a transaction becomes available for payout."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "billing_name",
          "billing_address",
          "billing_additional_info",
          "billing_notes",
          "currency",
          "credit_balance",
          "payout_interval",
          "payout_transaction_delay"
        ],
        "title": "Account"
      },
      "AccountCredit": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "used": {
            "type": "integer",
            "title": "Used"
          },
          "granted_at": {
            "type": "string",
            "format": "date-time",
            "title": "Granted At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "amount",
          "used",
          "granted_at",
          "expires_at",
          "revoked_at"
        ],
        "title": "AccountCredit"
      },
      "AccountUpdate": {
        "properties": {
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "Billing name that should appear on the reverse invoice."
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Billing address that should appear on the reverse invoice."
          },
          "billing_additional_info": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Additional Info",
            "description": "Additional information that should appear on the reverse invoice."
          },
          "billing_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Notes",
            "description": "Notes that should appear on the reverse invoice."
          }
        },
        "type": "object",
        "title": "AccountUpdate"
      },
      "AddCurrencyAction": {
        "properties": {
          "type": {
            "type": "string",
            "const": "add_currency",
            "title": "Type",
            "default": "add_currency"
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Button label."
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "Lowercase ISO code of the suggested currency, e.g. `eur`."
          }
        },
        "type": "object",
        "required": [
          "label",
          "currency"
        ],
        "title": "AddCurrencyAction",
        "description": "A nudge to offer prices in an additional presentment currency.\n\nThe client routes to the products list, where per-product pricing can be\nextended. Nothing is ever applied automatically."
      },
      "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"
      },
      "AdjustPriceAction": {
        "properties": {
          "type": {
            "type": "string",
            "const": "adjust_price",
            "title": "Type",
            "default": "adjust_price"
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Button label."
          },
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "The product whose pricing to review."
          },
          "product_name": {
            "type": "string",
            "title": "Product Name",
            "description": "Display name of the product."
          },
          "current_price_amount": {
            "type": "integer",
            "title": "Current Price Amount",
            "description": "The product's current list price, in cents."
          },
          "suggested_price_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Price Amount",
            "description": "Reference list price (cents) that would restore the target gross margin at the current cost to serve. Null when no meaningful suggestion can be computed."
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "ISO currency code of the amounts."
          }
        },
        "type": "object",
        "required": [
          "label",
          "product_id",
          "product_name",
          "current_price_amount",
          "suggested_price_amount",
          "currency"
        ],
        "title": "AdjustPriceAction",
        "description": "A recommendation to review a product's pricing, with a reference point.\n\nThe suggested amount is a *reference*, not a mandate: it's the list price\nthat would restore the target gross margin at the current cost to serve,\nignoring demand elasticity. It applies to new customers only \u2014 existing\nsubscriptions keep their price. The client routes to the product's pricing\neditor; nothing is ever applied automatically."
      },
      "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"
      },
      "AppealDecision": {
        "type": "string",
        "enum": [
          "approved",
          "rejected"
        ],
        "title": "AppealDecision"
      },
      "AppealNotRejectedError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "AppealNotRejectedError",
            "title": "Error",
            "examples": [
              "AppealNotRejectedError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "AppealNotRejectedError"
      },
      "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."
      },
      "AuthenticationSession": {
        "properties": {
          "identity_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identity Id"
          },
          "available_factors": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BaseFactor"
                },
                {
                  "$ref": "#/components/schemas/SSOFactor"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "apple": "#/components/schemas/BaseFactor",
                  "backup_codes": "#/components/schemas/BaseFactor",
                  "email_otp": "#/components/schemas/BaseFactor",
                  "github": "#/components/schemas/BaseFactor",
                  "google": "#/components/schemas/BaseFactor",
                  "sso": "#/components/schemas/SSOFactor",
                  "totp": "#/components/schemas/BaseFactor"
                }
              }
            },
            "type": "array",
            "title": "Available Factors"
          }
        },
        "type": "object",
        "required": [
          "identity_id",
          "available_factors"
        ],
        "title": "AuthenticationSession"
      },
      "AuthenticationSessionStart": {
        "properties": {
          "return_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return To"
          }
        },
        "type": "object",
        "title": "AuthenticationSessionStart"
      },
      "AuthorizeOrganization": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "slug",
          "avatar_url"
        ],
        "title": "AuthorizeOrganization"
      },
      "AuthorizeResponse": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "AuthorizeResponse"
      },
      "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"
      },
      "AvailableScope": {
        "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"
        ],
        "title": "AvailableScope"
      },
      "BackupCodesEnrollment": {
        "properties": {
          "codes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Codes"
          }
        },
        "type": "object",
        "required": [
          "codes"
        ],
        "title": "BackupCodesEnrollment"
      },
      "BackupCodesStatus": {
        "properties": {
          "codes": {
            "type": "integer",
            "title": "Codes"
          },
          "used_codes": {
            "type": "integer",
            "title": "Used Codes"
          }
        },
        "type": "object",
        "required": [
          "codes",
          "used_codes"
        ],
        "title": "BackupCodesStatus"
      },
      "BackupCodesVerify": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "BackupCodesVerify"
      },
      "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."
          },
          "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."
          },
          "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."
          },
          "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."
          },
          "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."
          },
          "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."
          },
          "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."
      },
      "BaseFactor": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "email_otp",
              "totp",
              "backup_codes",
              "apple",
              "github",
              "google"
            ],
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "BaseFactor"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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`."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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_token": {
            "type": "string",
            "title": "Guild Token"
          },
          "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_token",
          "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."
          },
          "guild_token": {
            "type": "string",
            "title": "Guild Token",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "guild_id",
          "role_id",
          "kick_member",
          "guild_token"
        ],
        "title": "BenefitDiscordProperties",
        "description": "Properties for a benefit of type `discord`."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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`."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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`."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "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": 50.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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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",
                "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"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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`."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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": {
        "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "$ref": "#/components/schemas/BenefitType",
            "description": "The type of the benefit."
          },
          "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": "BenefitPublic"
      },
      "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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"
      },
      "BlockingOrganization": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "slug",
          "name"
        ],
        "title": "BlockingOrganization",
        "description": "Organization that is blocking user deletion."
      },
      "Body_email-update_verify_email_update": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "Body_email-update:verify_email_update"
      },
      "Body_oauth2_consent": {
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "allow",
              "deny"
            ],
            "title": "Action"
          }
        },
        "type": "object",
        "required": [
          "action"
        ],
        "title": "Body_oauth2:consent"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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. Currently, only `usd` is supported.",
            "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."
      },
      "CaseAlreadyExistsError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "CaseAlreadyExistsError",
            "title": "Error",
            "examples": [
              "CaseAlreadyExistsError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "CaseAlreadyExistsError"
      },
      "CaseClosedError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "CaseClosedError",
            "title": "Error",
            "examples": [
              "CaseClosedError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "CaseClosedError"
      },
      "CaseRepliesNotSupportedError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "CaseRepliesNotSupportedError",
            "title": "Error",
            "examples": [
              "CaseRepliesNotSupportedError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "CaseRepliesNotSupportedError"
      },
      "ChannelNamePreviewRequest": {
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4",
                "description": "The organization ID.",
                "examples": [
                  "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "template": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Template"
          },
          "customer_name": {
            "type": "string",
            "title": "Customer Name",
            "default": "Sample Customer"
          },
          "customer_email": {
            "type": "string",
            "title": "Customer Email",
            "default": "customer@example.com"
          },
          "customer_metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "type": "object",
            "title": "Customer Metadata"
          }
        },
        "type": "object",
        "required": [
          "template"
        ],
        "title": "ChannelNamePreviewRequest"
      },
      "ChannelNamePreviewResponse": {
        "properties": {
          "channel_name": {
            "type": "string",
            "title": "Channel Name"
          }
        },
        "type": "object",
        "required": [
          "channel_name"
        ],
        "title": "ChannelNamePreviewResponse"
      },
      "ChannelNamePreviewValidationErrorResponse": {
        "properties": {
          "error": {
            "type": "string",
            "title": "Error"
          },
          "detail": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "ChannelNamePreviewValidationErrorResponse"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
                },
                {
                  "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."
          },
          "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)"
          },
          "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"
              },
              {
                "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",
          "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"
                },
                {
                  "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."
          },
          "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."
          },
          "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/PaymentNotReady"
          },
          {
            "$ref": "#/components/schemas/TrialAlreadyRedeemed"
          }
        ]
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "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."
          },
          "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
            },
            "type": "array",
            "title": "BenefitPublic",
            "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."
          },
          "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."
      },
      "CheckoutOrganization": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
                },
                {
                  "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)"
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
            },
            "type": "array",
            "title": "BenefitPublic",
            "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"
                },
                {
                  "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)"
          },
          "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"
                },
                {
                  "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)"
          },
          "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/ProductPriceMeteredUnitCreate"
                      }
                    ],
                    "discriminator": {
                      "propertyName": "amount_type",
                      "mapping": {
                        "custom": "#/components/schemas/ProductPriceCustomCreate",
                        "fixed": "#/components/schemas/ProductPriceFixedCreate",
                        "metered_unit": "#/components/schemas/ProductPriceMeteredUnitCreate",
                        "seat_based": "#/components/schemas/ProductPriceSeatBasedCreate"
                      }
                    }
                  },
                  "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
                },
                {
                  "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."
          },
          "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)"
          },
          "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"
              },
              {
                "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
                },
                {
                  "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."
          },
          "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)"
          },
          "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"
              },
              {
                "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",
          "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"
                },
                {
                  "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."
          },
          "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"
                },
                {
                  "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."
          },
          "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."
      },
      "ConfidenceLevel": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ],
        "title": "ConfidenceLevel",
        "description": "How much we trust an insight, derived from sample size and baseline variance.\n\nLow-confidence insights are softened or suppressed so small merchants don't\nget noise (e.g. \"churn doubled\" off a 1 -> 2 customer change)."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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/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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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/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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "CustomerBenefitGrantMeterCredit": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
          },
          "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "CustomerOAuthPlatform": {
        "type": "string",
        "enum": [
          "github",
          "discord"
        ],
        "title": "CustomerOAuthPlatform"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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)."
          },
          "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"
              },
              {
                "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
            },
            "type": "array",
            "title": "BenefitPublic",
            "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period."
          },
          "current_meter_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "The timestamp when the subscription ended."
          },
          "past_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At",
            "description": "The timestamp when the subscription was paused."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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/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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "CustomerPortalCustomer": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
            },
            "type": "array",
            "title": "BenefitPublic",
            "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invitation Token Expires At",
            "description": "When the invitation token expires"
          },
          "claimed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Claimed At",
            "description": "When the seat was claimed"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
      },
      "CustomerSelectionOption": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "The ID of the object."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The customer's name, if available."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "CustomerSelectionOption",
        "description": "Minimal customer information for disambiguation selection."
      },
      "CustomerSelectionRequiredResponse": {
        "properties": {
          "error": {
            "type": "string",
            "title": "Error",
            "default": "customer_selection_required"
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": "Multiple customers found for this email. Please select one."
          },
          "customers": {
            "items": {
              "$ref": "#/components/schemas/CustomerSelectionOption"
            },
            "type": "array",
            "title": "Customers",
            "description": "List of customers to choose from."
          }
        },
        "type": "object",
        "required": [
          "customers"
        ],
        "title": "CustomerSelectionRequiredResponse",
        "description": "Response when multiple customers match the email."
      },
      "CustomerSession": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
          },
          "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."
      },
      "CustomerSessionCodeAuthenticateRequest": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "CustomerSessionCodeAuthenticateRequest"
      },
      "CustomerSessionCodeAuthenticateResponse": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "CustomerSessionCodeAuthenticateResponse"
      },
      "CustomerSessionCodeInvalidOrExpired": {
        "properties": {
          "error": {
            "type": "string",
            "const": "CustomerSessionCodeInvalidOrExpired",
            "title": "Error",
            "examples": [
              "CustomerSessionCodeInvalidOrExpired"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "CustomerSessionCodeInvalidOrExpired"
      },
      "CustomerSessionCodeRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "Optional customer ID for disambiguation when multiple customers share the same email."
          }
        },
        "type": "object",
        "required": [
          "email",
          "organization_id"
        ],
        "title": "CustomerSessionCodeRequest"
      },
      "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"
      },
      "CustomerStat": {
        "properties": {
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "Polar customer ID."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "External customer ID."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Customer name."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Customer email."
          },
          "occurrences": {
            "type": "integer",
            "title": "Occurrences",
            "description": "Number of root events for this customer."
          },
          "totals": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "Totals",
            "description": "Aggregated totals per requested field."
          },
          "share": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Share",
            "description": "This customer's share of the total cost across all customers (0\u20131).",
            "default": "0"
          }
        },
        "type": "object",
        "required": [
          "customer_id",
          "external_customer_id",
          "occurrences"
        ],
        "title": "CustomerStat",
        "description": "Aggregated statistics for a single customer across all their root events."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
                },
                {
                  "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"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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
            ]
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period."
          },
          "current_meter_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "The timestamp when the subscription ended."
          },
          "past_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At",
            "description": "The timestamp when the subscription was paused."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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"
      },
      "CustomerSubscriptionChangePreview": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CustomerSubscriptionChangePreviewProduct"
          },
          {
            "$ref": "#/components/schemas/CustomerSubscriptionChangePreviewSeats"
          }
        ]
      },
      "CustomerSubscriptionChangePreviewProduct": {
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "Preview a change of the subscription to this product."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "product_id"
        ],
        "title": "CustomerSubscriptionChangePreviewProduct"
      },
      "CustomerSubscriptionChangePreviewSeats": {
        "properties": {
          "seats": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Seats",
            "description": "Preview a change of the subscription to this number of seats."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "seats"
        ],
        "title": "CustomerSubscriptionChangePreviewSeats"
      },
      "CustomerSubscriptionMeter": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
            },
            "type": "array",
            "title": "BenefitPublic",
            "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"
      },
      "CustomerSubscriptionRevoke": {
        "properties": {
          "cancellation_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCancellationReason"
              },
              {
                "type": "null"
              }
            ],
            "description": "Customer's reason for cancellation."
          },
          "cancellation_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancellation Comment",
            "description": "Customer feedback and why they decided to cancel."
          }
        },
        "type": "object",
        "title": "CustomerSubscriptionRevoke"
      },
      "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/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"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "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",
          "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "DiscordGuild": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "roles": {
            "items": {
              "$ref": "#/components/schemas/DiscordGuildRole"
            },
            "type": "array",
            "title": "Roles"
          }
        },
        "type": "object",
        "required": [
          "name",
          "roles"
        ],
        "title": "DiscordGuild"
      },
      "DiscordGuildRole": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "position": {
            "type": "integer",
            "title": "Position"
          },
          "is_polar_bot": {
            "type": "boolean",
            "title": "Is Polar Bot"
          },
          "color": {
            "type": "string",
            "format": "color",
            "title": "Color"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "position",
          "is_polar_bot",
          "color"
        ],
        "title": "DiscordGuildRole"
      },
      "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Optional timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Optional timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
      },
      "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Optional timestamp after which the discount is redeemable."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "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",
          "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"
      },
      "DisputeSupportCaseListItem": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "type": {
            "type": "string",
            "const": "dispute",
            "title": "Type"
          },
          "dispute": {
            "$ref": "#/components/schemas/Dispute",
            "description": "The dispute this case handles."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "type",
          "dispute"
        ],
        "title": "DisputeSupportCaseListItem"
      },
      "DisputeSupportCaseMessageCreate": {
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "file_ids": {
            "items": {
              "type": "string",
              "format": "uuid4"
            },
            "type": "array",
            "maxItems": 10,
            "title": "File Ids"
          },
          "type": {
            "type": "string",
            "const": "dispute",
            "title": "Type"
          },
          "win_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DisputeWinReason"
              },
              {
                "type": "null"
              }
            ],
            "description": "The merchant's stated grounds for contesting, set on the counter submission."
          },
          "win_reason_other": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Win Reason Other",
            "description": "Free-text detail when `win_reason` is `other`."
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "DisputeSupportCaseMessageCreate",
        "description": "A reply on a dispute case."
      },
      "DisputeWinReason": {
        "type": "string",
        "enum": [
          "cardholder_withdrew",
          "cardholder_refunded",
          "rightful_cardholder",
          "other"
        ],
        "title": "DisputeWinReason",
        "description": "Why the merchant believes they should win the chargeback.\n\nCollected on their counter submission to help support gather the right\nevidence before submitting to the card network."
      },
      "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"
              },
              {
                "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"
          },
          "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": "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"
      },
      "EmailOTPRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "cf-turnstile-response": {
            "type": "string",
            "title": "Cf-Turnstile-Response"
          }
        },
        "type": "object",
        "required": [
          "email",
          "cf-turnstile-response"
        ],
        "title": "EmailOTPRequest"
      },
      "EmailOTPVerify": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "EmailOTPVerify"
      },
      "EmailUpdateRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "return_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return To"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "EmailUpdateRequest"
      },
      "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."
          },
          "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."
          },
          "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."
          },
          "last_seen": {
            "type": "string",
            "format": "date-time",
            "title": "Last Seen",
            "description": "The last time the event occurred."
          }
        },
        "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"
      },
      "EventStatistics": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the root event."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "The label of the event type."
          },
          "event_type_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Event Type Id",
            "description": "The ID of the event type"
          },
          "occurrences": {
            "type": "integer",
            "title": "Occurrences",
            "description": "Number of root events with this name (i.e., number of traces)."
          },
          "customers": {
            "type": "integer",
            "title": "Customers",
            "description": "Number of distinct customers associated with events."
          },
          "totals": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "Totals",
            "description": "Sum of each field across all events in all hierarchies."
          },
          "averages": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "Averages",
            "description": "Average of per-hierarchy totals (i.e., average cost per trace)."
          },
          "p10": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "P10",
            "description": "10th percentile of per-hierarchy totals."
          },
          "p90": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "P90",
            "description": "90th percentile of per-hierarchy totals."
          },
          "p99": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "P99",
            "description": "99th percentile of per-hierarchy totals."
          }
        },
        "type": "object",
        "required": [
          "name",
          "label",
          "event_type_id",
          "occurrences",
          "customers"
        ],
        "title": "EventStatistics",
        "description": "Aggregate statistics for events grouped by root event name."
      },
      "EventStatisticsSortProperty": {
        "type": "string",
        "enum": [
          "name",
          "-name",
          "occurrences",
          "-occurrences",
          "total",
          "-total",
          "average",
          "-average",
          "p95",
          "-p95",
          "p99",
          "-p99"
        ],
        "title": "EventStatisticsSortProperty"
      },
      "EventType": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "last_seen": {
            "type": "string",
            "format": "date-time",
            "title": "Last Seen",
            "description": "The last time the event occurred."
          }
        },
        "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"
      },
      "Feedback": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "type": {
            "$ref": "#/components/schemas/FeedbackType"
          },
          "status": {
            "$ref": "#/components/schemas/FeedbackStatus"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "client_context": {
            "additionalProperties": true,
            "type": "object",
            "title": "Client Context"
          },
          "user_id": {
            "type": "string",
            "format": "uuid4",
            "title": "User Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "type",
          "status",
          "message",
          "client_context",
          "user_id",
          "organization_id"
        ],
        "title": "Feedback"
      },
      "FeedbackCreate": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/FeedbackType"
          },
          "message": {
            "type": "string",
            "maxLength": 5000,
            "minLength": 10,
            "title": "Message"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "client_context": {
            "additionalProperties": true,
            "type": "object",
            "title": "Client Context"
          }
        },
        "type": "object",
        "required": [
          "type",
          "message",
          "organization_id"
        ],
        "title": "FeedbackCreate"
      },
      "FeedbackStatus": {
        "type": "string",
        "enum": [
          "new",
          "triaged"
        ],
        "title": "FeedbackStatus"
      },
      "FeedbackType": {
        "type": "string",
        "enum": [
          "bug",
          "feedback",
          "question"
        ],
        "title": "FeedbackType"
      },
      "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"
              },
              {
                "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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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. Currently, only `usd` is supported.",
            "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."
      },
      "GitHubInvitesBenefitOrganization": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "is_personal": {
            "type": "boolean",
            "title": "Is Personal"
          },
          "plan_name": {
            "type": "string",
            "title": "Plan Name"
          },
          "is_free": {
            "type": "boolean",
            "title": "Is Free"
          }
        },
        "type": "object",
        "required": [
          "name",
          "is_personal",
          "plan_name",
          "is_free"
        ],
        "title": "GitHubInvitesBenefitOrganization"
      },
      "GitHubInvitesBenefitRepositories": {
        "properties": {
          "repositories": {
            "items": {
              "$ref": "#/components/schemas/GitHubInvitesBenefitRepository"
            },
            "type": "array",
            "title": "Repositories"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/GitHubInvitesBenefitOrganization"
            },
            "type": "array",
            "title": "Organizations"
          }
        },
        "type": "object",
        "required": [
          "repositories",
          "organizations"
        ],
        "title": "GitHubInvitesBenefitRepositories"
      },
      "GitHubInvitesBenefitRepository": {
        "properties": {
          "repository_owner": {
            "type": "string",
            "title": "Repository Owner"
          },
          "repository_name": {
            "type": "string",
            "title": "Repository Name"
          }
        },
        "type": "object",
        "required": [
          "repository_owner",
          "repository_name"
        ],
        "title": "GitHubInvitesBenefitRepository"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HumanReviewRequest": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 5000,
            "minLength": 50,
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "HumanReviewRequest"
      },
      "IdentityVerificationStatus": {
        "type": "string",
        "enum": [
          "unverified",
          "pending",
          "verified",
          "failed"
        ],
        "title": "IdentityVerificationStatus"
      },
      "Insight": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Deterministic insight key (`detector_id:organization_id:period_bucket`). Stable across recomputes so dismissals and feedback re-attach."
          },
          "detector_id": {
            "type": "string",
            "title": "Detector Id",
            "description": "The detector that produced this insight."
          },
          "category": {
            "$ref": "#/components/schemas/InsightCategory"
          },
          "category_label": {
            "type": "string",
            "title": "Category Label",
            "description": "Visible label next to the category dot."
          },
          "severity": {
            "$ref": "#/components/schemas/InsightSeverity",
            "description": "How much the merchant should care; the feed sorts on this first."
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "why": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Why",
            "description": "Explanation surfaced via the 'Why you're seeing this' link."
          },
          "confidence": {
            "$ref": "#/components/schemas/ConfidenceLevel"
          },
          "primary_action": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ViewMetricAction"
                  },
                  {
                    "$ref": "#/components/schemas/ViewCostsAction"
                  },
                  {
                    "$ref": "#/components/schemas/AdjustPriceAction"
                  },
                  {
                    "$ref": "#/components/schemas/AddCurrencyAction"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "add_currency": "#/components/schemas/AddCurrencyAction",
                    "adjust_price": "#/components/schemas/AdjustPriceAction",
                    "view_costs": "#/components/schemas/ViewCostsAction",
                    "view_metric": "#/components/schemas/ViewMetricAction"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Action"
          },
          "suggested_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Prompt",
            "description": "A natural follow-up question this finding invites, offered to the merchant as a one-tap prompt for the assistant. None when the finding has no obvious next question."
          },
          "drivers": {
            "items": {
              "$ref": "#/components/schemas/InsightDriver"
            },
            "type": "array",
            "title": "Drivers",
            "description": "Top contributors to the headline change."
          }
        },
        "type": "object",
        "required": [
          "id",
          "detector_id",
          "category",
          "category_label",
          "severity",
          "title",
          "body",
          "confidence",
          "suggested_prompt"
        ],
        "title": "Insight",
        "description": "A computed, narrated reading of the business with a drill-down."
      },
      "InsightCategory": {
        "type": "string",
        "enum": [
          "revenue",
          "retention",
          "growth",
          "risk",
          "cost",
          "product"
        ],
        "title": "InsightCategory",
        "description": "Buckets an insight by which aspect of the business it speaks to."
      },
      "InsightDriver": {
        "properties": {
          "dimension": {
            "type": "string",
            "title": "Dimension",
            "description": "What the drivers are grouped by, e.g. `product`."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human-readable name of this driver."
          },
          "contribution_pct": {
            "type": "number",
            "title": "Contribution Pct",
            "description": "Share of the headline change attributable to this driver (0-1)."
          },
          "value": {
            "type": "number",
            "title": "Value",
            "description": "This driver's contribution in the metric's unit."
          }
        },
        "type": "object",
        "required": [
          "dimension",
          "label",
          "contribution_pct",
          "value"
        ],
        "title": "InsightDriver",
        "description": "One contributor to the headline change.\n\nDecomposition is what makes an insight *explain* rather than *announce* \u2014 e.g.\n\"MRR grew 12%, ~70% of it from Pro upgrades\". Populated by a grouped query; the\nMRR scaffold leaves this empty until a dedicated Tinybird breakdown pipe lands."
      },
      "InsightSeverity": {
        "type": "string",
        "enum": [
          "critical",
          "warning",
          "opportunity",
          "info"
        ],
        "title": "InsightSeverity",
        "description": "How much the merchant should care, assigned per insight by its detector.\n\nThis is a property of what was *found*, not of the detector: the same MRR\ndetector emits `warning` when revenue falls and `info` when it grows. The\nfeed is ordered by severity first, so the most consequential reading always\nleads."
      },
      "InsufficientBalance": {
        "properties": {
          "error": {
            "type": "string",
            "const": "InsufficientBalance",
            "title": "Error",
            "examples": [
              "InsufficientBalance"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "InsufficientBalance"
      },
      "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"
      },
      "InvalidAuthenticationSession": {
        "properties": {
          "error": {
            "type": "string",
            "const": "InvalidAuthenticationSession",
            "title": "Error",
            "examples": [
              "InvalidAuthenticationSession"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "InvalidAuthenticationSession"
      },
      "InvalidSourceCredentials": {
        "properties": {
          "error": {
            "type": "string",
            "const": "InvalidSourceCredentials",
            "title": "Error",
            "examples": [
              "InvalidSourceCredentials"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "InvalidSourceCredentials"
      },
      "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"
      },
      "LastSSOConnectionRequired": {
        "properties": {
          "error": {
            "type": "string",
            "const": "LastSSOConnectionRequired",
            "title": "Error",
            "examples": [
              "LastSSOConnectionRequired"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "LastSSOConnectionRequired"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "license_key_id",
          "label",
          "meta",
          "created_at",
          "modified_at"
        ],
        "title": "LicenseKeyActivationBase"
      },
      "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"
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "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",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Validated At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              }
            ]
          },
          "usage": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Usage",
            "default": 0
          },
          "limit_activations": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.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"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Validated At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "ListCustomerStats": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CustomerStat"
            },
            "type": "array",
            "title": "Items",
            "description": "Customers ordered by the primary aggregate field descending."
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ListCustomerStats",
        "description": "Customer ranking by an aggregate field."
      },
      "ListPropertyGroupStats": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PropertyGroupStat"
            },
            "type": "array",
            "title": "Items",
            "description": "Stats grouped by property value, ordered by first aggregate field descending."
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ListPropertyGroupStats",
        "description": "Event statistics grouped by a metadata property."
      },
      "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_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_MerchantMigrationRecordItem_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MerchantMigrationRecordItem"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[MerchantMigrationRecordItem]"
      },
      "ListResource_MerchantMigration_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MerchantMigration"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[MerchantMigration]"
      },
      "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_NotificationRecipientSchema_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/NotificationRecipientSchema"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[NotificationRecipientSchema]"
      },
      "ListResource_OAuth2Client_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OAuth2Client"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[OAuth2Client]"
      },
      "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_OrganizationAccessToken_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationAccessToken"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[OrganizationAccessToken]"
      },
      "ListResource_OrganizationBenefitGrant_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationBenefitGrant"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[OrganizationBenefitGrant]"
      },
      "ListResource_OrganizationMember_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationMember"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[OrganizationMember]"
      },
      "ListResource_OrganizationOrder_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationOrder"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[OrganizationOrder]"
      },
      "ListResource_OrganizationSSOConnection_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrganizationSSOConnection"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[OrganizationSSOConnection]"
      },
      "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_PayoutAccount_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PayoutAccount"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[PayoutAccount]"
      },
      "ListResource_Payout_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Payout"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Payout]"
      },
      "ListResource_PersonalAccessToken_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PersonalAccessToken"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[PersonalAccessToken]"
      },
      "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_SupportCaseListItem_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SupportCaseListItem"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[SupportCaseListItem]"
      },
      "ListResource_TaxJurisdiction_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TaxJurisdiction"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[TaxJurisdiction]"
      },
      "ListResource_Transaction_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Transaction"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Transaction]"
      },
      "ListResource_Wallet_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Wallet"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[Wallet]"
      },
      "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]"
      },
      "ListResource__": {
        "properties": {
          "items": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/OrganizationPaymentMethodCard"
                },
                {
                  "$ref": "#/components/schemas/OrganizationPaymentMethodGeneric"
                }
              ]
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListResource[]"
      },
      "ListStatisticsTimeseries": {
        "properties": {
          "periods": {
            "items": {
              "$ref": "#/components/schemas/StatisticsPeriod"
            },
            "type": "array",
            "title": "Periods",
            "description": "Stats for each time period."
          },
          "totals": {
            "items": {
              "$ref": "#/components/schemas/EventStatistics"
            },
            "type": "array",
            "title": "Totals",
            "description": "Overall stats across all periods."
          }
        },
        "type": "object",
        "required": [
          "periods",
          "totals"
        ],
        "title": "ListStatisticsTimeseries",
        "description": "Event statistics timeseries."
      },
      "ListVarianceEvents": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VarianceEvent"
            },
            "type": "array",
            "title": "Items",
            "description": "Outlier events ordered by value descending."
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ListVarianceEvents",
        "description": "Root events with values at or above p99 for their event name."
      },
      "MaintainerAccountCreditsGrantedNotification": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "type": {
            "type": "string",
            "const": "MaintainerAccountCreditsGrantedNotification",
            "title": "Type"
          },
          "payload": {
            "$ref": "#/components/schemas/MaintainerAccountCreditsGrantedNotificationPayload"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "type",
          "payload"
        ],
        "title": "MaintainerAccountCreditsGrantedNotification"
      },
      "MaintainerAccountCreditsGrantedNotificationPayload": {
        "properties": {
          "organization_name": {
            "type": "string",
            "title": "Organization Name"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "default": "usd"
          },
          "formatted_amount": {
            "type": "string",
            "title": "Formatted Amount",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "organization_name",
          "amount",
          "formatted_amount"
        ],
        "title": "MaintainerAccountCreditsGrantedNotificationPayload"
      },
      "MaintainerNewPaidSubscriptionNotification": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "type": {
            "type": "string",
            "const": "MaintainerNewPaidSubscriptionNotification",
            "title": "Type"
          },
          "payload": {
            "$ref": "#/components/schemas/MaintainerNewPaidSubscriptionNotificationPayload"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "type",
          "payload"
        ],
        "title": "MaintainerNewPaidSubscriptionNotification"
      },
      "MaintainerNewPaidSubscriptionNotificationPayload": {
        "properties": {
          "subscriber_name": {
            "type": "string",
            "title": "Subscriber Name"
          },
          "subscriber_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscriber Email"
          },
          "tier_name": {
            "type": "string",
            "title": "Tier Name"
          },
          "tier_price_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tier Price Amount"
          },
          "tier_price_recurring_interval": {
            "type": "string",
            "title": "Tier Price Recurring Interval"
          },
          "tier_price_recurring_interval_count": {
            "type": "integer",
            "title": "Tier Price Recurring Interval Count",
            "default": 1
          },
          "tier_organization_name": {
            "type": "string",
            "title": "Tier Organization Name"
          },
          "tier_organization_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tier Organization Slug"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "default": "usd"
          },
          "formatted_price_amount": {
            "type": "string",
            "title": "Formatted Price Amount",
            "readOnly": true
          },
          "formatted_price_with_interval": {
            "type": "string",
            "title": "Formatted Price With Interval",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "subscriber_name",
          "tier_name",
          "tier_price_amount",
          "tier_price_recurring_interval",
          "tier_organization_name",
          "formatted_price_amount",
          "formatted_price_with_interval"
        ],
        "title": "MaintainerNewPaidSubscriptionNotificationPayload"
      },
      "MaintainerNewProductSaleNotification": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "type": {
            "type": "string",
            "const": "MaintainerNewProductSaleNotification",
            "title": "Type"
          },
          "payload": {
            "$ref": "#/components/schemas/MaintainerNewProductSaleNotificationPayload"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "type",
          "payload"
        ],
        "title": "MaintainerNewProductSaleNotification"
      },
      "MaintainerNewProductSaleNotificationPayload": {
        "properties": {
          "product_name": {
            "type": "string",
            "title": "Product Name"
          },
          "product_price_amount": {
            "type": "integer",
            "title": "Product Price Amount"
          },
          "customer_name": {
            "type": "string",
            "title": "Customer Name",
            "default": ""
          },
          "organization_name": {
            "type": "string",
            "title": "Organization Name",
            "default": ""
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "billing_address_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Address Country"
          },
          "billing_address_city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Address City"
          },
          "billing_address_line1": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Address Line1"
          },
          "product_image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Image Url"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "order_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Date"
          },
          "organization_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Slug"
          },
          "billing_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrderBillingReasonInternal"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "default": "usd"
          },
          "formatted_price_amount": {
            "type": "string",
            "title": "Formatted Price Amount",
            "readOnly": true
          },
          "formatted_billing_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Formatted Billing Reason",
            "readOnly": true
          },
          "formatted_address_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Formatted Address Country",
            "readOnly": true
          },
          "order_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Url",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "product_name",
          "product_price_amount",
          "formatted_price_amount",
          "formatted_billing_reason",
          "formatted_address_country",
          "order_url"
        ],
        "title": "MaintainerNewProductSaleNotificationPayload"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
      },
      "MemberCreate": {
        "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"
            ]
          },
          "customer_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Customer Id",
            "description": "The ID of the customer this member belongs to."
          }
        },
        "type": "object",
        "required": [
          "email",
          "customer_id"
        ],
        "title": "MemberCreate",
        "description": "Schema for creating a new member (deprecated; customer in the body)."
      },
      "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."
      },
      "MemberOrganization": {
        "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"
          },
          "requires_sso": {
            "type": "boolean",
            "title": "Requires Sso",
            "description": "Whether this organization enforces SSO."
          }
        },
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "avatar_url",
          "requires_sso"
        ],
        "title": "MemberOrganization"
      },
      "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."
      },
      "MerchantMigration": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          },
          "source_platform": {
            "$ref": "#/components/schemas/MerchantMigrationSourcePlatform",
            "description": "The provider the billing is being migrated from."
          },
          "step": {
            "$ref": "#/components/schemas/MerchantMigrationStep",
            "description": "The current step of the migration."
          },
          "source_connected": {
            "type": "boolean",
            "title": "Source Connected",
            "description": "Whether the source provider has been connected."
          },
          "source": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source",
            "description": "Non-secret metadata about the connected source. The shape varies by provider (e.g. Stripe exposes `stripe_user_id`, `livemode`)."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "organization_id",
          "source_platform",
          "step",
          "source_connected",
          "source"
        ],
        "title": "MerchantMigration"
      },
      "MerchantMigrationCreate": {
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization the migration belongs to."
          },
          "source_platform": {
            "$ref": "#/components/schemas/MerchantMigrationSourcePlatform",
            "description": "The provider to migrate the billing from."
          },
          "api_key": {
            "type": "string",
            "minLength": 1,
            "pattern": "^(rk|sk)_",
            "title": "Api Key",
            "description": "A Stripe API key for the source account (a restricted `rk_...` key is recommended). It is validated for all required permissions before the migration is saved."
          }
        },
        "type": "object",
        "required": [
          "organization_id",
          "source_platform",
          "api_key"
        ],
        "title": "MerchantMigrationCreate"
      },
      "MerchantMigrationNotEnabled": {
        "properties": {
          "error": {
            "type": "string",
            "const": "MerchantMigrationNotEnabled",
            "title": "Error",
            "examples": [
              "MerchantMigrationNotEnabled"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "MerchantMigrationNotEnabled"
      },
      "MerchantMigrationNotFound": {
        "properties": {
          "error": {
            "type": "string",
            "const": "MerchantMigrationNotFound",
            "title": "Error",
            "examples": [
              "MerchantMigrationNotFound"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "MerchantMigrationNotFound"
      },
      "MerchantMigrationRecordItem": {
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/PrecheckEntity",
            "description": "The source entity type."
          },
          "source_id": {
            "type": "string",
            "title": "Source Id",
            "description": "The source identifier (e.g. Stripe `sub_\u2026`)."
          },
          "title": {
            "type": "string",
            "title": "Title",
            "description": "Primary label (name, email or product)."
          },
          "subtitle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtitle",
            "description": "Secondary detail (interval, amount, country, status)."
          },
          "status": {
            "$ref": "#/components/schemas/PrecheckRecordStatus",
            "description": "Whether this record will be imported or stays on the source."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "Why the record is skipped, if it is."
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason Code",
            "description": "Stable code for the skip reason, if any."
          }
        },
        "type": "object",
        "required": [
          "entity",
          "source_id",
          "title",
          "subtitle",
          "status",
          "reason",
          "reason_code"
        ],
        "title": "MerchantMigrationRecordItem"
      },
      "MerchantMigrationSourcePlatform": {
        "type": "string",
        "enum": [
          "stripe",
          "lemon_squeezy",
          "paddle"
        ],
        "title": "MerchantMigrationSourcePlatform"
      },
      "MerchantMigrationStep": {
        "type": "string",
        "enum": [
          "source_setup",
          "pre_check",
          "create_catalog",
          "copy_cards",
          "activate_subscriptions",
          "cleanup",
          "completed"
        ],
        "title": "MerchantMigrationStep"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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."
          },
          "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."
          },
          "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."
          },
          "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."
          }
        },
        "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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"
      },
      "MissingPaymentMethodError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "MissingPaymentMethodError",
            "title": "Error",
            "examples": [
              "MissingPaymentMethodError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "MissingPaymentMethodError"
      },
      "MissingStripeScopes": {
        "properties": {
          "error": {
            "type": "string",
            "const": "MissingStripeScopes",
            "title": "Error",
            "examples": [
              "MissingStripeScopes"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "MissingStripeScopes"
      },
      "NotASeatBasedSubscription": {
        "properties": {
          "error": {
            "type": "string",
            "const": "NotASeatBasedSubscription",
            "title": "Error",
            "examples": [
              "NotASeatBasedSubscription"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "NotASeatBasedSubscription"
      },
      "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"
      },
      "NotificationRecipientCreate": {
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/NotificationRecipientPlatform",
            "description": "Platform of the notification recipient."
          },
          "expo_push_token": {
            "type": "string",
            "title": "Expo Push Token",
            "description": "Expo push token for the notification recipient."
          }
        },
        "type": "object",
        "required": [
          "platform",
          "expo_push_token"
        ],
        "title": "NotificationRecipientCreate"
      },
      "NotificationRecipientPlatform": {
        "type": "string",
        "enum": [
          "ios",
          "android"
        ],
        "title": "NotificationRecipientPlatform"
      },
      "NotificationRecipientSchema": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "user_id": {
            "type": "string",
            "format": "uuid4",
            "title": "User Id",
            "description": "ID of the user the notification recipient belongs to."
          },
          "platform": {
            "$ref": "#/components/schemas/NotificationRecipientPlatform",
            "description": "Platform of the notification recipient."
          },
          "expo_push_token": {
            "type": "string",
            "title": "Expo Push Token",
            "description": "Expo push token for the notification recipient."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "user_id",
          "platform",
          "expo_push_token"
        ],
        "title": "NotificationRecipientSchema"
      },
      "NotificationsList": {
        "properties": {
          "notifications": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MaintainerNewPaidSubscriptionNotification"
                },
                {
                  "$ref": "#/components/schemas/MaintainerNewProductSaleNotification"
                },
                {
                  "$ref": "#/components/schemas/MaintainerAccountCreditsGrantedNotification"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "MaintainerAccountCreditsGrantedNotification": "#/components/schemas/MaintainerAccountCreditsGrantedNotification",
                  "MaintainerNewPaidSubscriptionNotification": "#/components/schemas/MaintainerNewPaidSubscriptionNotification",
                  "MaintainerNewProductSaleNotification": "#/components/schemas/MaintainerNewProductSaleNotification"
                }
              }
            },
            "type": "array",
            "title": "Notifications"
          },
          "last_read_notification_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Read Notification Id"
          }
        },
        "type": "object",
        "required": [
          "notifications",
          "last_read_notification_id"
        ],
        "title": "NotificationsList"
      },
      "NotificationsMarkRead": {
        "properties": {
          "notification_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Notification Id"
          }
        },
        "type": "object",
        "required": [
          "notification_id"
        ],
        "title": "NotificationsMarkRead"
      },
      "OAuth2Client": {
        "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"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "client_secret": {
            "type": "string",
            "title": "Client Secret"
          },
          "client_id_issued_at": {
            "type": "integer",
            "title": "Client Id Issued At"
          },
          "client_secret_expires_at": {
            "type": "integer",
            "title": "Client Secret Expires At"
          }
        },
        "type": "object",
        "required": [
          "redirect_uris",
          "client_name",
          "created_at",
          "modified_at",
          "client_id",
          "client_secret",
          "client_id_issued_at",
          "client_secret_expires_at"
        ],
        "title": "OAuth2Client"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "OAuthAccountRead": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "platform": {
            "$ref": "#/components/schemas/OAuthPlatform"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "account_email": {
            "type": "string",
            "title": "Account Email"
          },
          "account_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Username"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "platform",
          "account_id",
          "account_email",
          "account_username"
        ],
        "title": "OAuthAccountRead"
      },
      "OAuthPlatform": {
        "type": "string",
        "enum": [
          "github",
          "github_repository_benefit",
          "google",
          "apple"
        ],
        "title": "OAuthPlatform"
      },
      "OIDCAuthMethod": {
        "type": "string",
        "enum": [
          "client_secret",
          "private_key_jwt"
        ],
        "title": "OIDCAuthMethod"
      },
      "OIDCConfigurationClientSecret": {
        "properties": {
          "issuer": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Issuer",
            "description": "OIDC issuer URL of the identity provider."
          },
          "client_id": {
            "type": "string",
            "minLength": 1,
            "title": "Client Id",
            "description": "OAuth client ID registered with the identity provider."
          },
          "authorization_parameters": {
            "patternProperties": {
              "^[a-zA-Z0-9_.-]{1,64}$": {
                "type": "string",
                "maxLength": 256
              }
            },
            "type": "object",
            "maxProperties": 10,
            "title": "Authorization Parameters",
            "description": "Additional parameters appended to the authorization request, e.g. `hd` to pin a Google Workspace domain."
          },
          "auth_method": {
            "type": "string",
            "const": "client_secret",
            "title": "Auth Method",
            "description": "Authentication method used against the identity provider."
          },
          "client_secret": {
            "type": "string",
            "minLength": 1,
            "title": "Client Secret",
            "description": "Client secret used to authenticate against the identity provider."
          }
        },
        "type": "object",
        "required": [
          "issuer",
          "client_id",
          "auth_method",
          "client_secret"
        ],
        "title": "OIDCConfigurationClientSecret"
      },
      "OIDCConfigurationPrivateKeyJWT": {
        "properties": {
          "issuer": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Issuer",
            "description": "OIDC issuer URL of the identity provider."
          },
          "client_id": {
            "type": "string",
            "minLength": 1,
            "title": "Client Id",
            "description": "OAuth client ID registered with the identity provider."
          },
          "authorization_parameters": {
            "patternProperties": {
              "^[a-zA-Z0-9_.-]{1,64}$": {
                "type": "string",
                "maxLength": 256
              }
            },
            "type": "object",
            "maxProperties": 10,
            "title": "Authorization Parameters",
            "description": "Additional parameters appended to the authorization request, e.g. `hd` to pin a Google Workspace domain."
          },
          "auth_method": {
            "type": "string",
            "const": "private_key_jwt",
            "title": "Auth Method",
            "description": "Authentication method used against the identity provider."
          }
        },
        "type": "object",
        "required": [
          "issuer",
          "client_id",
          "auth_method"
        ],
        "title": "OIDCConfigurationPrivateKeyJWT"
      },
      "OIDCConfigurationRead": {
        "properties": {
          "issuer": {
            "type": "string",
            "title": "Issuer",
            "description": "OIDC issuer URL of the identity provider."
          },
          "client_id": {
            "type": "string",
            "title": "Client Id",
            "description": "OAuth client ID registered with the identity provider."
          },
          "auth_method": {
            "$ref": "#/components/schemas/OIDCAuthMethod",
            "description": "Authentication method used against the identity provider."
          },
          "authorization_parameters": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Authorization Parameters",
            "description": "Additional parameters appended to the authorization request, e.g. `hd` to pin a Google Workspace domain."
          }
        },
        "type": "object",
        "required": [
          "issuer",
          "client_id",
          "auth_method",
          "authorization_parameters"
        ],
        "title": "OIDCConfigurationRead"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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)."
          },
          "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"
              },
              {
                "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"
                },
                {
                  "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",
          "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"
        ],
        "title": "OrderBillingReason"
      },
      "OrderBillingReasonInternal": {
        "type": "string",
        "enum": [
          "purchase",
          "subscription_create",
          "subscription_cycle",
          "subscription_cycle_after_trial",
          "subscription_cancel",
          "subscription_update"
        ],
        "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 and free 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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "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",
          "avatar_url"
        ],
        "title": "OrderCustomer"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "label",
          "amount",
          "tax_amount",
          "proration",
          "product_price_id"
        ],
        "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period."
          },
          "current_meter_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "The timestamp when the subscription ended."
          },
          "past_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At",
            "description": "The timestamp when the subscription was paused."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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."
          },
          "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details Submitted At",
            "description": "When the business details were submitted for review."
          },
          "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"
          },
          "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",
          "sso_enforced",
          "default_presentment_currency",
          "default_tax_behavior",
          "feature_settings",
          "subscription_settings",
          "customer_email_settings",
          "customer_portal_settings",
          "account_id",
          "payout_account_id",
          "capabilities"
        ],
        "title": "Organization"
      },
      "OrganizationAccessToken": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Scope"
            },
            "type": "array",
            "title": "Scopes"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "comment": {
            "type": "string",
            "title": "Comment"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "The organization ID.",
            "examples": [
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737"
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "scopes",
          "expires_at",
          "comment",
          "last_used_at",
          "organization_id"
        ],
        "title": "OrganizationAccessToken"
      },
      "OrganizationAccessTokenCreate": {
        "properties": {
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "comment": {
            "type": "string",
            "title": "Comment"
          },
          "expires_in": {
            "anyOf": [
              {
                "type": "string",
                "format": "duration"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires In"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/AvailableScope"
            },
            "type": "array",
            "title": "Scopes"
          }
        },
        "type": "object",
        "required": [
          "comment",
          "scopes"
        ],
        "title": "OrganizationAccessTokenCreate"
      },
      "OrganizationAccessTokenCreateResponse": {
        "properties": {
          "organization_access_token": {
            "$ref": "#/components/schemas/OrganizationAccessToken"
          },
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "organization_access_token",
          "token"
        ],
        "title": "OrganizationAccessTokenCreateResponse"
      },
      "OrganizationAccessTokenSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "comment",
          "-comment",
          "last_used_at",
          "-last_used_at",
          "organization_id",
          "-organization_id"
        ],
        "title": "OrganizationAccessTokenSortProperty"
      },
      "OrganizationAccessTokenUpdate": {
        "properties": {
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AvailableScope"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          }
        },
        "type": "object",
        "title": "OrganizationAccessTokenUpdate"
      },
      "OrganizationAppealRequest": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 5000,
            "minLength": 50,
            "title": "Reason",
            "description": "Detailed explanation of why this organization should be approved. Minimum 50 characters."
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "OrganizationAppealRequest"
      },
      "OrganizationAppealResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Whether the appeal was successfully submitted"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Success or error message"
          },
          "appeal_submitted_at": {
            "type": "string",
            "format": "date-time",
            "title": "Appeal Submitted At",
            "description": "When the appeal was submitted"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message",
          "appeal_submitted_at"
        ],
        "title": "OrganizationAppealResponse"
      },
      "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"
              },
              {
                "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"
          },
          "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."
      },
      "OrganizationBenefitGrant": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "benefit_description": {
            "type": "string",
            "title": "Benefit Description"
          },
          "is_granted": {
            "type": "boolean",
            "title": "Is Granted",
            "description": "Whether the channel is provisioned and the invite sent."
          },
          "is_connected": {
            "type": "boolean",
            "title": "Is Connected",
            "description": "Whether the invite was accepted by the customer's workspace."
          },
          "invited_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invited Email",
            "description": "Email of the Slack workspace admin the invite was sent to."
          },
          "invite_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invite Url",
            "description": "Slack Connect invite URL. Not always available: Slack omits it for some email invites."
          },
          "channel_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Message of the last provisioning error, if any."
          }
        },
        "type": "object",
        "required": [
          "id",
          "benefit_description",
          "is_granted",
          "is_connected"
        ],
        "title": "OrganizationBenefitGrant"
      },
      "OrganizationBenefitGrantUpdate": {
        "properties": {
          "invited_email": {
            "type": "string",
            "format": "email",
            "title": "Invited Email",
            "description": "Email of an admin in the customer's Slack workspace who should receive the Slack Connect invite."
          }
        },
        "type": "object",
        "required": [
          "invited_email"
        ],
        "title": "OrganizationBenefitGrantUpdate"
      },
      "OrganizationBillingDetails": {
        "properties": {
          "billing_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Name",
            "description": "The name shown on invoices. Falls back to the customer name."
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Postal address used on invoices."
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id",
            "description": "Tax identifier value (without the format suffix)."
          }
        },
        "type": "object",
        "title": "OrganizationBillingDetails"
      },
      "OrganizationBillingDetailsUpdate": {
        "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"
          }
        },
        "type": "object",
        "title": "OrganizationBillingDetailsUpdate"
      },
      "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"
      },
      "OrganizationCheckoutRequest": {
        "properties": {
          "product_id": {
            "type": "string",
            "title": "Product Id",
            "description": "Polar product ID to subscribe to."
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url"
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin"
          }
        },
        "type": "object",
        "required": [
          "product_id"
        ],
        "title": "OrganizationCheckoutRequest"
      },
      "OrganizationCheckoutResponse": {
        "properties": {
          "checkout_id": {
            "type": "string",
            "title": "Checkout Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "checkout_id",
          "url",
          "expires_at"
        ],
        "title": "OrganizationCheckoutResponse"
      },
      "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"
          },
          "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",
          "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"
      },
      "OrganizationCustomerSession": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token",
            "description": "Short-lived customer session token bound to this organization's mirrored Polar billing customer. Authenticates against `/v1/customer-portal/customers/me/*` for the duration of its TTL."
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "OrganizationCustomerSession"
      },
      "OrganizationDeletionBlockedReason": {
        "type": "string",
        "enum": [
          "has_orders",
          "has_active_subscriptions",
          "stripe_account_deletion_failed"
        ],
        "title": "OrganizationDeletionBlockedReason",
        "description": "Reasons why an organization cannot be immediately deleted."
      },
      "OrganizationDeletionResponse": {
        "properties": {
          "deleted": {
            "type": "boolean",
            "title": "Deleted",
            "description": "Whether the organization was immediately deleted"
          },
          "requires_support": {
            "type": "boolean",
            "title": "Requires Support",
            "description": "Whether a support ticket was created for manual handling"
          },
          "blocked_reasons": {
            "items": {
              "$ref": "#/components/schemas/OrganizationDeletionBlockedReason"
            },
            "type": "array",
            "title": "Blocked Reasons",
            "description": "Reasons why immediate deletion is blocked"
          }
        },
        "type": "object",
        "required": [
          "deleted",
          "requires_support"
        ],
        "title": "OrganizationDeletionResponse",
        "description": "Response for organization deletion request."
      },
      "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"
      },
      "OrganizationFeatureSettings": {
        "properties": {
          "issue_funding_enabled": {
            "type": "boolean",
            "title": "Issue Funding Enabled",
            "description": "If this organization has issue funding enabled",
            "default": false
          },
          "seat_based_pricing_enabled": {
            "type": "boolean",
            "title": "Seat Based Pricing Enabled",
            "description": "If this organization has seat-based pricing 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
          },
          "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
          },
          "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": {
          "seat_based_pricing_enabled": {
            "type": "boolean",
            "title": "Seat Based Pricing Enabled",
            "description": "If this organization has seat-based pricing 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."
          }
        },
        "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"
      },
      "OrganizationKYC": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details Submitted At",
            "description": "When the business details were submitted for review."
          },
          "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"
          },
          "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."
          },
          "details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "Organization compliance details. Only visible to organization members."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "slug",
          "avatar_url",
          "proration_behavior",
          "allow_customer_updates",
          "email",
          "website",
          "socials",
          "status",
          "details_submitted_at",
          "sso_enforced",
          "default_presentment_currency",
          "default_tax_behavior",
          "feature_settings",
          "subscription_settings",
          "customer_email_settings",
          "customer_portal_settings",
          "account_id",
          "payout_account_id",
          "capabilities"
        ],
        "title": "OrganizationKYC",
        "description": "Organization with compliance/KYC details. Only returned from the dedicated KYC endpoint."
      },
      "OrganizationMember": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id",
            "description": "The ID of the user."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "The time the OrganizationMember was created."
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "role": {
            "$ref": "#/components/schemas/OrganizationRole",
            "description": "The user's role on the organization."
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "created_at",
          "email",
          "avatar_url",
          "role"
        ],
        "title": "OrganizationMember"
      },
      "OrganizationMemberInvite": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "Email address of the user to invite"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "OrganizationMemberInvite"
      },
      "OrganizationMemberRoleUpdate": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "member"
            ],
            "title": "Role",
            "description": "The role to assign. `owner` is rejected \u2014 ownership transfers go through a separate flow."
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "OrganizationMemberRoleUpdate"
      },
      "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"
          }
        },
        "type": "object",
        "required": [
          "new_order",
          "new_subscription",
          "chargeback_prevention"
        ],
        "title": "OrganizationNotificationSettings"
      },
      "OrganizationOrder": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "paid": {
            "type": "boolean",
            "title": "Paid"
          },
          "total_amount": {
            "type": "integer",
            "title": "Total Amount",
            "description": "Total amount in cents, after discount and tax."
          },
          "refunded_amount": {
            "type": "integer",
            "title": "Refunded Amount",
            "description": "Refunded amount in cents."
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "billing_reason": {
            "type": "string",
            "title": "Billing Reason"
          },
          "product_name": {
            "type": "string",
            "title": "Product Name"
          },
          "is_invoice_generated": {
            "type": "boolean",
            "title": "Is Invoice Generated"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "invoice_number",
          "status",
          "paid",
          "total_amount",
          "refunded_amount",
          "currency",
          "billing_reason",
          "product_name",
          "is_invoice_generated"
        ],
        "title": "OrganizationOrder"
      },
      "OrganizationOrderInvoice": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "OrganizationOrderInvoice"
      },
      "OrganizationPaymentMethodCard": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "card",
            "title": "Type",
            "default": "card"
          },
          "default": {
            "type": "boolean",
            "title": "Default"
          },
          "method_metadata": {
            "$ref": "#/components/schemas/OrganizationPaymentMethodCardMetadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "default",
          "method_metadata"
        ],
        "title": "OrganizationPaymentMethodCard"
      },
      "OrganizationPaymentMethodCardMetadata": {
        "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"
          }
        },
        "type": "object",
        "required": [
          "brand",
          "last4",
          "exp_month",
          "exp_year"
        ],
        "title": "OrganizationPaymentMethodCardMetadata"
      },
      "OrganizationPaymentMethodGeneric": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "default": {
            "type": "boolean",
            "title": "Default"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "default"
        ],
        "title": "OrganizationPaymentMethodGeneric"
      },
      "OrganizationPaymentStatus": {
        "properties": {
          "payment_ready": {
            "type": "boolean",
            "title": "Payment Ready",
            "description": "Whether the organization is ready to accept payments"
          },
          "organization_status": {
            "$ref": "#/components/schemas/OrganizationStatus",
            "description": "Current organization status"
          }
        },
        "type": "object",
        "required": [
          "payment_ready",
          "organization_status"
        ],
        "title": "OrganizationPaymentStatus"
      },
      "OrganizationPayoutAccountSet": {
        "properties": {
          "payout_account_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Payout Account Id",
            "description": "ID of the payout account to set on the organization."
          }
        },
        "type": "object",
        "required": [
          "payout_account_id"
        ],
        "title": "OrganizationPayoutAccountSet"
      },
      "OrganizationPermission": {
        "type": "string",
        "enum": [
          "organization:manage",
          "members:read",
          "members:manage",
          "products:read",
          "products:manage",
          "custom_fields:read",
          "custom_fields:manage",
          "customers:read",
          "customers:manage",
          "sales:read",
          "sales:manage",
          "analytics:read",
          "analytics:manage",
          "events:ingest",
          "finance:read",
          "finance:manage"
        ],
        "title": "OrganizationPermission"
      },
      "OrganizationPlan": {
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "Polar product ID. Null for the synthesized free plan, which has no underlying Polar product."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "recurring_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationPlanPrice"
              },
              {
                "type": "null"
              }
            ]
          },
          "transaction_fee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationPlanFee"
              },
              {
                "type": "null"
              }
            ]
          },
          "highlight": {
            "type": "boolean",
            "title": "Highlight",
            "default": false
          },
          "custom": {
            "type": "boolean",
            "title": "Custom",
            "default": false
          },
          "features": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Features"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "OrganizationPlan"
      },
      "OrganizationPlanFee": {
        "properties": {
          "percent": {
            "type": "integer",
            "title": "Percent",
            "description": "Percent fee in basis points (e.g. 380 = 3.80%)."
          },
          "fixed": {
            "type": "integer",
            "title": "Fixed",
            "description": "Fixed fee in cents."
          }
        },
        "type": "object",
        "required": [
          "percent",
          "fixed"
        ],
        "title": "OrganizationPlanFee"
      },
      "OrganizationPlanPrice": {
        "properties": {
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "title": "OrganizationPlanPrice"
      },
      "OrganizationReviewAppeal": {
        "properties": {
          "submitted_at": {
            "type": "string",
            "format": "date-time",
            "title": "Submitted At"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "decision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AppealDecision"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "submitted_at"
        ],
        "title": "OrganizationReviewAppeal"
      },
      "OrganizationReviewCheck": {
        "properties": {
          "key": {
            "$ref": "#/components/schemas/OrganizationReviewCheckKey"
          },
          "status": {
            "$ref": "#/components/schemas/OrganizationReviewCheckStatus"
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/OrganizationReviewCheckReason"
            },
            "type": "array",
            "title": "Reasons",
            "description": "Reasons for the current status. Empty when `passed`."
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value",
            "description": "Optional contextual value associated with the check, e.g. the product URL for the `product_url` check."
          },
          "sub_checks": {
            "items": {
              "$ref": "#/components/schemas/OrganizationReviewSubCheck"
            },
            "type": "array",
            "title": "Sub Checks",
            "description": "Per-component breakdown, populated only for aggregate checks (currently `setup_readiness`). The parent `status` is the source of truth for gating."
          }
        },
        "type": "object",
        "required": [
          "key",
          "status"
        ],
        "title": "OrganizationReviewCheck",
        "description": "A single item in the self-review checklist."
      },
      "OrganizationReviewCheckKey": {
        "type": "string",
        "enum": [
          "identity.email",
          "identity.social_links",
          "identity.stripe_identity_verification",
          "product_description",
          "product_url",
          "payout_account",
          "product_configuration",
          "setup_readiness"
        ],
        "title": "OrganizationReviewCheckKey",
        "description": "Stable identifiers for each check. Adding a new key is a coordinated FE+BE change."
      },
      "OrganizationReviewCheckReason": {
        "type": "string",
        "enum": [
          "not_started",
          "not_authorized",
          "in_progress",
          "external_pending",
          "identity.rejected",
          "identity.personal_email",
          "identity.domain_mismatch",
          "product_url.unreachable",
          "payout_account.requirements_due",
          "payout_account.payouts_disabled",
          "setup_readiness.webhook_missing",
          "setup_readiness.checkout_link_not_fulfillable"
        ],
        "title": "OrganizationReviewCheckReason",
        "description": "Reasons explaining a check's status. Scoped reasons are namespaced\nwith the prefix of the check key they apply to."
      },
      "OrganizationReviewCheckStatus": {
        "type": "string",
        "enum": [
          "passed",
          "warning",
          "failed",
          "pending"
        ],
        "title": "OrganizationReviewCheckStatus"
      },
      "OrganizationReviewState": {
        "properties": {
          "can_submit": {
            "type": "boolean",
            "title": "Can Submit",
            "description": "True when `submitted_at` is null AND no preliminary check is `failed` or `pending`. Warnings do not block submission."
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Submitted At"
          },
          "verdict": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "pass",
                  "fail"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict"
          },
          "appeal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationReviewAppeal"
              },
              {
                "type": "null"
              }
            ]
          },
          "preliminary_steps": {
            "items": {
              "$ref": "#/components/schemas/OrganizationReviewCheck"
            },
            "type": "array",
            "title": "Preliminary Steps"
          }
        },
        "type": "object",
        "required": [
          "can_submit"
        ],
        "title": "OrganizationReviewState",
        "description": "Merchant self-review checklist. Frozen once `submitted_at` is set."
      },
      "OrganizationReviewStatus": {
        "properties": {
          "verdict": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "PASS",
                  "FAIL",
                  "UNCERTAIN"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict",
            "description": "AI validation verdict"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "Reason for the verdict"
          },
          "appeal_submitted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Appeal Submitted At",
            "description": "When appeal was submitted"
          },
          "appeal_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Appeal Reason",
            "description": "Reason for the appeal"
          },
          "appeal_decision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AppealDecision"
              },
              {
                "type": "null"
              }
            ],
            "description": "Decision on the appeal (approved/rejected)"
          },
          "appeal_reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Appeal Reviewed At",
            "description": "When appeal was reviewed"
          },
          "appeal_case_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Appeal Case Id",
            "description": "ID of the human-review support case, if one was opened"
          }
        },
        "type": "object",
        "title": "OrganizationReviewStatus"
      },
      "OrganizationReviewSubCheck": {
        "properties": {
          "key": {
            "$ref": "#/components/schemas/OrganizationReviewSubCheckKey"
          },
          "status": {
            "$ref": "#/components/schemas/OrganizationReviewCheckStatus"
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/OrganizationReviewCheckReason"
            },
            "type": "array",
            "title": "Reasons",
            "description": "Reasons for the sub-check's current status. Empty when `passed`."
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value",
            "description": "Optional contextual value associated with the sub-check."
          }
        },
        "type": "object",
        "required": [
          "key",
          "status"
        ],
        "title": "OrganizationReviewSubCheck",
        "description": "A nested sub-item that contributes to a parent check's rolled-up status.\n\nSub-checks expose the per-component breakdown for aggregate checks (e.g.\n`setup_readiness`) so the frontend doesn't have to re-derive which path\nis configured. The parent's `status` is the source of truth for gating;\nreasons explaining a sub-item live on the sub-check itself."
      },
      "OrganizationReviewSubCheckKey": {
        "type": "string",
        "enum": [
          "setup_readiness.checkout_link",
          "setup_readiness.access_token",
          "setup_readiness.webhook"
        ],
        "title": "OrganizationReviewSubCheckKey",
        "description": "Stable identifiers for nested sub-checks inside a parent check."
      },
      "OrganizationRole": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "member"
        ],
        "title": "OrganizationRole"
      },
      "OrganizationRoleDefinition": {
        "properties": {
          "id": {
            "$ref": "#/components/schemas/OrganizationRole",
            "description": "The role identifier."
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/OrganizationPermission"
            },
            "type": "array",
            "title": "Permissions",
            "description": "The permissions this role grants in the organization."
          }
        },
        "type": "object",
        "required": [
          "id",
          "permissions"
        ],
        "title": "OrganizationRoleDefinition",
        "description": "A role available in an organization and the permissions it grants."
      },
      "OrganizationSSOConnection": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "ID of the organization the connection belongs to."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Human-friendly label for the connection, shown on the login page."
          },
          "type": {
            "$ref": "#/components/schemas/OrganizationSSOConnectionType",
            "description": "Type of the SSO connection."
          },
          "configuration": {
            "$ref": "#/components/schemas/OIDCConfigurationRead",
            "description": "Provider-specific configuration of the connection."
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether the connection can be used to sign in."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "organization_id",
          "name",
          "type",
          "configuration",
          "enabled"
        ],
        "title": "OrganizationSSOConnection"
      },
      "OrganizationSSOConnectionCreate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Human-friendly label for the connection, shown on the login page."
          },
          "type": {
            "type": "string",
            "const": "oidc",
            "title": "Type",
            "description": "Type of the SSO connection.",
            "default": "oidc"
          },
          "configuration": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OIDCConfigurationClientSecret"
              },
              {
                "$ref": "#/components/schemas/OIDCConfigurationPrivateKeyJWT"
              }
            ],
            "title": "Configuration",
            "description": "Provider-specific configuration of the connection.",
            "discriminator": {
              "propertyName": "auth_method",
              "mapping": {
                "client_secret": "#/components/schemas/OIDCConfigurationClientSecret",
                "private_key_jwt": "#/components/schemas/OIDCConfigurationPrivateKeyJWT"
              }
            }
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether the connection can be used to sign in.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "configuration"
        ],
        "title": "OrganizationSSOConnectionCreate"
      },
      "OrganizationSSOConnectionType": {
        "type": "string",
        "enum": [
          "oidc"
        ],
        "title": "OrganizationSSOConnectionType"
      },
      "OrganizationSSOConnectionUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Human-friendly label for the connection, shown on the login page."
          },
          "configuration": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/OIDCConfigurationClientSecret"
                  },
                  {
                    "$ref": "#/components/schemas/OIDCConfigurationPrivateKeyJWT"
                  }
                ],
                "discriminator": {
                  "propertyName": "auth_method",
                  "mapping": {
                    "client_secret": "#/components/schemas/OIDCConfigurationClientSecret",
                    "private_key_jwt": "#/components/schemas/OIDCConfigurationPrivateKeyJWT"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Configuration",
            "description": "Provider-specific configuration of the connection."
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled",
            "description": "Whether the connection can be used to sign in."
          }
        },
        "type": "object",
        "title": "OrganizationSSOConnectionUpdate"
      },
      "OrganizationSlugAvailability": {
        "properties": {
          "available": {
            "type": "boolean",
            "title": "Available",
            "description": "Whether the slug is available for a new organization."
          }
        },
        "type": "object",
        "required": [
          "available"
        ],
        "title": "OrganizationSlugAvailability"
      },
      "OrganizationSlugCheck": {
        "properties": {
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "The slug to check availability for."
          }
        },
        "type": "object",
        "required": [
          "slug"
        ],
        "title": "OrganizationSlugCheck"
      },
      "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"
      },
      "OrganizationStartupProgramClaimRequest": {
        "properties": {
          "success_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url"
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          },
          "embed_origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embed Origin"
          }
        },
        "type": "object",
        "title": "OrganizationStartupProgramClaimRequest",
        "description": "Inputs for claiming the Startup Program discount.\n\nThe checkout URLs are only used when the org is on the Free plan and\nneeds a checkout to set up a payment method; they're ignored on the\nPATCH path (already-paid orgs)."
      },
      "OrganizationStartupProgramClaimResponse": {
        "properties": {
          "checkout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationCheckoutResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "subscription": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationSubscription"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "OrganizationStartupProgramClaimResponse",
        "description": "Result of claiming the Startup Program discount.\n\nExactly one field is set:\n- ``checkout`` \u2014 Free \u2192 Scale: org needs to complete the checkout. The\n  discount is already attached.\n- ``subscription`` \u2014 Paid \u2192 Scale: the existing paid subscription was\n  switched to Scale and the discount applied immediately."
      },
      "OrganizationStatus": {
        "type": "string",
        "enum": [
          "created",
          "review",
          "snoozed",
          "denied",
          "active",
          "blocked",
          "offboarding",
          "offboarded"
        ],
        "title": "OrganizationStatus"
      },
      "OrganizationSubscription": {
        "properties": {
          "subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id",
            "description": "Polar subscription ID. Null when the organization has no active subscription and is on the free plan."
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "plan": {
            "$ref": "#/components/schemas/OrganizationPlan"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "recurring_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval"
          },
          "recurring_interval_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurring Interval Count"
          },
          "current_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Period Start"
          },
          "current_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Period End"
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End",
            "default": false
          },
          "canceled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canceled At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At"
          },
          "pending_change": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationSubscriptionPendingChange"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrganizationSubscriptionDiscount"
              },
              {
                "type": "null"
              }
            ]
          },
          "startup_program_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Startup Program Status",
            "description": "Polar Startup Program status for this organization. Derived from the organization's Startup Program discount: 'invited' when the discount exists and hasn't been redeemed, 'consumed' once it has. Null when the feature is disabled or the organization hasn't been invited."
          },
          "startup_program_scale_product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Startup Program Scale Product Id",
            "description": "Polar product id of the Scale plan, against which the Startup Program discount applies. Null when the feature is disabled."
          }
        },
        "type": "object",
        "required": [
          "status",
          "plan",
          "amount",
          "currency"
        ],
        "title": "OrganizationSubscription"
      },
      "OrganizationSubscriptionDiscount": {
        "properties": {
          "discount_id": {
            "type": "string",
            "title": "Discount Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "type": {
            "type": "string",
            "title": "Type",
            "description": "Discount type: 'percentage' or 'fixed'."
          },
          "duration": {
            "type": "string",
            "title": "Duration",
            "description": "Discount duration: 'once', 'forever', or 'repeating'."
          },
          "duration_in_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration In Months",
            "description": "Number of months the discount repeats; only set for 'repeating'."
          },
          "basis_points": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Basis Points",
            "description": "Percentage in basis points (10000 = 100%); only set for 'percentage'."
          },
          "amounts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amounts",
            "description": "Per-currency fixed amount in cents; only set for 'fixed'."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Estimated date the discount stops applying. Computed for 'repeating' discounts from the subscription's started_at + duration_in_months; null for 'once' and 'forever' durations."
          }
        },
        "type": "object",
        "required": [
          "discount_id",
          "name",
          "type",
          "duration"
        ],
        "title": "OrganizationSubscriptionDiscount",
        "description": "A discount currently applied to the organization's subscription."
      },
      "OrganizationSubscriptionPendingChange": {
        "properties": {
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "applies_at": {
            "type": "string",
            "format": "date-time",
            "title": "Applies At"
          }
        },
        "type": "object",
        "required": [
          "product_id",
          "applies_at"
        ],
        "title": "OrganizationSubscriptionPendingChange"
      },
      "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"
      },
      "OrganizationSubscriptionUpdate": {
        "properties": {
          "product_id": {
            "type": "string",
            "title": "Product Id",
            "description": "Polar product ID to switch the plan to."
          }
        },
        "type": "object",
        "required": [
          "product_id"
        ],
        "title": "OrganizationSubscriptionUpdate"
      },
      "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"
              }
            ]
          },
          "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"
      },
      "OrganizationValidateWebsiteRequest": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Url",
            "description": "The URL to validate."
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "OrganizationValidateWebsiteRequest"
      },
      "OrganizationValidateWebsiteResponse": {
        "properties": {
          "reachable": {
            "type": "boolean",
            "title": "Reachable",
            "description": "Whether the URL is reachable."
          },
          "status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status",
            "description": "HTTP status code returned by the URL."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if the URL is not reachable."
          }
        },
        "type": "object",
        "required": [
          "reachable"
        ],
        "title": "OrganizationValidateWebsiteResponse"
      },
      "OrganizationWithRole": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details Submitted At",
            "description": "When the business details were submitted for review."
          },
          "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"
          },
          "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."
          },
          "role": {
            "$ref": "#/components/schemas/OrganizationRole",
            "description": "The user's role on this organization."
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/OrganizationPermission"
            },
            "type": "array",
            "title": "Permissions",
            "description": "The permissions the user's role grants on this 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",
          "sso_enforced",
          "default_presentment_currency",
          "default_tax_behavior",
          "feature_settings",
          "subscription_settings",
          "customer_email_settings",
          "customer_portal_settings",
          "account_id",
          "payout_account_id",
          "capabilities",
          "role",
          "permissions"
        ],
        "title": "OrganizationWithRole",
        "description": "Variant of `Organization` embedded on `GET /v1/users/me` that\nincludes the user's role on the organization."
      },
      "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/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"
      },
      "PaymentIntentFailedError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PaymentIntentFailedError",
            "title": "Error",
            "examples": [
              "PaymentIntentFailedError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PaymentIntentFailedError"
      },
      "PaymentMethod": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CustomerPaymentMethodCard"
          },
          {
            "$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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "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"
      },
      "Payout": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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/PayoutAccountType"
          },
          "status": {
            "$ref": "#/components/schemas/PayoutStatus"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid At"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "fees_amount": {
            "type": "integer",
            "title": "Fees Amount"
          },
          "gross_amount": {
            "type": "integer",
            "title": "Gross Amount"
          },
          "account_currency": {
            "type": "string",
            "title": "Account Currency"
          },
          "account_amount": {
            "type": "integer",
            "title": "Account Amount"
          },
          "account_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Account Id"
          },
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "is_invoice_generated": {
            "type": "boolean",
            "title": "Is Invoice Generated"
          },
          "transaction_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Transaction Id"
          },
          "fees_transactions": {
            "items": {
              "$ref": "#/components/schemas/TransactionEmbedded"
            },
            "type": "array",
            "title": "Fees Transactions"
          },
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/PayoutAttempt"
            },
            "type": "array",
            "title": "Attempts"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "processor",
          "status",
          "paid_at",
          "currency",
          "amount",
          "fees_amount",
          "gross_amount",
          "account_currency",
          "account_amount",
          "account_id",
          "is_invoice_generated",
          "transaction_id",
          "fees_transactions",
          "attempts"
        ],
        "title": "Payout"
      },
      "PayoutAccount": {
        "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "type": {
            "$ref": "#/components/schemas/PayoutAccountType"
          },
          "processor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processor Id"
          },
          "country": {
            "type": "string",
            "title": "Country"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "is_payout_ready": {
            "type": "boolean",
            "title": "Is Payout Ready"
          },
          "status": {
            "$ref": "#/components/schemas/PayoutAccountStatus"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "modified_at",
          "type",
          "processor_id",
          "country",
          "currency",
          "is_payout_ready",
          "status"
        ],
        "title": "PayoutAccount"
      },
      "PayoutAccountCreate": {
        "properties": {
          "type": {
            "type": "string",
            "const": "stripe",
            "title": "Type"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id",
            "description": "Organization ID to create or get account for"
          },
          "country": {
            "$ref": "#/components/schemas/StripeAccountCountry"
          }
        },
        "type": "object",
        "required": [
          "type",
          "organization_id",
          "country"
        ],
        "title": "PayoutAccountCreate"
      },
      "PayoutAccountLink": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "PayoutAccountLink"
      },
      "PayoutAccountStatus": {
        "type": "string",
        "enum": [
          "incomplete",
          "under_review",
          "paused",
          "ready"
        ],
        "title": "PayoutAccountStatus"
      },
      "PayoutAccountStripeAccountDoesNotExist": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PayoutAccountStripeAccountDoesNotExist",
            "title": "Error",
            "examples": [
              "PayoutAccountStripeAccountDoesNotExist"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PayoutAccountStripeAccountDoesNotExist"
      },
      "PayoutAccountSyncFailed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PayoutAccountSyncFailed",
            "title": "Error",
            "examples": [
              "PayoutAccountSyncFailed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PayoutAccountSyncFailed"
      },
      "PayoutAccountSyncUnsupported": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PayoutAccountSyncUnsupported",
            "title": "Error",
            "examples": [
              "PayoutAccountSyncUnsupported"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PayoutAccountSyncUnsupported"
      },
      "PayoutAccountType": {
        "type": "string",
        "enum": [
          "stripe",
          "manual"
        ],
        "title": "PayoutAccountType"
      },
      "PayoutAttempt": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "payout_id": {
            "type": "string",
            "format": "uuid",
            "title": "Payout Id"
          },
          "processor": {
            "$ref": "#/components/schemas/PayoutAccountType"
          },
          "processor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processor Id"
          },
          "status": {
            "$ref": "#/components/schemas/PayoutAttemptStatus"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "failed_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed Reason"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paid At"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "payout_id",
          "processor",
          "processor_id",
          "status",
          "amount",
          "currency",
          "failed_reason",
          "paid_at"
        ],
        "title": "PayoutAttempt"
      },
      "PayoutAttemptStatus": {
        "type": "string",
        "enum": [
          "pending",
          "in_transit",
          "succeeded",
          "failed"
        ],
        "title": "PayoutAttemptStatus"
      },
      "PayoutCreate": {
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id"
          }
        },
        "type": "object",
        "required": [
          "organization_id"
        ],
        "title": "PayoutCreate"
      },
      "PayoutEstimate": {
        "properties": {
          "account_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Account Id"
          },
          "payout_account_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Payout Account Id"
          },
          "gross_amount": {
            "type": "integer",
            "title": "Gross Amount"
          },
          "fees_amount": {
            "type": "integer",
            "title": "Fees Amount"
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount"
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "payout_account_id",
          "gross_amount",
          "fees_amount",
          "net_amount"
        ],
        "title": "PayoutEstimate"
      },
      "PayoutGenerateInvoice": {
        "properties": {
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          }
        },
        "type": "object",
        "title": "PayoutGenerateInvoice"
      },
      "PayoutInvoice": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "PayoutInvoice"
      },
      "PayoutSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "amount",
          "-amount",
          "fees_amount",
          "-fees_amount",
          "status",
          "-status",
          "payout_account_id",
          "-payout_account_id"
        ],
        "title": "PayoutSortProperty"
      },
      "PayoutStatus": {
        "type": "string",
        "enum": [
          "pending",
          "in_transit",
          "succeeded",
          "failed",
          "canceled",
          "held"
        ],
        "title": "PayoutStatus"
      },
      "PendingSubscriptionUpdate": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "applies_at",
          "product_id",
          "seats"
        ],
        "title": "PendingSubscriptionUpdate",
        "description": "Pending update to be applied to a subscription at the beginning of the next period."
      },
      "PersonalAccessToken": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Scope"
            },
            "type": "array",
            "title": "Scopes"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "comment": {
            "type": "string",
            "title": "Comment"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "scopes",
          "expires_at",
          "comment",
          "last_used_at"
        ],
        "title": "PersonalAccessToken"
      },
      "PlatformFeeType": {
        "type": "string",
        "enum": [
          "payment",
          "international_payment",
          "subscription",
          "invoice",
          "cross_border_transfer",
          "payout",
          "account",
          "dispute",
          "fee_credit",
          "platform"
        ],
        "title": "PlatformFeeType",
        "description": "Type of fees applied by Polar, and billed to the users."
      },
      "PledgeState": {
        "type": "string",
        "enum": [
          "initiated",
          "created",
          "pending",
          "refunded",
          "disputed",
          "charge_disputed",
          "cancelled"
        ],
        "title": "PledgeState"
      },
      "PolarAuthError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PolarAuthError",
            "title": "Error",
            "examples": [
              "PolarAuthError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PolarAuthError"
      },
      "PolarSelfPaymentMethodInUse": {
        "properties": {
          "error": {
            "type": "string",
            "const": "PolarSelfPaymentMethodInUse",
            "title": "Error",
            "examples": [
              "PolarSelfPaymentMethodInUse"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "PolarSelfPaymentMethodInUse"
      },
      "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."
      },
      "PrecheckEntity": {
        "type": "string",
        "enum": [
          "products",
          "prices",
          "customers",
          "subscriptions"
        ],
        "title": "PrecheckEntity"
      },
      "PrecheckEntitySummary": {
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/PrecheckEntity",
            "description": "The source entity type."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "How many were read from the source."
          },
          "importable": {
            "type": "integer",
            "title": "Importable",
            "description": "How many will be imported into Polar."
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped",
            "description": "How many won't be imported and stay on the source."
          }
        },
        "type": "object",
        "required": [
          "entity",
          "total",
          "importable",
          "skipped"
        ],
        "title": "PrecheckEntitySummary"
      },
      "PrecheckIssue": {
        "properties": {
          "level": {
            "$ref": "#/components/schemas/PrecheckIssueLevel"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          }
        },
        "type": "object",
        "required": [
          "level",
          "code",
          "message",
          "source_id"
        ],
        "title": "PrecheckIssue"
      },
      "PrecheckIssueLevel": {
        "type": "string",
        "enum": [
          "blocker",
          "warning"
        ],
        "title": "PrecheckIssueLevel"
      },
      "PrecheckRecordStatus": {
        "type": "string",
        "enum": [
          "importable",
          "skipped"
        ],
        "title": "PrecheckRecordStatus"
      },
      "PrecheckReport": {
        "properties": {
          "can_start": {
            "type": "boolean",
            "title": "Can Start"
          },
          "issues": {
            "items": {
              "$ref": "#/components/schemas/PrecheckIssue"
            },
            "type": "array",
            "title": "Issues"
          },
          "entities": {
            "items": {
              "$ref": "#/components/schemas/PrecheckEntitySummary"
            },
            "type": "array",
            "title": "Entities",
            "description": "Per-entity counts of what will be imported vs stay on the source."
          }
        },
        "type": "object",
        "required": [
          "can_start",
          "issues",
          "entities"
        ],
        "title": "PrecheckReport"
      },
      "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"
      },
      "Processor": {
        "type": "string",
        "enum": [
          "stripe",
          "manual"
        ],
        "title": "Processor",
        "description": "Supported payment or payout processors, i.e rails for transactions."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
          },
          "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",
          "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/ProductPriceMeteredUnitCreate"
                }
              ],
              "discriminator": {
                "propertyName": "amount_type",
                "mapping": {
                  "custom": "#/components/schemas/ProductPriceCustomCreate",
                  "fixed": "#/components/schemas/ProductPriceFixedCreate",
                  "metered_unit": "#/components/schemas/ProductPriceMeteredUnitCreate",
                  "seat_based": "#/components/schemas/ProductPriceSeatBasedCreate"
                }
              }
            },
            "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/ProductPriceMeteredUnitCreate"
                }
              ],
              "discriminator": {
                "propertyName": "amount_type",
                "mapping": {
                  "custom": "#/components/schemas/ProductPriceCustomCreate",
                  "fixed": "#/components/schemas/ProductPriceFixedCreate",
                  "metered_unit": "#/components/schemas/ProductPriceMeteredUnitCreate",
                  "seat_based": "#/components/schemas/ProductPriceSeatBasedCreate"
                }
              }
            },
            "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"
              },
              {
                "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"
          },
          "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."
      },
      "ProductPrice": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ProductPriceFixed"
          },
          {
            "$ref": "#/components/schemas/ProductPriceCustom"
          },
          {
            "$ref": "#/components/schemas/ProductPriceSeatBased"
          },
          {
            "$ref": "#/components/schemas/ProductPriceMeteredUnit"
          }
        ],
        "discriminator": {
          "propertyName": "amount_type",
          "mapping": {
            "custom": "#/components/schemas/ProductPriceCustom",
            "fixed": "#/components/schemas/ProductPriceFixed",
            "metered_unit": "#/components/schemas/ProductPriceMeteredUnit",
            "seat_based": "#/components/schemas/ProductPriceSeatBased"
          }
        }
      },
      "ProductPriceCustom": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
      },
      "ProductPriceMeteredUnit": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "unit_amount": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unit Amount",
            "description": "The price per unit in cents."
          },
          "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."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "source",
          "amount_type",
          "price_currency",
          "tax_behavior",
          "is_archived",
          "product_id",
          "unit_amount",
          "cap_amount",
          "meter_id",
          "meter"
        ],
        "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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",
            "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"
      },
      "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."
          },
          "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/ProductPriceMeteredUnitCreate"
                        }
                      ],
                      "discriminator": {
                        "propertyName": "amount_type",
                        "mapping": {
                          "custom": "#/components/schemas/ProductPriceCustomCreate",
                          "fixed": "#/components/schemas/ProductPriceFixedCreate",
                          "metered_unit": "#/components/schemas/ProductPriceMeteredUnitCreate",
                          "seat_based": "#/components/schemas/ProductPriceSeatBasedCreate"
                        }
                      }
                    }
                  ]
                },
                "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"
      },
      "PropertyGroupStat": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value",
            "description": "The property value."
          },
          "occurrences": {
            "type": "integer",
            "title": "Occurrences",
            "description": "Number of events with this property value."
          },
          "customers": {
            "type": "integer",
            "title": "Customers",
            "description": "Number of distinct customers associated with these events."
          },
          "totals": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "Totals",
            "description": "Sum of each aggregate field across all matching events."
          }
        },
        "type": "object",
        "required": [
          "value",
          "occurrences",
          "customers"
        ],
        "title": "PropertyGroupStat",
        "description": "Aggregate statistics for events grouped by a metadata property value."
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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
          }
        },
        "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
      },
      "ReviewAppealSupportCaseListItem": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "type": {
            "type": "string",
            "const": "review_appeal",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "type"
        ],
        "title": "ReviewAppealSupportCaseListItem"
      },
      "ReviewAppealSupportCaseMessageCreate": {
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "file_ids": {
            "items": {
              "type": "string",
              "format": "uuid4"
            },
            "type": "array",
            "maxItems": 10,
            "title": "File Ids"
          },
          "type": {
            "type": "string",
            "const": "review_appeal",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "ReviewAppealSupportCaseMessageCreate",
        "description": "A reply on a review-appeal case."
      },
      "RevokeNotAllowed": {
        "properties": {
          "error": {
            "type": "string",
            "const": "RevokeNotAllowed",
            "title": "Error",
            "examples": [
              "RevokeNotAllowed"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "RevokeNotAllowed"
      },
      "RevokeTokenResponse": {
        "properties": {},
        "type": "object",
        "title": "RevokeTokenResponse"
      },
      "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"
          }
        },
        "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"
          },
          "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"
      },
      "SSOFactor": {
        "properties": {
          "type": {
            "type": "string",
            "const": "sso",
            "title": "Type",
            "default": "sso"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Connection Id"
          },
          "organization_slug": {
            "type": "string",
            "title": "Organization Slug"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Human-friendly label for the connection, shown on the login page."
          }
        },
        "type": "object",
        "required": [
          "connection_id",
          "organization_slug",
          "name"
        ],
        "title": "SSOFactor"
      },
      "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"
        }
      },
      "SearchResultCustomer": {
        "properties": {
          "type": {
            "type": "string",
            "const": "customer",
            "title": "Type",
            "default": "customer"
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "email"
        ],
        "title": "SearchResultCustomer"
      },
      "SearchResultOrder": {
        "properties": {
          "type": {
            "type": "string",
            "const": "order",
            "title": "Type",
            "default": "order"
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "product_name": {
            "type": "string",
            "title": "Product Name"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          }
        },
        "type": "object",
        "required": [
          "id",
          "customer_name",
          "customer_email",
          "product_name",
          "amount",
          "currency"
        ],
        "title": "SearchResultOrder"
      },
      "SearchResultProduct": {
        "properties": {
          "type": {
            "type": "string",
            "const": "product",
            "title": "Type",
            "default": "product"
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "SearchResultProduct"
      },
      "SearchResultSubscription": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription",
            "title": "Type",
            "default": "subscription"
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "product_name": {
            "type": "string",
            "title": "Product Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          }
        },
        "type": "object",
        "required": [
          "id",
          "customer_name",
          "customer_email",
          "product_name",
          "status",
          "amount",
          "currency"
        ],
        "title": "SearchResultSubscription"
      },
      "SearchResults": {
        "properties": {
          "results": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/SearchResultProduct"
                },
                {
                  "$ref": "#/components/schemas/SearchResultCustomer"
                },
                {
                  "$ref": "#/components/schemas/SearchResultOrder"
                },
                {
                  "$ref": "#/components/schemas/SearchResultSubscription"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "customer": "#/components/schemas/SearchResultCustomer",
                  "order": "#/components/schemas/SearchResultOrder",
                  "product": "#/components/schemas/SearchResultProduct",
                  "subscription": "#/components/schemas/SearchResultSubscription"
                }
              }
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "results"
        ],
        "title": "SearchResults"
      },
      "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"
      },
      "SessionNotFreshError": {
        "properties": {
          "error": {
            "type": "string",
            "const": "SessionNotFreshError",
            "title": "Error",
            "examples": [
              "SessionNotFreshError"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "SessionNotFreshError"
      },
      "SlackIntegration": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id",
            "description": "ID of the Slack integration."
          },
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "Organization that owns the Slack integration."
          },
          "display_name": {
            "type": "string",
            "title": "Display Name",
            "description": "Display name used by the Slack app."
          },
          "slack_app_id": {
            "type": "string",
            "title": "Slack App Id",
            "description": "Slack app ID."
          },
          "client_id": {
            "type": "string",
            "title": "Client Id",
            "description": "Slack client ID."
          },
          "client_id_last_4": {
            "type": "string",
            "title": "Client Id Last 4",
            "description": "Last four characters of the Client ID (display only)."
          },
          "client_secret_last_4": {
            "type": "string",
            "title": "Client Secret Last 4",
            "description": "Last four characters of the client secret (display only)."
          },
          "signing_secret_last_4": {
            "type": "string",
            "title": "Signing Secret Last 4",
            "description": "Last four characters of the signing secret (display only)."
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id",
            "description": "Slack workspace ID, if installed."
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name",
            "description": "Slack workspace name, if installed."
          },
          "bot_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bot User Id",
            "description": "Installed bot user ID, if any."
          },
          "authed_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authed User Id",
            "description": "Slack user ID that authorized the app, if installed."
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes",
            "description": "Granted Slack bot scopes, if any."
          },
          "installed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Installed At",
            "description": "Timestamp when the Slack app was installed."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At",
            "description": "Timestamp when the Slack app was revoked or uninstalled."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "organization_id",
          "display_name",
          "slack_app_id",
          "client_id",
          "client_id_last_4",
          "client_secret_last_4",
          "signing_secret_last_4",
          "team_id",
          "team_name",
          "bot_user_id",
          "authed_user_id",
          "scopes",
          "installed_at",
          "revoked_at"
        ],
        "title": "SlackIntegration"
      },
      "SlackIntegrationCredentialsUpdate": {
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Organization Id",
            "description": "Organization the integration belongs to."
          },
          "display_name": {
            "type": "string",
            "maxLength": 35,
            "minLength": 1,
            "title": "Display Name",
            "description": "Display name used by the bot user in your Slack workspace. Reflected in the manifest."
          },
          "slack_app_id": {
            "type": "string",
            "maxLength": 32,
            "minLength": 11,
            "pattern": "^A[A-Z0-9]+$",
            "title": "Slack App Id",
            "description": "App ID from your Slack app's Basic Information page."
          },
          "client_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 3,
            "pattern": "^[0-9]+\\.[0-9]+$",
            "title": "Client Id",
            "description": "Client ID from your Slack app's Basic Information page."
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret",
            "description": "Client Secret from your Slack app's Basic Information page. Omit to keep the existing value when updating other fields."
          },
          "signing_secret": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Signing Secret",
            "description": "Signing Secret from your Slack app's Basic Information page. Omit to keep the existing value when updating other fields."
          }
        },
        "type": "object",
        "required": [
          "organization_id",
          "display_name",
          "slack_app_id",
          "client_id"
        ],
        "title": "SlackIntegrationCredentialsUpdate"
      },
      "SlackIntegrationManifest": {
        "properties": {
          "manifest": {
            "type": "string",
            "title": "Manifest",
            "description": "YAML manifest to paste into Slack."
          }
        },
        "type": "object",
        "required": [
          "manifest"
        ],
        "title": "SlackIntegrationManifest"
      },
      "SlackIntegrationManifestRequest": {
        "properties": {
          "display_name": {
            "type": "string",
            "maxLength": 35,
            "minLength": 1,
            "title": "Display Name",
            "description": "Name shown in your Slack workspace for the app and bot user. Defaults to your organization name; customize before pasting into Slack."
          }
        },
        "type": "object",
        "required": [
          "display_name"
        ],
        "title": "SlackIntegrationManifestRequest"
      },
      "SlackIntegrationsResponse": {
        "properties": {
          "integrations": {
            "items": {
              "$ref": "#/components/schemas/SlackIntegration"
            },
            "type": "array",
            "title": "Integrations",
            "description": "Slack apps configured for the organization."
          }
        },
        "type": "object",
        "required": [
          "integrations"
        ],
        "title": "SlackIntegrationsResponse"
      },
      "SlackWorkspaceUser": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Slack user ID (e.g. U01234567)."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Username (handle without @)."
          },
          "real_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Real Name",
            "description": "Display name, if set."
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url",
            "description": "Avatar URL (image_72), if available."
          },
          "is_admin": {
            "type": "boolean",
            "title": "Is Admin",
            "description": "Whether the user is a workspace admin.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "SlackWorkspaceUser"
      },
      "SlackWorkspaceUsersResponse": {
        "properties": {
          "users": {
            "items": {
              "$ref": "#/components/schemas/SlackWorkspaceUser"
            },
            "type": "array",
            "title": "Users",
            "description": "Active, non-bot users in the connected Slack workspace."
          }
        },
        "type": "object",
        "required": [
          "users"
        ],
        "title": "SlackWorkspaceUsersResponse"
      },
      "SourceKeyModeMismatch": {
        "properties": {
          "error": {
            "type": "string",
            "const": "SourceKeyModeMismatch",
            "title": "Error",
            "examples": [
              "SourceKeyModeMismatch"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "SourceKeyModeMismatch"
      },
      "SourceNotConnected": {
        "properties": {
          "error": {
            "type": "string",
            "const": "SourceNotConnected",
            "title": "Error",
            "examples": [
              "SourceNotConnected"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "SourceNotConnected"
      },
      "SourceVerificationUnavailable": {
        "properties": {
          "error": {
            "type": "string",
            "const": "SourceVerificationUnavailable",
            "title": "Error",
            "examples": [
              "SourceVerificationUnavailable"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "SourceVerificationUnavailable"
      },
      "StatisticsPeriod": {
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Period timestamp"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start",
            "description": "Period start (inclusive)"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End",
            "description": "Period end (exclusive)"
          },
          "stats": {
            "items": {
              "$ref": "#/components/schemas/EventStatistics"
            },
            "type": "array",
            "title": "Stats",
            "description": "Stats grouped by event name for this period"
          }
        },
        "type": "object",
        "required": [
          "timestamp",
          "period_start",
          "period_end",
          "stats"
        ],
        "title": "StatisticsPeriod",
        "description": "Event statistics for a single time period."
      },
      "StripeAccountCountry": {
        "type": "string",
        "enum": [
          "AL",
          "AG",
          "AR",
          "AM",
          "AU",
          "AT",
          "BH",
          "BE",
          "BO",
          "BA",
          "BG",
          "KH",
          "CA",
          "CL",
          "CO",
          "CR",
          "HR",
          "CY",
          "CZ",
          "CI",
          "DK",
          "DO",
          "EC",
          "EG",
          "SV",
          "EE",
          "ET",
          "FI",
          "FR",
          "GM",
          "DE",
          "GH",
          "GR",
          "GT",
          "GY",
          "HK",
          "HU",
          "IS",
          "IN",
          "ID",
          "IE",
          "IL",
          "IT",
          "JM",
          "JP",
          "JO",
          "KE",
          "KW",
          "LV",
          "LI",
          "LT",
          "LU",
          "MO",
          "MG",
          "MY",
          "MT",
          "MU",
          "MX",
          "MD",
          "MN",
          "MA",
          "NA",
          "NL",
          "NZ",
          "NG",
          "MK",
          "NO",
          "OM",
          "PA",
          "PY",
          "PE",
          "PH",
          "PL",
          "PT",
          "QA",
          "RO",
          "RW",
          "SA",
          "SN",
          "RS",
          "SG",
          "SK",
          "SI",
          "ZA",
          "KR",
          "ES",
          "LK",
          "LC",
          "SE",
          "CH",
          "TZ",
          "TH",
          "TT",
          "TN",
          "TR",
          "AE",
          "GB",
          "US",
          "UY",
          "UZ",
          "VN",
          "DZ",
          "AO",
          "AZ",
          "BS",
          "BD",
          "BJ",
          "BT",
          "BW",
          "BN",
          "GA",
          "KZ",
          "LA",
          "MC",
          "MZ",
          "NE",
          "PK",
          "SM",
          "TW"
        ],
        "title": "StripeAccountCountry"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End",
            "description": "The end timestamp of the current billing period."
          },
          "current_meter_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Start",
            "description": "The start timestamp of the trial period, if any."
          },
          "trial_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "The timestamp when the subscription started."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "The timestamp when the subscription will end."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "The timestamp when the subscription ended."
          },
          "past_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paused At",
            "description": "The timestamp when the subscription was paused."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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"
                },
                {
                  "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",
          "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."
          },
          "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."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "cancel_at_period_end"
        ],
        "title": "SubscriptionCancel"
      },
      "SubscriptionCancelPreview": {
        "properties": {
          "stops_collection": {
            "type": "boolean",
            "title": "Stops Collection",
            "description": "Whether cancelling now also stops collecting the outstanding payment. True for a past-due subscription whose organization has no benefit revocation grace period: cancelling voids the pending order and stops dunning retries."
          },
          "outstanding_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outstanding Amount",
            "description": "Amount in cents still due on the pending order that would be voided, or null when nothing would be dropped."
          }
        },
        "type": "object",
        "required": [
          "stops_collection",
          "outstanding_amount"
        ],
        "title": "SubscriptionCancelPreview",
        "description": "Preview of the effect of cancelling a subscription right now."
      },
      "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."
          },
          "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"
      },
      "SubscriptionChangePreview": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SubscriptionChangePreviewProduct"
          },
          {
            "$ref": "#/components/schemas/SubscriptionChangePreviewSeats"
          }
        ]
      },
      "SubscriptionChangePreviewProduct": {
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Product Id",
            "description": "Preview a change of the subscription to this 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."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "product_id"
        ],
        "title": "SubscriptionChangePreviewProduct"
      },
      "SubscriptionChangePreviewSeats": {
        "properties": {
          "seats": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": -2147483648.0,
            "title": "Seats",
            "description": "Preview a change of the subscription to this number of seats."
          },
          "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": "SubscriptionChangePreviewSeats"
      },
      "SubscriptionChargePreview": {
        "properties": {
          "base_amount": {
            "type": "integer",
            "title": "Base Amount",
            "description": "Base subscription amount in cents (sum of product prices)"
          },
          "metered_amount": {
            "type": "integer",
            "title": "Metered Amount",
            "description": "Total metered usage charges in cents (sum of all meter charges)"
          },
          "proration_amount": {
            "type": "integer",
            "title": "Proration Amount",
            "description": "Net pending proration adjustments in cents from mid-period changes (seat or product changes), to be billed on the next invoice."
          },
          "prorations": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionChargePreviewProration"
            },
            "type": "array",
            "title": "Prorations",
            "description": "Itemized pending proration adjustments to be billed on the next invoice."
          },
          "subtotal_amount": {
            "type": "integer",
            "title": "Subtotal Amount",
            "description": "Subtotal amount in cents (base + metered + prorations, before discount and tax)"
          },
          "discount_amount": {
            "type": "integer",
            "title": "Discount Amount",
            "description": "Discount amount in cents"
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount",
            "description": "Net amount in cents before taxes"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount",
            "description": "Tax amount in cents"
          },
          "total_amount": {
            "type": "integer",
            "title": "Total Amount",
            "description": "Total amount in cents (net + tax, before applying wallet balance)"
          },
          "applied_balance_amount": {
            "type": "integer",
            "title": "Applied Balance Amount",
            "description": "Wallet balance applied to this charge in cents: negative when the customer's account credit reduces the amount due, positive when the charge clears outstanding debt, zero otherwise."
          },
          "due_amount": {
            "type": "integer",
            "title": "Due Amount",
            "description": "Amount actually due in cents: total_amount plus the applied wallet balance, floored at zero. This is the figure charged today."
          }
        },
        "type": "object",
        "required": [
          "base_amount",
          "metered_amount",
          "proration_amount",
          "prorations",
          "subtotal_amount",
          "discount_amount",
          "net_amount",
          "tax_amount",
          "total_amount",
          "applied_balance_amount",
          "due_amount"
        ],
        "title": "SubscriptionChargePreview",
        "description": "Preview of the next charge for a subscription."
      },
      "SubscriptionChargePreviewProration": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human-readable description of the proration."
          },
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "Signed amount in cents: positive to charge, negative to credit."
          }
        },
        "type": "object",
        "required": [
          "label",
          "amount"
        ],
        "title": "SubscriptionChargePreviewProration",
        "description": "A pending proration adjustment to be billed on the next invoice."
      },
      "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."
          },
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Timestamp for when the customer was soft deleted."
          },
          "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",
          "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."
          },
          "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"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
      },
      "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."
          },
          "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."
          },
          "resumes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          },
          "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."
          },
          "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."
          },
          "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."
          }
        },
        "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."
          },
          "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"
          }
        },
        "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."
          },
          "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."
          },
          "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."
          },
          "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"
      },
      "SubscriptionUpdate": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SubscriptionUpdateBase"
          },
          {
            "$ref": "#/components/schemas/SubscriptionUpdateSeats"
          },
          {
            "$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": {
          "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"
              },
              {
                "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."
          }
        },
        "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\nIt is not possible to update the current billing period on a canceled subscription."
          }
        },
        "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."
          },
          "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"
      },
      "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."
          },
          "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"
          },
          "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"
      },
      "SupportCase": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "type": {
            "$ref": "#/components/schemas/SupportCaseType"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "type"
        ],
        "title": "SupportCase"
      },
      "SupportCaseAttachment": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id"
          },
          "file": {
            "$ref": "#/components/schemas/SupportCaseAttachmentFile"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "message_id",
          "file"
        ],
        "title": "SupportCaseAttachment"
      },
      "SupportCaseAttachmentFile": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          }
        },
        "type": "object",
        "required": [
          "name",
          "mime_type",
          "size"
        ],
        "title": "SupportCaseAttachmentFile"
      },
      "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"
              },
              {
                "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"
          },
          "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)."
      },
      "SupportCaseListItem": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DisputeSupportCaseListItem"
          },
          {
            "$ref": "#/components/schemas/ReviewAppealSupportCaseListItem"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "dispute": "#/components/schemas/DisputeSupportCaseListItem",
            "review_appeal": "#/components/schemas/ReviewAppealSupportCaseListItem"
          }
        }
      },
      "SupportCaseMessage": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "type": {
            "$ref": "#/components/schemas/SupportCaseMessageType"
          },
          "author_kind": {
            "$ref": "#/components/schemas/SupportCaseMessageAuthorKind"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "type",
          "author_kind",
          "body"
        ],
        "title": "SupportCaseMessage"
      },
      "SupportCaseMessageAuthorKind": {
        "type": "string",
        "enum": [
          "platform",
          "merchant",
          "customer",
          "system"
        ],
        "title": "SupportCaseMessageAuthorKind"
      },
      "SupportCaseMessageCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ReviewAppealSupportCaseMessageCreate"
          },
          {
            "$ref": "#/components/schemas/DisputeSupportCaseMessageCreate"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "dispute": "#/components/schemas/DisputeSupportCaseMessageCreate",
            "review_appeal": "#/components/schemas/ReviewAppealSupportCaseMessageCreate"
          }
        }
      },
      "SupportCaseMessageType": {
        "type": "string",
        "enum": [
          "chat",
          "opened",
          "closed",
          "assigned",
          "released",
          "appeal_approved",
          "appeal_denied",
          "info_requested",
          "dispute_under_review",
          "dispute_won",
          "dispute_lost",
          "dispute_prevented",
          "merchant_accepted"
        ],
        "title": "SupportCaseMessageType",
        "description": "Known message types. Stored as a plain string column (not a DB enum):\n``chat`` and lifecycle values are generic, while action values are\ndomain-specific and grow per case type. Validated at the app boundary."
      },
      "SupportCaseSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at"
        ],
        "title": "SupportCaseSortProperty"
      },
      "SupportCaseThread": {
        "properties": {
          "case": {
            "$ref": "#/components/schemas/SupportCase"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/SupportCaseMessage"
            },
            "type": "array",
            "title": "Messages"
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/SupportCaseAttachment"
            },
            "type": "array",
            "title": "Attachments"
          },
          "is_open": {
            "type": "boolean",
            "title": "Is Open"
          }
        },
        "type": "object",
        "required": [
          "case",
          "messages",
          "attachments",
          "is_open"
        ],
        "title": "SupportCaseThread"
      },
      "SupportCaseType": {
        "type": "string",
        "enum": [
          "review_appeal",
          "dispute"
        ],
        "title": "SupportCaseType"
      },
      "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/SubscriptionUncanceledEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionProductUpdatedEvent"
          },
          {
            "$ref": "#/components/schemas/SubscriptionSeatsUpdatedEvent"
          },
          {
            "$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.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.update_cleared": "#/components/schemas/SubscriptionUpdateClearedEvent",
            "subscription.updated": "#/components/schemas/SubscriptionUpdatedEvent"
          }
        }
      },
      "TOTPEnable": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "TOTPEnable"
      },
      "TOTPEnrollment": {
        "properties": {
          "secret": {
            "type": "string",
            "title": "Secret"
          },
          "algorithm": {
            "type": "string",
            "title": "Algorithm"
          },
          "digits": {
            "type": "integer",
            "title": "Digits"
          },
          "period": {
            "type": "integer",
            "title": "Period"
          },
          "provisioning_uri": {
            "type": "string",
            "title": "Provisioning Uri"
          }
        },
        "type": "object",
        "required": [
          "secret",
          "algorithm",
          "digits",
          "period",
          "provisioning_uri"
        ],
        "title": "TOTPEnrollment"
      },
      "TOTPStatus": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "TOTPStatus"
      },
      "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"
      },
      "TaxJurisdiction": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Stable identifier for the jurisdiction. For US/Canada it is `{country}-{state}` (e.g. `US-CA`), otherwise the country code (e.g. `GB`)."
          },
          "country": {
            "type": "string",
            "title": "Country",
            "description": "ISO 3166-1 alpha-2 country code.",
            "examples": [
              "US",
              "GB"
            ]
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State",
            "description": "ISO 3166-2 subdivision code, without the country prefix (e.g. `CA`). Only set for US and Canadian jurisdictions."
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "Currency of the remitted tax amount."
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount",
            "description": "Net tax remitted by Polar in this jurisdiction, in the currency's minor unit. Refunds and disputes are netted out."
          },
          "order_count": {
            "type": "integer",
            "title": "Order Count",
            "description": "Number of orders that contributed tax to this jurisdiction."
          },
          "country_name": {
            "type": "string",
            "title": "Country Name",
            "description": "Human-readable country name.",
            "readOnly": true
          },
          "state_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State Name",
            "description": "Human-readable state/province name. Only set for US and Canadian jurisdictions.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "country",
          "currency",
          "tax_amount",
          "order_count",
          "country_name",
          "state_name"
        ],
        "title": "TaxJurisdiction",
        "description": "Aggregated tax remitted by Polar for a single jurisdiction.\n\nUS and Canadian jurisdictions are reported at the state/province level;\nevery other country is aggregated at the country level."
      },
      "TaxJurisdictionSortProperty": {
        "type": "string",
        "enum": [
          "tax_amount",
          "-tax_amount",
          "order_count",
          "-order_count",
          "country",
          "-country"
        ],
        "title": "TaxJurisdictionSortProperty"
      },
      "TaxSummary": {
        "properties": {
          "currency": {
            "type": "string",
            "title": "Currency",
            "description": "Currency of the remitted tax amount."
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount",
            "description": "Net tax remitted by Polar across all jurisdictions, in the currency's minor unit. Refunds and disputes are netted out."
          },
          "order_count": {
            "type": "integer",
            "title": "Order Count",
            "description": "Number of orders that contributed tax across all jurisdictions."
          },
          "jurisdiction_count": {
            "type": "integer",
            "title": "Jurisdiction Count",
            "description": "Number of distinct jurisdictions tax was remitted in."
          }
        },
        "type": "object",
        "required": [
          "currency",
          "tax_amount",
          "order_count",
          "jurisdiction_count"
        ],
        "title": "TaxSummary",
        "description": "Aggregated tax remitted by Polar across all jurisdictions.\n\nTotals span the full filtered dataset, independent of the pagination\napplied to the jurisdiction breakdown."
      },
      "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"
      },
      "Transaction": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "type": {
            "$ref": "#/components/schemas/TransactionType"
          },
          "processor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Processor"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount"
          },
          "account_currency": {
            "type": "string",
            "title": "Account Currency"
          },
          "account_amount": {
            "type": "integer",
            "title": "Account Amount"
          },
          "presentment_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presentment Amount"
          },
          "presentment_tax_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presentment Tax Amount"
          },
          "presentment_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presentment Currency"
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exchange Rate"
          },
          "platform_fee_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlatformFeeType"
              },
              {
                "type": "null"
              }
            ]
          },
          "pledge_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pledge Id"
          },
          "issue_reward_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issue Reward Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "payout_transaction_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payout Transaction Id"
          },
          "incurred_by_transaction_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Incurred By Transaction Id"
          },
          "pledge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransactionPledge"
              },
              {
                "type": "null"
              }
            ]
          },
          "issue_reward": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransactionIssueReward"
              },
              {
                "type": "null"
              }
            ]
          },
          "order": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransactionOrder"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_incurred_transactions": {
            "items": {
              "$ref": "#/components/schemas/TransactionEmbedded"
            },
            "type": "array",
            "title": "Account Incurred Transactions"
          },
          "payment_transaction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransactionEmbedded"
              },
              {
                "type": "null"
              }
            ]
          },
          "incurred_amount": {
            "type": "integer",
            "title": "Incurred Amount"
          },
          "gross_amount": {
            "type": "integer",
            "title": "Gross Amount"
          },
          "net_amount": {
            "type": "integer",
            "title": "Net Amount"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "type",
          "processor",
          "currency",
          "amount",
          "tax_amount",
          "account_currency",
          "account_amount",
          "presentment_amount",
          "presentment_tax_amount",
          "presentment_currency",
          "exchange_rate",
          "platform_fee_type",
          "pledge_id",
          "issue_reward_id",
          "order_id",
          "payout_transaction_id",
          "incurred_by_transaction_id",
          "pledge",
          "issue_reward",
          "order",
          "account_incurred_transactions",
          "payment_transaction",
          "incurred_amount",
          "gross_amount",
          "net_amount"
        ],
        "title": "Transaction"
      },
      "TransactionEmbedded": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "type": {
            "$ref": "#/components/schemas/TransactionType"
          },
          "processor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Processor"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "tax_amount": {
            "type": "integer",
            "title": "Tax Amount"
          },
          "account_currency": {
            "type": "string",
            "title": "Account Currency"
          },
          "account_amount": {
            "type": "integer",
            "title": "Account Amount"
          },
          "presentment_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presentment Amount"
          },
          "presentment_tax_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presentment Tax Amount"
          },
          "presentment_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presentment Currency"
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exchange Rate"
          },
          "platform_fee_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlatformFeeType"
              },
              {
                "type": "null"
              }
            ]
          },
          "pledge_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pledge Id"
          },
          "issue_reward_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issue Reward Id"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Id"
          },
          "payout_transaction_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payout Transaction Id"
          },
          "incurred_by_transaction_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Incurred By Transaction Id"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "type",
          "processor",
          "currency",
          "amount",
          "tax_amount",
          "account_currency",
          "account_amount",
          "presentment_amount",
          "presentment_tax_amount",
          "presentment_currency",
          "exchange_rate",
          "platform_fee_type",
          "pledge_id",
          "issue_reward_id",
          "order_id",
          "payout_transaction_id",
          "incurred_by_transaction_id"
        ],
        "title": "TransactionEmbedded"
      },
      "TransactionIssueReward": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "issue_reference": {
            "type": "string",
            "title": "Issue Reference"
          },
          "share_thousands": {
            "type": "integer",
            "title": "Share Thousands"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "issue_reference",
          "share_thousands"
        ],
        "title": "TransactionIssueReward"
      },
      "TransactionOrder": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransactionProduct"
              },
              {
                "type": "null"
              }
            ]
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Id"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "product",
          "subscription_id"
        ],
        "title": "TransactionOrder"
      },
      "TransactionOrganization": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "slug",
          "avatar_url"
        ],
        "title": "TransactionOrganization"
      },
      "TransactionPledge": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "state": {
            "$ref": "#/components/schemas/PledgeState"
          },
          "issue_reference": {
            "type": "string",
            "title": "Issue Reference"
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "state",
          "issue_reference"
        ],
        "title": "TransactionPledge"
      },
      "TransactionProduct": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
          },
          "recurring_interval": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              },
              {
                "type": "null"
              }
            ]
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "organization": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransactionOrganization"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "name",
          "recurring_interval",
          "organization_id",
          "organization"
        ],
        "title": "TransactionProduct"
      },
      "TransactionSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "amount",
          "-amount"
        ],
        "title": "TransactionSortProperty"
      },
      "TransactionType": {
        "type": "string",
        "enum": [
          "payment",
          "processor_fee",
          "refund",
          "refund_reversal",
          "dispute",
          "dispute_reversal",
          "balance",
          "payout",
          "payout_reversal"
        ],
        "title": "TransactionType",
        "description": "Type of transactions."
      },
      "TransactionsBalance": {
        "properties": {
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "account_currency": {
            "type": "string",
            "title": "Account Currency"
          },
          "account_amount": {
            "type": "integer",
            "title": "Account Amount"
          }
        },
        "type": "object",
        "required": [
          "currency",
          "amount",
          "account_currency",
          "account_amount"
        ],
        "title": "TransactionsBalance"
      },
      "TransactionsHeldBalance": {
        "properties": {
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "account_currency": {
            "type": "string",
            "title": "Account Currency"
          },
          "account_amount": {
            "type": "integer",
            "title": "Account Amount"
          },
          "next_release_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Release At",
            "description": "When the next chunk of the held balance becomes available for payout."
          },
          "next_release_amount": {
            "type": "integer",
            "title": "Next Release Amount",
            "description": "Amount becoming available for payout at `next_release_at`."
          },
          "next_release_account_amount": {
            "type": "integer",
            "title": "Next Release Account Amount",
            "description": "Amount becoming available for payout at `next_release_at`, in the account's currency."
          },
          "fully_available_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fully Available At",
            "description": "When the whole held balance has become available for payout."
          }
        },
        "type": "object",
        "required": [
          "currency",
          "amount",
          "account_currency",
          "account_amount",
          "next_release_at",
          "next_release_amount",
          "next_release_account_amount",
          "fully_available_at"
        ],
        "title": "TransactionsHeldBalance"
      },
      "TransactionsSummary": {
        "properties": {
          "balance": {
            "$ref": "#/components/schemas/TransactionsBalance"
          },
          "available_balance": {
            "$ref": "#/components/schemas/TransactionsBalance"
          },
          "held_balance": {
            "$ref": "#/components/schemas/TransactionsHeldBalance"
          },
          "payout": {
            "$ref": "#/components/schemas/TransactionsBalance"
          }
        },
        "type": "object",
        "required": [
          "balance",
          "available_balance",
          "held_balance",
          "payout"
        ],
        "title": "TransactionsSummary"
      },
      "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"
      },
      "UnsupportedMigrationSource": {
        "properties": {
          "error": {
            "type": "string",
            "const": "UnsupportedMigrationSource",
            "title": "Error",
            "examples": [
              "UnsupportedMigrationSource"
            ]
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "error",
          "detail"
        ],
        "title": "UnsupportedMigrationSource"
      },
      "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"
      },
      "UserDeletionBlockedReason": {
        "type": "string",
        "enum": [
          "has_active_organizations"
        ],
        "title": "UserDeletionBlockedReason",
        "description": "Reasons why a user account cannot be immediately deleted."
      },
      "UserDeletionResponse": {
        "properties": {
          "deleted": {
            "type": "boolean",
            "title": "Deleted",
            "description": "Whether the user account was immediately deleted"
          },
          "blocked_reasons": {
            "items": {
              "$ref": "#/components/schemas/UserDeletionBlockedReason"
            },
            "type": "array",
            "title": "Blocked Reasons",
            "description": "Reasons why immediate deletion is blocked"
          },
          "blocking_organizations": {
            "items": {
              "$ref": "#/components/schemas/BlockingOrganization"
            },
            "type": "array",
            "title": "Blocking Organizations",
            "description": "Organizations that must be deleted first"
          }
        },
        "type": "object",
        "required": [
          "deleted"
        ],
        "title": "UserDeletionResponse",
        "description": "Response for user deletion request."
      },
      "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."
          },
          "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."
      },
      "UserIdentityVerification": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "client_secret": {
            "type": "string",
            "title": "Client Secret"
          }
        },
        "type": "object",
        "required": [
          "id",
          "client_secret"
        ],
        "title": "UserIdentityVerification"
      },
      "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"
      },
      "UserOrganizationNotificationSettings": {
        "properties": {
          "notification_settings": {
            "$ref": "#/components/schemas/OrganizationNotificationSettings",
            "description": "The authenticated user's notification preferences for this organization."
          }
        },
        "type": "object",
        "required": [
          "notification_settings"
        ],
        "title": "UserOrganizationNotificationSettings"
      },
      "UserOrganizationNotificationSettingsUpdate": {
        "properties": {
          "notification_settings": {
            "$ref": "#/components/schemas/OrganizationNotificationSettings",
            "description": "The notification settings to store for the current user on this organization."
          }
        },
        "type": "object",
        "required": [
          "notification_settings"
        ],
        "title": "UserOrganizationNotificationSettingsUpdate"
      },
      "UserRead": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modified At",
            "description": "Last modification timestamp of the object."
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "accepted_terms_of_service": {
            "type": "boolean",
            "title": "Accepted Terms Of Service"
          },
          "is_admin": {
            "type": "boolean",
            "title": "Is Admin"
          },
          "identity_verified": {
            "type": "boolean",
            "title": "Identity Verified"
          },
          "identity_verification_status": {
            "$ref": "#/components/schemas/IdentityVerificationStatus"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "date_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Of Birth"
          },
          "oauth_accounts": {
            "items": {
              "$ref": "#/components/schemas/OAuthAccountRead"
            },
            "type": "array",
            "title": "Oauth Accounts"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/OrganizationWithRole"
            },
            "type": "array",
            "title": "Organizations",
            "description": "Organizations the user is a member of and can access in the current session, with their role on each. Populated by `GET /v1/users/me`; empty otherwise."
          },
          "member_organizations": {
            "items": {
              "$ref": "#/components/schemas/MemberOrganization"
            },
            "type": "array",
            "title": "Member Organizations",
            "description": "All organizations the user is a member of, regardless of whether they're accessible in the current session. Compare with `organizations` (the accessible subset) to determine access. Populated by `GET /v1/users/me`."
          },
          "organization_scoped": {
            "type": "boolean",
            "title": "Organization Scoped",
            "description": "Whether the current session is restricted to a specific organization. Such sessions cannot access other organizations or create new ones. Populated by `GET /v1/users/me`.",
            "default": false
          },
          "email_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Hash",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "email",
          "avatar_url",
          "account_id",
          "id",
          "accepted_terms_of_service",
          "is_admin",
          "identity_verified",
          "identity_verification_status",
          "first_name",
          "last_name",
          "country",
          "date_of_birth",
          "oauth_accounts",
          "email_hash"
        ],
        "title": "UserRead"
      },
      "UserScopes": {
        "properties": {
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Scope"
            },
            "type": "array",
            "title": "Scopes"
          }
        },
        "type": "object",
        "required": [
          "scopes"
        ],
        "title": "UserScopes"
      },
      "UserUpdate": {
        "properties": {
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "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"
              }
            ]
          },
          "date_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Of Birth"
          },
          "accepted_terms_of_service": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted Terms Of Service"
          }
        },
        "type": "object",
        "title": "UserUpdate"
      },
      "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Validated At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
      },
      "VarianceEvent": {
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Event Id",
            "description": "The root event ID."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The event name."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "Polar customer ID."
          },
          "external_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Customer Id",
            "description": "External customer ID."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Timestamp of the root event."
          },
          "values": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "Values",
            "description": "Aggregate totals for this trace."
          },
          "averages": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "Averages",
            "description": "Average per-trace value for this event name."
          },
          "p99": {
            "additionalProperties": {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            "type": "object",
            "title": "P99",
            "description": "p99 per-trace value for this event name."
          }
        },
        "type": "object",
        "required": [
          "event_id",
          "name",
          "customer_id",
          "external_customer_id",
          "timestamp"
        ],
        "title": "VarianceEvent",
        "description": "A root event whose aggregate value is at or above the p99 for its event name."
      },
      "ViewCostsAction": {
        "properties": {
          "type": {
            "type": "string",
            "const": "view_costs",
            "title": "Type",
            "default": "view_costs"
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Button label."
          },
          "event_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid4"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Id",
            "description": "Root event id of the single largest outlier trace, deep-linked to its span. Null routes to the costs overview instead."
          }
        },
        "type": "object",
        "required": [
          "label",
          "event_id"
        ],
        "title": "ViewCostsAction",
        "description": "A drill-down to the cost analytics, where per-trace anomalies live.\n\nUnlike `view_metric`, costs are not a single metric slug: they have their\nown analytics with a p99 anomaly breakdown. When `event_id` is set, the\nclient deep-links to that specific outlier event's span; otherwise it lands\non the costs overview. The client owns the routing either way."
      },
      "ViewMetricAction": {
        "properties": {
          "type": {
            "type": "string",
            "const": "view_metric",
            "title": "Type",
            "default": "view_metric"
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Button label."
          },
          "metric": {
            "type": "string",
            "title": "Metric",
            "description": "Slug of the metric this insight is about (e.g. `monthly_recurring_revenue`). The client owns the routing and resolves it to the matching analytics page."
          }
        },
        "type": "object",
        "required": [
          "label",
          "metric"
        ],
        "title": "ViewMetricAction",
        "description": "A drill-down that points at the metric behind the insight."
      },
      "Visibility": {
        "type": "string",
        "enum": [
          "draft",
          "private",
          "public"
        ],
        "title": "Visibility"
      },
      "Wallet": {
        "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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": "Wallet",
        "description": "A wallet represents a customer's balance in your organization.\n\nThey can top-up their wallet, and use the balance to pay for usage."
      },
      "WalletSortProperty": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "balance",
          "-balance"
        ],
        "title": "WalletSortProperty"
      },
      "WalletTopUpCreate": {
        "properties": {
          "amount": {
            "type": "integer",
            "title": "Amount",
            "description": "The amount to top-up the wallet by, in cents.",
            "examples": [
              2000
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "usd",
            "title": "Currency",
            "description": "The currency. Currently, only `usd` is supported. It should match the wallet's currency."
          }
        },
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "title": "WalletTopUpCreate",
        "description": "Request schema to top-up a wallet."
      },
      "WalletType": {
        "type": "string",
        "enum": [
          "usage",
          "billing"
        ],
        "title": "WalletType"
      },
      "WebhookBenefitCreatedPayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "benefit.created",
            "title": "Type",
            "examples": [
              "benefit.created"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "data": {
            "$ref": "#/components/schemas/Benefit",
            "title": "Benefit"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/BenefitGrantWebhook",
            "title": "BenefitGrantWebhook"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/BenefitGrantWebhook",
            "title": "BenefitGrantWebhook"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/BenefitGrantWebhook",
            "title": "BenefitGrantWebhook"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/BenefitGrantWebhook",
            "title": "BenefitGrantWebhook"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Benefit",
            "title": "Benefit"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Checkout"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Checkout"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Checkout"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Customer"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Customer"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/CustomerSeat"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/CustomerSeat"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/CustomerSeat"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/CustomerState"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Customer"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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"
          },
          "data": {
            "$ref": "#/components/schemas/Discount",
            "title": "Discount"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Discount",
            "title": "Discount"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Discount",
            "title": "Discount"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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."
          }
        },
        "type": "object",
        "required": [
          "created_at",
          "modified_at",
          "id",
          "url",
          "format",
          "secret",
          "organization_id",
          "events",
          "enabled"
        ],
        "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."
          },
          "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": "WebhookEndpointCreate",
        "description": "Schema to create a webhook endpoint."
      },
      "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."
          },
          "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."
          }
        },
        "type": "object",
        "title": "WebhookEndpointUpdate",
        "description": "Schema to update a webhook endpoint."
      },
      "WebhookEvent": {
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp of the object."
          },
          "modified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "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."
          },
          "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",
          "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",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Organization"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Product"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Product"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Refund"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Refund"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
      },
      "WebhookSubscriptionPastDuePayload": {
        "properties": {
          "type": {
            "type": "string",
            "const": "subscription.past_due",
            "title": "Type",
            "examples": [
              "subscription.past_due"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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"
          },
          "data": {
            "$ref": "#/components/schemas/Subscription"
          }
        },
        "type": "object",
        "required": [
          "type",
          "timestamp",
          "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."
    }
  ]
}