{
    "openapi": "3.1.0",
    "info": {
        "title": "Regoria merchant API",
        "version": "1.0.0",
        "description": "The merchant API of Regoria: products and plans, hosted checkout and orders, customers and the portal, charges, refunds and payment methods, subscriptions, balance and payouts, disputes, webhook endpoints and your account. Amounts are integer cents in USD. Every call takes your API key as the bearer token.",
        "contact": {
            "email": "support@staging.regoria.com"
        },
        "x-kit-fingerprint": "76578438367c"
    },
    "servers": [
        {
            "url": "https://api.staging.regoria.com",
            "description": "Live (mor_live_ keys)"
        },
        {
            "url": "https://api.sandbox.staging.regoria.com",
            "description": "Sandbox (mor_test_ keys)"
        }
    ],
    "security": [
        {
            "apiKey": []
        }
    ],
    "tags": [
        {
            "name": "Catalog",
            "description": "Products, their prices and the plans a subscription follows."
        },
        {
            "name": "Checkout sessions",
            "description": "Hosted checkout: open a session, send the buyer, receive the order."
        },
        {
            "name": "Orders",
            "description": "Paid orders, server-side charges on a saved card, fulfilment and receipts."
        },
        {
            "name": "Customers",
            "description": "Your customers as the API knows them, keyed by your own customer reference."
        },
        {
            "name": "Portal",
            "description": "One-time links into the hosted customer portal."
        },
        {
            "name": "Charges",
            "description": "Card charges behind orders and renewals (read-only)."
        },
        {
            "name": "Refunds",
            "description": "Full and partial refunds of a charge."
        },
        {
            "name": "Payment methods",
            "description": "Saved cards: list, inspect and remove."
        },
        {
            "name": "Subscriptions",
            "description": "Recurring billing: plan changes, pause and resume, past due, cancellation."
        },
        {
            "name": "Balance and payouts",
            "description": "Your balance, balance transactions and what each payout settled."
        },
        {
            "name": "Disputes",
            "description": "Chargebacks and retrievals opened against your charges (read-only)."
        },
        {
            "name": "Webhook endpoints",
            "description": "Where events are delivered, the signing secret, deliveries and replays."
        },
        {
            "name": "Account",
            "description": "Your merchant profile, API keys, users and the terms you accepted."
        }
    ],
    "paths": {
        "/v1/prices": {
            "get": {
                "tags": [
                    "Catalog"
                ],
                "summary": "List prices",
                "description": "Sort keys: `created_at`, `price_version`, `amount_cents`, `active_from`, `active_to` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.prices.read`.",
                "operationId": "pricesList",
                "x-kit-scope": "v1.prices.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "product_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "active",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CataloguePrice"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/prices \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.prices.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->prices()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            },
            "post": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Create a price",
                "description": "Adds a one-off or recurring price to a product beside its other active prices. With `replaces_price_id` it is a successor that archives the price it replaces.\n\nScope: `v1.prices.write`.",
                "operationId": "pricesCreate",
                "x-kit-scope": "v1.prices.write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CataloguePriceRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CataloguePrice"
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/Validation"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/prices \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"product_id\": \"prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"type\": \"recurring\",\n    \"amount_cents\": 2900,\n    \"recurring\": {\n        \"interval\": \"month\",\n        \"interval_count\": 1,\n        \"trial_interval\": \"day\",\n        \"trial_interval_count\": 14,\n        \"trial_price_cents\": 0\n    },\n    \"nickname\": \"Pro monthly\",\n    \"tax_inclusive\": false\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.prices.create({\n  product_id: 'prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  amount_cents: 2900,\n  effective_at: '2026-10-21T14:05:00.000Z',\n  tax_inclusive: false\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->prices()->create([\n    'product_id' => 'prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'amount_cents' => 2900,\n    'effective_at' => '2026-10-21T14:05:00.000Z',\n    'tax_inclusive' => false,\n]);"
                    }
                ]
            }
        },
        "/v1/prices/{price}": {
            "get": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Get a price",
                "description": "Scope: `v1.prices.read`.",
                "operationId": "pricesGet",
                "x-kit-scope": "v1.prices.read",
                "parameters": [
                    {
                        "name": "price",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CataloguePrice"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/prices/prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.prices.get('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->prices()->get('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Update a price",
                "description": "Updates a price's nickname and metadata. Nothing else of a price changes.\n\nScope: `v1.prices.write`.",
                "operationId": "pricesUpdate",
                "x-kit-scope": "v1.prices.write",
                "parameters": [
                    {
                        "name": "price",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CataloguePriceUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CataloguePrice"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/Validation"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X PATCH https://api.sandbox.staging.regoria.com/v1/prices/prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"nickname\": \"Pro monthly\",\n    \"metadata\": {\n        \"crm_ref\": \"CRM-1001\"\n    }\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.prices.update('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  nickname: 'Pro monthly',\n  metadata: {\n    crm_ref: 'CRM-1001'\n  }\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->prices()->update('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'nickname' => 'Pro monthly',\n    'metadata' => [\n        'crm_ref' => 'CRM-1001',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/prices/{price}/archive": {
            "post": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Archive a price",
                "description": "No new checkout sells an archived price. Existing subscriptions keep renewing on it.\n\nScope: `v1.prices.write`.",
                "operationId": "pricesArchive",
                "x-kit-scope": "v1.prices.write",
                "parameters": [
                    {
                        "name": "price",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CataloguePrice"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/Validation"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/prices/prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C/archive \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.prices.archive('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->prices()->archive('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/prices/{price}/preview": {
            "get": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Preview a price",
                "description": "Returns what a price would cost a buyer in a country, for your storefront's display: the currency the hosted checkout would open in for that country and the price's amount in it (its own amount, the fixed amount set in that currency, or converted at the rate in force). Nothing is created or locked: the checkout session locks its own rate.\n\nScope: `v1.prices.read`.",
                "operationId": "pricesPreview",
                "x-kit-scope": "v1.prices.read",
                "parameters": [
                    {
                        "name": "price",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "the buyer's country, ISO 3166-1 alpha-2; absent, the price currency",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "currency",
                        "in": "query",
                        "required": false,
                        "description": "ask for one currency instead of the country's (422 as a session that forces it)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutPricePreview"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/Validation"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/prices/prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C/preview \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.prices.preview('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->prices()->preview('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/prices/{price}/unarchive": {
            "post": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Unarchive a price",
                "description": "A price that already has a successor stays archived (409 `price_superseded`).\n\nScope: `v1.prices.write`.",
                "operationId": "pricesUnarchive",
                "x-kit-scope": "v1.prices.write",
                "parameters": [
                    {
                        "name": "price",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CataloguePrice"
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/prices/prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C/unarchive \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.prices.unarchive('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->prices()->unarchive('prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/products": {
            "get": {
                "tags": [
                    "Catalog"
                ],
                "summary": "List products",
                "description": "Sort keys: `created_at`, `updated_at`, `name`, `status`, `tax_code` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.products.read`.",
                "operationId": "productsList",
                "x-kit-scope": "v1.products.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "status[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "ProductStatus",
                                "enum": [
                                    "active",
                                    "archived"
                                ]
                            }
                        }
                    },
                    {
                        "name": "id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "name, description or id contains",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CatalogueProduct"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/products \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.products.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->products()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            },
            "post": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Create a product",
                "description": "Creates a product with its first price.\n\nScope: `v1.products.write`.",
                "operationId": "productsCreate",
                "x-kit-scope": "v1.products.write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CatalogueProductRequest2"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CatalogueProduct"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/Validation"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/products \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Starter pack\",\n    \"sku\": \"SKU-001\",\n    \"tax_code\": \"text\",\n    \"amount_cents\": 2900,\n    \"metadata\": {\n        \"crm_ref\": \"CRM-1001\"\n    }\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.products.create({\n  name: 'Starter pack',\n  type: 'card',\n  tax_code: 'text',\n  amount_cents: 2900,\n  metadata: {\n    sku: 'SKU-001'\n  }\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->products()->create([\n    'name' => 'Starter pack',\n    'type' => 'card',\n    'tax_code' => 'text',\n    'amount_cents' => 2900,\n    'metadata' => [\n        'sku' => 'SKU-001',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/products/{product}": {
            "get": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Get a product",
                "description": "Returns a product with its active prices.\n\nScope: `v1.products.read`.",
                "operationId": "productsGet",
                "x-kit-scope": "v1.products.read",
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CatalogueProduct"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/products/prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.products.get('prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->products()->get('prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Update a product",
                "description": "Updates a product's name, description, tax code, sku or metadata. Send the row `version` you read.\n\nScope: `v1.products.write`.",
                "operationId": "productsUpdate",
                "x-kit-scope": "v1.products.write",
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CatalogueProductUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CatalogueProduct"
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X PATCH https://api.sandbox.staging.regoria.com/v1/products/prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Starter pack\",\n    \"version\": 1\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.products.update('prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  name: 'Starter pack',\n  version: 1\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->products()->update('prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'name' => 'Starter pack',\n    'version' => 1,\n]);"
                    }
                ]
            }
        },
        "/v1/products/{product}/archive": {
            "post": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Archive a product",
                "description": "The product leaves the catalog. Existing orders and subscriptions are untouched.\n\nScope: `v1.products.write`.",
                "operationId": "productsArchive",
                "x-kit-scope": "v1.products.write",
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CatalogueArchiveRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CatalogueProduct"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/products/prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C/archive \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"version\": 1\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.products.archive('prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  version: 1\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->products()->archive('prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'version' => 1,\n]);"
                    }
                ]
            }
        },
        "/v1/products/{product}/unarchive": {
            "post": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Unarchive a product",
                "description": "The product returns to the catalog with the prices it kept. A product that is already active is returned as it is.\n\nScope: `v1.products.write`.",
                "operationId": "productsUnarchive",
                "x-kit-scope": "v1.products.write",
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CatalogueArchiveRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CatalogueProduct"
                                }
                            }
                        }
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/products/prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C/unarchive \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"version\": 1\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.products.unarchive('prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  version: 1\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->products()->unarchive('prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'version' => 1,\n]);"
                    }
                ]
            }
        },
        "/v1/checkout-sessions": {
            "post": {
                "tags": [
                    "Checkout sessions"
                ],
                "summary": "Create a checkout session",
                "description": "Opens a hosted checkout session and returns the URL to send the buyer to. Answers 503 with `Retry-After` when the session cannot be opened safely yet; retry with the same `Idempotency-Key`.\n\nScope: `v1.checkout_sessions.write`.\n\nRequires `Idempotency-Key`; the same key replays the first answer for 24 hours.",
                "operationId": "checkoutSessionsCreate",
                "x-kit-scope": "v1.checkout_sessions.write",
                "x-kit-idempotent": true,
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutSessionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutSession"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "stale: a local copy is behind · payment_config_unavailable: Payments cannot provide the card form settings; retry after the header",
                        "headers": {
                            "Retry-After": {
                                "$ref": "#/components/headers/Retry-After"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/checkout-sessions \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"store_id\": \"sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"mode\": \"setup\",\n    \"subscription_id\": \"sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"buyer_email\": \"buyer@example.com\",\n    \"buyer_id\": \"buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"buyer_name\": \"Jamie Rivera\",\n    \"customer_ref\": \"cus_A1B2\",\n    \"reference\": \"INV-1001\",\n    \"billing_address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Suite 200\",\n        \"city\": \"Austin\",\n        \"state\": \"TX\",\n        \"postal_code\": \"73301\",\n        \"country\": \"US\"\n    },\n    \"save_payment_method\": false,\n    \"success_url\": \"https://shop.example.com/thanks\",\n    \"cancel_url\": \"https://shop.example.com/cart\",\n    \"metadata\": {\n        \"crm_ref\": \"CRM-1001\"\n    }\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.checkoutSessions.create({\n  store_id: 'sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  mode: 'setup',\n  lines: [\n    {\n      price_id: 'prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n      quantity: 1\n    }\n  ],\n  subscription_id: 'sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  buyer_email: 'buyer@example.com',\n  buyer_id: 'buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  buyer_name: 'Jamie Rivera',\n  customer_ref: 'cus_A1B2',\n  reference: 'INV-1001',\n  billing_address: {\n    line1: '1 Main St',\n    line2: 'Suite 200',\n    city: 'Austin',\n    state: 'TX',\n    postal_code: '73301',\n    country: 'US'\n  },\n  save_payment_method: false,\n  success_url: 'https://shop.example.com/thanks',\n  cancel_url: 'https://shop.example.com/cart',\n  metadata: {\n    crm_ref: 'CRM-1001'\n  }\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->checkoutSessions()->create([\n    'store_id' => 'sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'mode' => 'setup',\n    'lines' => [\n        [\n            'price_id' => 'prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n            'quantity' => 1,\n        ],\n    ],\n    'subscription_id' => 'sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'buyer_email' => 'buyer@example.com',\n    'buyer_id' => 'buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'buyer_name' => 'Jamie Rivera',\n    'customer_ref' => 'cus_A1B2',\n    'reference' => 'INV-1001',\n    'billing_address' => [\n        'line1' => '1 Main St',\n        'line2' => 'Suite 200',\n        'city' => 'Austin',\n        'state' => 'TX',\n        'postal_code' => '73301',\n        'country' => 'US',\n    ],\n    'save_payment_method' => false,\n    'success_url' => 'https://shop.example.com/thanks',\n    'cancel_url' => 'https://shop.example.com/cart',\n    'metadata' => [\n        'crm_ref' => 'CRM-1001',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/checkout-sessions/{session}": {
            "get": {
                "tags": [
                    "Checkout sessions"
                ],
                "summary": "Get a checkout session",
                "description": "Scope: `v1.checkout_sessions.write`.",
                "operationId": "checkoutSessionsGet",
                "x-kit-scope": "v1.checkout_sessions.write",
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutSession"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/checkout-sessions/cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.checkoutSessions.get('cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->checkoutSessions()->get('cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/checkout-sessions/{session}/expire": {
            "post": {
                "tags": [
                    "Checkout sessions"
                ],
                "summary": "Expire a checkout session",
                "description": "Cancels an open session. The buyer can no longer pay on it.\n\nScope: `v1.checkout_sessions.write`.",
                "operationId": "checkoutSessionsExpire",
                "x-kit-scope": "v1.checkout_sessions.write",
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutSession"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/checkout-sessions/cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C/expire \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.checkoutSessions.expire('cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->checkoutSessions()->expire('cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/orders": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "List orders",
                "description": "Sort keys: `created_at`, `captured_at`, `total_cents`, `subtotal_cents`, `refunded_cents`, `status`, `buyer_email`, `buyer_name`, `source`, `fulfilled_at` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.orders.read`.",
                "operationId": "ordersList",
                "x-kit-scope": "v1.orders.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "status[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "OrderStatus",
                                "enum": [
                                    "paid",
                                    "fulfilled",
                                    "refunded",
                                    "partially_refunded",
                                    "access_revoked"
                                ]
                            }
                        }
                    },
                    {
                        "name": "source[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "OrderSource",
                                "enum": [
                                    "hosted",
                                    "server",
                                    "renewal",
                                    "console"
                                ]
                            }
                        }
                    },
                    {
                        "name": "subscription_public_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "buyer_public_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "buyer_email[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "id, buyer email, buyer name or charge id contains",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_ref",
                        "in": "query",
                        "description": "exact match on the merchant's customer reference; orders of sessions without one hold none",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "exact match on the customer's cus_ id; orders of sessions without a customer hold none",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "reference",
                        "in": "query",
                        "description": "exact match on the merchant's own order reference; not unique, so several orders may match",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CheckoutOrder"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/orders \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.orders.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->orders()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            },
            "post": {
                "tags": [
                    "Orders"
                ],
                "summary": "Create an order with a saved card (not available yet)",
                "description": "Not available yet. Merchant-initiated orders are out of launch scope: the hosted page does not capture the stored-credential consent this call needs, so every call answers 422 stored_credential_consent_missing and charges nothing.\n\nScope: `v1.orders.write`.\n\nRequires `Idempotency-Key`; the same key replays the first answer for 24 hours.",
                "operationId": "ordersCreate",
                "x-kit-scope": "v1.orders.write",
                "x-kit-idempotent": true,
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutServerSideOrderRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCompletion"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "the charge is still resolving; poll",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCompletion"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "declined (decline_category) or risk_declined; another attempt may follow",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCompletion"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "description": "payments_unavailable: Payments refused the charge with a 4xx other than 422 or 409, so no charge was made; not a decline",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "tax_unavailable: no correct tax quote for the billing address (the tax provider did not answer and no stored rate is known), so nothing is charged; retry later",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/orders \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"merchant_id\": \"mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"lines\": [\n        {\n            \"price_id\": \"prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n            \"quantity\": 1\n        }\n    ],\n    \"payment_method_id\": \"pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"buyer_id\": \"buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"buyer_email\": \"buyer@example.com\",\n    \"customer_ref\": \"cus_A1B2\",\n    \"reference\": \"INV-1001\",\n    \"billing_address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Suite 200\",\n        \"city\": \"Austin\",\n        \"state\": \"TX\",\n        \"postal_code\": \"73301\",\n        \"country\": \"US\"\n    },\n    \"subscription_id\": \"sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"period_id\": \"per_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"merchant_initiated\": false,\n    \"agreement\": \"recurring\",\n    \"metadata\": {\n        \"crm_ref\": \"CRM-1001\"\n    }\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.orders.create({\n  merchant_id: 'mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  lines: [\n    {\n      price_id: 'prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n      quantity: 1\n    }\n  ],\n  payment_method_id: 'pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  buyer_id: 'buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  buyer_email: 'buyer@example.com',\n  customer_ref: 'cus_A1B2',\n  reference: 'INV-1001',\n  billing_address: {\n    line1: '1 Main St',\n    line2: 'Suite 200',\n    city: 'Austin',\n    state: 'TX',\n    postal_code: '73301',\n    country: 'US'\n  },\n  subscription_id: 'sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  period_id: 'per_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  merchant_initiated: false,\n  agreement: 'recurring',\n  metadata: {\n    crm_ref: 'CRM-1001'\n  }\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->orders()->create([\n    'merchant_id' => 'mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'lines' => [\n        [\n            'price_id' => 'prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n            'quantity' => 1,\n        ],\n    ],\n    'payment_method_id' => 'pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'buyer_id' => 'buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'buyer_email' => 'buyer@example.com',\n    'customer_ref' => 'cus_A1B2',\n    'reference' => 'INV-1001',\n    'billing_address' => [\n        'line1' => '1 Main St',\n        'line2' => 'Suite 200',\n        'city' => 'Austin',\n        'state' => 'TX',\n        'postal_code' => '73301',\n        'country' => 'US',\n    ],\n    'subscription_id' => 'sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'period_id' => 'per_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'merchant_initiated' => false,\n    'agreement' => 'recurring',\n    'metadata' => [\n        'crm_ref' => 'CRM-1001',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/orders/{order}": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "Get an order",
                "description": "Scope: `v1.orders.read`.",
                "operationId": "ordersGet",
                "x-kit-scope": "v1.orders.read",
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutOrder"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/orders/ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.orders.get('ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->orders()->get('ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/orders/{order}/fulfil": {
            "post": {
                "tags": [
                    "Orders"
                ],
                "summary": "Mark an order fulfilled",
                "description": "Marks the order fulfilled, with optional evidence.\n\nScope: `v1.orders.write`.",
                "operationId": "ordersFulfil",
                "x-kit-scope": "v1.orders.write",
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutFulfilRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutOrder"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/orders/ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C/fulfil \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"evidence\": {\n        \"type\": \"card\",\n        \"url\": \"https://shop.example.com/webhooks\",\n        \"note\": \"text\"\n    }\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.orders.fulfil('ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  evidence: {\n    type: 'card',\n    url: 'https://shop.example.com/webhooks',\n    note: 'text'\n  }\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->orders()->fulfil('ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'evidence' => [\n        'type' => 'card',\n        'url' => 'https://shop.example.com/webhooks',\n        'note' => 'text',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/orders/{order}/receipt": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "Get an order's receipt",
                "description": "Returns the receipt payload with a fresh signed link.\n\nScope: `v1.orders.read`.",
                "operationId": "ordersReceipt",
                "x-kit-scope": "v1.orders.read",
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutReceipt"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/orders/ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C/receipt \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.orders.receipt('ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->orders()->receipt('ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/customers": {
            "get": {
                "tags": [
                    "Customers"
                ],
                "summary": "List customers",
                "description": "Lists your customers: those with an order first, newest activity first, then those with none, newest first.\n\nSort keys: `last_order_at`, `created_at`, `first_order_at`, `orders_count`, `refunded_cents`, `customer_ref` (default `-last_order_at,-created_at`).\n\nScope: `v1.customers.read`.",
                "operationId": "customersList",
                "x-kit-scope": "v1.customers.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "name": "customer_ref",
                        "in": "query",
                        "description": "exact match on the merchant's customer reference",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "exact match on the customer's cus_ id",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "buyer_email",
                        "in": "query",
                        "description": "a customer any of whose orders has this email, or a customer with no order whose own email it is; exact match on the lowercased input",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/CheckoutCustomer"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/customers \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.customers.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->customers()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            },
            "post": {
                "tags": [
                    "Customers"
                ],
                "summary": "Create a customer",
                "description": "Answers 409 `customer_exists` when you already have the `customer_ref`, and 409 `customer_already_exists`, carrying that customer's `customer_id`, when another of your customers holds the email in any letter case.\n\nScope: `v1.customers.write`.",
                "operationId": "customersCreate",
                "x-kit-scope": "v1.customers.write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutCustomerCreateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCustomerResource"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/customers \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"customer_ref\": \"cus_A1B2\",\n    \"email\": \"buyer@example.com\",\n    \"name\": \"Starter pack\",\n    \"metadata\": {\n        \"crm_ref\": \"CRM-1001\"\n    }\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.customers.create({\n  customer_ref: 'cus_A1B2',\n  email: 'buyer@example.com',\n  name: 'Starter pack',\n  metadata: {\n    crm_ref: 'CRM-1001'\n  }\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->customers()->create([\n    'customer_ref' => 'cus_A1B2',\n    'email' => 'buyer@example.com',\n    'name' => 'Starter pack',\n    'metadata' => [\n        'crm_ref' => 'CRM-1001',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/customers/{customer}": {
            "get": {
                "tags": [
                    "Customers"
                ],
                "summary": "Get a customer",
                "description": "Returns one customer by its `cus_` id. Answers 404 `not_found` for an unknown id.\n\nScope: `v1.customers.read`.",
                "operationId": "customersGet",
                "x-kit-scope": "v1.customers.read",
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "the cus_ id, never a customer_ref",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCustomerResource"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/customers/cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.customers.get('cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->customers()->get('cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Customers"
                ],
                "summary": "Update a customer",
                "description": "Updates a customer's email, name or metadata; the last write wins. Answers 422 `customer_ref_immutable` when `customer_ref` is sent, and 409 `customer_already_exists`, carrying that customer's `customer_id` and writing nothing, when another of your customers holds the email in any letter case.\n\nScope: `v1.customers.write`.",
                "operationId": "customersUpdate",
                "x-kit-scope": "v1.customers.write",
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "the cus_ id, never a customer_ref",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutCustomerUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutCustomerResource"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X PATCH https://api.sandbox.staging.regoria.com/v1/customers/cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"email\": \"buyer@example.com\",\n    \"name\": \"Starter pack\",\n    \"metadata\": {\n        \"crm_ref\": \"CRM-1001\"\n    }\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.customers.update('cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  email: 'buyer@example.com',\n  name: 'Starter pack',\n  metadata: {\n    crm_ref: 'CRM-1001'\n  }\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->customers()->update('cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'email' => 'buyer@example.com',\n    'name' => 'Starter pack',\n    'metadata' => [\n        'crm_ref' => 'CRM-1001',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/portal-sessions": {
            "post": {
                "tags": [
                    "Portal"
                ],
                "summary": "Create a portal session",
                "description": "Creates a direct-entry portal link for one customer: it lives 10 minutes, opens once, and needs no email and no code. Name the customer by `customer_id` or `customer_ref`; `flow` and `subscription_id` deep-link it. An `email` fills an empty one and never overwrites. Answers 422 `validation` or `customer_email_required`, 409 `customer_already_exists` with the email owner's `customer_id`, and 404 `not_found`.\n\nScope: `v1.portal_sessions.write`.",
                "operationId": "portalSessionsCreate",
                "x-kit-scope": "v1.portal_sessions.write",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutPortalSessionRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CheckoutPortalSession"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/portal-sessions \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"customer_ref\": \"cus_A1B2\",\n    \"email\": \"buyer@example.com\"\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.portalSessions.create({\n  customer_ref: 'cus_A1B2',\n  email: 'buyer@example.com'\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->portalSessions()->create([\n    'customer_ref' => 'cus_A1B2',\n    'email' => 'buyer@example.com',\n]);"
                    }
                ]
            }
        },
        "/v1/charges": {
            "get": {
                "tags": [
                    "Charges"
                ],
                "summary": "List charges",
                "description": "Sort keys: `created_at`, `captured_at`, `settled_at`, `amount_cents`, `refunded_cents`, `state`, `cof_intent` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.charges.read`.",
                "operationId": "chargesList",
                "x-kit-scope": "v1.charges.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "state[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "ChargeState",
                                "enum": [
                                    "pending",
                                    "authorized",
                                    "in_review",
                                    "approved",
                                    "declined",
                                    "unknown",
                                    "voided",
                                    "refunded",
                                    "partially_refunded",
                                    "duplicate",
                                    "invalid",
                                    "error"
                                ]
                            }
                        }
                    },
                    {
                        "name": "cof_intent[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "CofIntent",
                                "enum": [
                                    "one_off",
                                    "one_off_store",
                                    "sub_initial",
                                    "trial_initial",
                                    "card_update_cit",
                                    "renewal_mit",
                                    "buyer_cit_on_file",
                                    "unscheduled_mit"
                                ]
                            }
                        }
                    },
                    {
                        "name": "order_public_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "buyer_public_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "subscription_public_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "id, order id, buyer email or card last 4 contains",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_ref",
                        "in": "query",
                        "description": "exact match on the merchant's customer reference; older charges may hold none",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "exact match on the customer's cus_ id; charges of a session without a customer hold none",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/PaymentsCharge"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/charges \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.charges.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->charges()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/charges/{charge}": {
            "get": {
                "tags": [
                    "Charges"
                ],
                "summary": "Get a charge",
                "description": "Scope: `v1.charges.read`.",
                "operationId": "chargesGet",
                "x-kit-scope": "v1.charges.read",
                "parameters": [
                    {
                        "name": "charge",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentsCharge"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/charges/chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.charges.get('chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->charges()->get('chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/refunds": {
            "get": {
                "tags": [
                    "Refunds"
                ],
                "summary": "List refunds",
                "description": "Sort keys: `created_at`, `issued_at`, `amount_cents`, `state`, `source` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.charges.read`.",
                "operationId": "refundsList",
                "x-kit-scope": "v1.charges.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "state[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "RefundState",
                                "enum": [
                                    "rejected",
                                    "sending",
                                    "issued",
                                    "failed",
                                    "unknown"
                                ]
                            }
                        }
                    },
                    {
                        "name": "source[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "RefundSource",
                                "enum": [
                                    "api",
                                    "dashboard",
                                    "staff",
                                    "system"
                                ]
                            }
                        }
                    },
                    {
                        "name": "charge_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "description": "refunds of these charges (chg_ ids), the name webhooks deliver",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "charge_public_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "deprecated": true,
                        "description": "Older name of charge_id[]. Still read; a request that sends it still succeeds.",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "id or reason contains",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/PaymentsRefund"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/refunds \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.refunds.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->refunds()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            },
            "post": {
                "tags": [
                    "Refunds"
                ],
                "summary": "Create a refund",
                "description": "The refund is sent to the processor at once, limited only by what is left of its charge.\n\nScope: `v1.refunds.write`.\n\nRequires `Idempotency-Key`; the same key replays the first answer for 24 hours.",
                "operationId": "refundsCreate",
                "x-kit-scope": "v1.refunds.write",
                "x-kit-idempotent": true,
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PaymentsRefundRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentsRefund"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/refunds \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"charge_id\": \"chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"amount_cents\": 2900,\n    \"reason\": \"requested_by_customer\"\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.refunds.create({\n  order_id: 'ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  amount_cents: 2900,\n  reason: 'requested_by_customer'\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->refunds()->create([\n    'order_id' => 'ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'amount_cents' => 2900,\n    'reason' => 'requested_by_customer',\n]);"
                    }
                ]
            }
        },
        "/v1/refunds/{refund}": {
            "get": {
                "tags": [
                    "Refunds"
                ],
                "summary": "Get a refund",
                "description": "Scope: `v1.charges.read`.",
                "operationId": "refundsGet",
                "x-kit-scope": "v1.charges.read",
                "parameters": [
                    {
                        "name": "refund",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentsRefund"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/refunds/rfd_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.refunds.get('rfd_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->refunds()->get('rfd_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/payment-methods": {
            "get": {
                "tags": [
                    "Payment methods"
                ],
                "summary": "List saved cards",
                "description": "Lists your saved cards as summaries. The next page is in the `Link` header.\n\nSort keys: `created_at`, `brand`, `last4`, `exp_year` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.payment_methods.read`.",
                "operationId": "paymentMethodsList",
                "x-kit-scope": "v1.payment_methods.read",
                "parameters": [
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "the cus_ id of the customer whose cards are listed; customer_id or customer_ref is required: with neither, 422 missing_customer_ref, so no call lists every customer's cards",
                        "schema": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    {
                        "name": "customer_ref",
                        "in": "query",
                        "description": "the merchant's customer reference whose cards are listed; customer_id or customer_ref is required: with neither, 422 missing_customer_ref",
                        "schema": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        }
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "brand[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "id, last 4 or buyer email contains",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/PaymentsPaymentMethod"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/payment-methods \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.paymentMethods.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->paymentMethods()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/payment-methods/{paymentMethod}": {
            "get": {
                "tags": [
                    "Payment methods"
                ],
                "summary": "Get a saved card",
                "description": "Scope: `v1.payment_methods.read`.",
                "operationId": "paymentMethodsGet",
                "x-kit-scope": "v1.payment_methods.read",
                "parameters": [
                    {
                        "name": "paymentMethod",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentsPaymentMethod"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/payment-methods/pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.paymentMethods.get('pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->paymentMethods()->get('pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Payment methods"
                ],
                "summary": "Delete a saved card",
                "description": "Removes a saved card. It can no longer be charged.\n\nScope: `v1.payment_methods.write`.",
                "operationId": "paymentMethodsDelete",
                "x-kit-scope": "v1.payment_methods.write",
                "parameters": [
                    {
                        "name": "paymentMethod",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentsPaymentMethod"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "a live subscription charges the card (key payment_method_in_use); the subscription ids are in errors[0].details.subscriptions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X DELETE https://api.sandbox.staging.regoria.com/v1/payment-methods/pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.paymentMethods.delete('pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->paymentMethods()->delete('pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/subscriptions": {
            "get": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "List subscriptions",
                "description": "Sort keys: `created_at`, `status`, `amount_cents`, `current_period_end`, `next_charge_at`, `trial_end`, `cancelled_at`, `buyer_email` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.subscriptions.read`.",
                "operationId": "subscriptionsList",
                "x-kit-scope": "v1.subscriptions.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "status[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "SubscriptionStatus",
                                "enum": [
                                    "trialing",
                                    "active",
                                    "past_due",
                                    "paused",
                                    "cancelled"
                                ]
                            }
                        }
                    },
                    {
                        "name": "cancel_source[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "CancelSource",
                                "enum": [
                                    "buyer",
                                    "merchant_api",
                                    "merchant",
                                    "staff",
                                    "dunning",
                                    "dispute",
                                    "system"
                                ]
                            }
                        }
                    },
                    {
                        "name": "cancel_at_period_end",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "buyer_public_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "price_public_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "buyer_email[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "id, buyer email or origin order id contains",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_ref",
                        "in": "query",
                        "description": "exact match on the merchant's customer reference; subscriptions started before it was carried hold none",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "exact match on the customer's cus_ id; subscriptions of an order without a customer hold none",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/BillingSubscription"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/subscriptions \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.subscriptions.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->subscriptions()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}": {
            "get": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Get a subscription",
                "description": "Scope: `v1.subscriptions.read`.",
                "operationId": "subscriptionsGet",
                "x-kit-scope": "v1.subscriptions.read",
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.subscriptions.get('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->subscriptions()->get('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/cancel": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Cancel a subscription",
                "description": "Stops future billing: at the end of the paid period unless `immediately` is sent.\n\nScope: `v1.subscriptions.write`.",
                "operationId": "subscriptionsCancel",
                "x-kit-scope": "v1.subscriptions.write",
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BillingCancelRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/cancel \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"immediately\": false,\n    \"reason\": \"requested_by_customer\"\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.subscriptions.cancel('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  immediately: false,\n  reason: 'requested_by_customer'\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->subscriptions()->cancel('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'immediately' => false,\n    'reason' => 'requested_by_customer',\n]);"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/change-plan": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Request a plan change",
                "description": "Asks the buyer to confirm moving the subscription, of either billing mode, to another plan from its next period, with no proration. Creates the hosted plan-change confirmation and emails the buyer its link; the plan changes only once the buyer accepts.\n\nScope: `v1.subscriptions.write`.",
                "operationId": "subscriptionsChangePlan",
                "x-kit-scope": "v1.subscriptions.write",
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BillingChangePlanRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "the current price: the pending change is cleared with no confirmation; pending_price_id is null",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "another price: the subscription unchanged plus plan_change_confirmation {state pending_confirmation, expires_at, url}; pending_price_id, price_id and recurring do not change at this call",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "refused, nothing written: key subscription_cancelled (also for another price on a subscription set to end at period end; its current price still clears a pending change), subscription_paused or payment_method_missing",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "the price is not an active, recurring, non-inline price of the merchant in the subscription currency (key plan_not_eligible, field price_id)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/change-plan \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"price_id\": \"prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C\"\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.subscriptions.changePlan('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  price_id: 'prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C'\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->subscriptions()->changePlan('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'price_id' => 'prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n]);"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/charge": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Charge a subscription",
                "description": "Charges a `merchant_managed` subscription's stored card at its price for the next period.\n\nScope: `v1.subscriptions.write`.\n\nRequires `Idempotency-Key`; the same key replays the first answer for 24 hours.",
                "operationId": "subscriptionsCharge",
                "x-kit-scope": "v1.subscriptions.write",
                "x-kit-idempotent": true,
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "paid: the period is paid, current_period_end advanced, status active",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "the charge is pending; the period settles later",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "declined (key declined, decline_category, decline_code: Payments' stored decline code, retryable: boolean, Payments' Outcome::retryable): the period is declined with no platform retry and the status is past_due",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "refused, nothing written: key subscription_tenant_managed, subscription_cancelled, subscription_paused, period_already_charged (the latest paid period has not ended) or charge_in_progress",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "refused, nothing sent to NMI: key charge_not_retryable (a non-retryable decline closed the open period) or charge_attempt_cap_reached (the open period reached the per-period attempt cap)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "refused, nothing sent to NMI: key tax_unavailable (the tax provider gave no quote and no rate is stored for the address) or payments_unavailable (an earlier charge of the period could not be confirmed with the processor); retry later",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/charge \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.subscriptions.charge('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->subscriptions()->charge('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/pause": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Pause a subscription",
                "description": "Pauses a `tenant_managed` subscription at the end of its paid period. Calling it again changes nothing.\n\nScope: `v1.subscriptions.write`.",
                "operationId": "subscriptionsPause",
                "x-kit-scope": "v1.subscriptions.write",
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok; pause_at is the end of the paid period, the status turns paused then",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "refused, nothing written: key subscription_cancelled, subscription_merchant_managed, subscription_past_due or charge_in_progress",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/pause \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.subscriptions.pause('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->subscriptions()->pause('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/payment-method": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Change a subscription's card",
                "description": "Changes the card a subscription charges.\n\nScope: `v1.subscriptions.write`.",
                "operationId": "subscriptionsChangePaymentMethod",
                "x-kit-scope": "v1.subscriptions.write",
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BillingPaymentMethodChangeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "the card is not an active card of the subscription's merchant (key payment_method_unusable), or holds no recurring anchor (key payment_method_kind_mismatch); no payment_method_id, or a payment_token field (key validation); the subscription keeps its card",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/payment-method \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"payment_method_id\": \"pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C\"\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.subscriptions.changePaymentMethod('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  payment_method_id: 'pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C'\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->subscriptions()->changePaymentMethod('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'payment_method_id' => 'pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n]);"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/periods": {
            "get": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "List a subscription's periods",
                "description": "Lists the periods of a subscription with their dunning attempts.\n\nSort keys: `number`, `period_start`, `due_at`, `state`, `total_cents`, `paid_at` (default `number`).\n\nThe `from`, `to` and `range` filters read `due_at`.\n\nScope: `v1.subscriptions.read`.",
                "operationId": "subscriptionsPeriods",
                "x-kit-scope": "v1.subscriptions.read",
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "state[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "PeriodState",
                                "enum": [
                                    "scheduled",
                                    "charging",
                                    "pending",
                                    "paid",
                                    "declined",
                                    "cancelled",
                                    "skipped"
                                ]
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/BillingPeriod"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/periods \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.subscriptions.periods('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->subscriptions()->periods('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/plan-change-confirmations": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Create a plan-change confirmation",
                "description": "Creates the hosted 24-hour plan-change confirmation the buyer accepts, for any billing mode. It expires the open ones and emails the buyer the link; nothing is charged.\n\nScope: `v1.subscriptions.write`.",
                "operationId": "subscriptionsCreatePlanChangeConfirmation",
                "x-kit-scope": "v1.subscriptions.write",
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/BillingPlanChangeConfirmationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "created; url is the hosted page the buyer accepts the change on, also emailed to the buyer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingPlanChangeConfirmation"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "refused, nothing written: key subscription_cancelled (also when the subscription is set to end at period end) or subscription_paused",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "the price is not another active, recurring, non-inline price of the merchant in the subscription currency (key plan_not_eligible, field price_id)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/plan-change-confirmations \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"price_id\": \"prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C\"\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.subscriptions.createPlanChangeConfirmation('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  price_id: 'prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C'\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->subscriptions()->createPlanChangeConfirmation('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'price_id' => 'prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n]);"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/resume": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Resume a subscription",
                "description": "Before `pause_at`, cancels the scheduled pause. Once paused, charges now and starts a new period from today.\n\nScope: `v1.subscriptions.write`.\n\nRequires `Idempotency-Key`; the same key replays the first answer for 24 hours.",
                "operationId": "subscriptionsResume",
                "x-kit-scope": "v1.subscriptions.write",
                "x-kit-idempotent": true,
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingSubscription"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "the resume charge was declined (key declined, decline_category); the subscription stays paused with no period and no dunning; retry with a new key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "refused, nothing written: key subscription_cancelled, subscription_merchant_managed, subscription_not_paused or charge_in_progress; or charge_pending: the resume charge is pending (one pending period from today is written; the subscription stays paused until order.paid or the sweep settles it), or such a period is already in flight (refused whatever the key, nothing written)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/resume \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.subscriptions.resume('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->subscriptions()->resume('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/subscriptions/{subscription}/update-card-links": {
            "post": {
                "tags": [
                    "Subscriptions"
                ],
                "summary": "Create an update-card link",
                "description": "Open the returned `url` for the buyer at once: it lives 10 minutes and opens the card form once, with no sign-in. Each call creates a new link, so no `Idempotency-Key` is used. Answers 422 `validation` for a canceled subscription and 404 `not_found`.\n\nScope: `v1.subscriptions.write`.",
                "operationId": "subscriptionsUpdateCardLinks",
                "x-kit-scope": "v1.subscriptions.write",
                "parameters": [
                    {
                        "name": "subscription",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BillingUpdateCardLink"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "the subscription is cancelled (key validation, field subscription), or names no customer (key card_link_unavailable)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/subscriptions/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C/update-card-links \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.subscriptions.updateCardLinks('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->subscriptions()->updateCardLinks('sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/balance": {
            "get": {
                "tags": [
                    "Balance and payouts"
                ],
                "summary": "Get your balance",
                "description": "Returns your balance: pending, available, reserve, on hold, in transit, paid out, and the next payout estimate.\n\nScope: `v1.balance.read`.",
                "operationId": "balanceList",
                "x-kit-scope": "v1.balance.read",
                "parameters": [
                    {
                        "name": "currency",
                        "in": "query",
                        "description": "The currency of the figures, one of the tenant's declared currencies; absent, the first declared one. Amounts of two currencies are never added.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "as_of",
                        "in": "query",
                        "description": "A date (YYYY-MM-DD: the end of that day in the tenant's business zone, from the stored closing balance) or an RFC 3339 timestamp (that instant, provisional); the future is 422 as_of_in_future, anything else 422 as_of_invalid",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/LedgerBalance"
                                        },
                                        {
                                            "$ref": "#/components/schemas/LedgerBalanceAsOf"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/balance \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.balance.list();"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->balance()->list();"
                    }
                ]
            }
        },
        "/v1/reports/balance-summary": {
            "get": {
                "tags": [
                    "Balance and payouts"
                ],
                "summary": "Get the balance summary",
                "description": "Returns the balance summary for a period: starting balance, activity per category, payouts and ending balance. Starting + activity - payouts = ending.\n\nScope: `v1.reports.read`.",
                "operationId": "reportsBalanceSummary",
                "x-kit-scope": "v1.reports.read",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "currency",
                        "in": "query",
                        "required": false,
                        "description": "The currency of the summary (a balance is in one currency); absent, the home currency",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReportingBalanceSummary"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/reports/balance-summary \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.reports.balanceSummary();"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->reports()->balanceSummary();"
                    }
                ]
            }
        },
        "/v1/reports/balance-transactions": {
            "get": {
                "tags": [
                    "Balance and payouts"
                ],
                "summary": "List balance transactions",
                "description": "One row per movement of your balance with gross, tax, fee, reserve and net on the row, newest first.\n\nSort keys: `occurred_at`, `available_on`, `available_at`, `gross_cents`, `net_cents`, `category`, `merchant_id` (default `-occurred_at`).\n\nThe `from`, `to` and `range` filters read `occurred_at`.\n\nScope: `v1.reports.read`.",
                "operationId": "reportsBalanceTransactions",
                "x-kit-scope": "v1.reports.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "category[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "BalanceTransactionCategory",
                                "enum": [
                                    "sale",
                                    "refund",
                                    "chargeback",
                                    "chargeback_reversal",
                                    "chargeback_fee",
                                    "reserve_hold",
                                    "reserve_release",
                                    "hold",
                                    "hold_release",
                                    "adjustment",
                                    "payout",
                                    "payout_reversal",
                                    "payout_fee",
                                    "payout_return_fee",
                                    "auth_declined_fee",
                                    "risk_declined_fee",
                                    "auth_voided_fee",
                                    "chargeback_reversal_fee",
                                    "boarding_fee",
                                    "monthly_fee",
                                    "monthly_minimum",
                                    "pci_fee",
                                    "conversion_out",
                                    "conversion_in",
                                    "conversion_fee"
                                ]
                            }
                        }
                    },
                    {
                        "name": "source_id[]",
                        "in": "query",
                        "description": "an order, charge, refund, dispute, hold, adjustment or payout public id the row belongs to",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "payout_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "an id contains",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ReportingBalanceTransactionRow"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/reports/balance-transactions \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.reports.balanceTransactions();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->reports()->balanceTransactions();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/reports/balance-transactions/export": {
            "get": {
                "tags": [
                    "Balance and payouts"
                ],
                "summary": "Export balance transactions",
                "description": "Returns balance transactions as CSV, with the same filters and sort as the list and the `columns[]` you choose. Money is in integer cents.\n\nScope: `v1.reports.read`.",
                "operationId": "reportsBalanceTransactionsExport",
                "x-kit-scope": "v1.reports.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "category[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "BalanceTransactionCategory",
                                "enum": [
                                    "sale",
                                    "refund",
                                    "chargeback",
                                    "chargeback_reversal",
                                    "chargeback_fee",
                                    "reserve_hold",
                                    "reserve_release",
                                    "hold",
                                    "hold_release",
                                    "adjustment",
                                    "payout",
                                    "payout_reversal",
                                    "payout_fee",
                                    "payout_return_fee",
                                    "auth_declined_fee",
                                    "risk_declined_fee",
                                    "auth_voided_fee",
                                    "chargeback_reversal_fee",
                                    "boarding_fee",
                                    "monthly_fee",
                                    "monthly_minimum",
                                    "pci_fee",
                                    "conversion_out",
                                    "conversion_in",
                                    "conversion_fee"
                                ]
                            }
                        }
                    },
                    {
                        "name": "source_id[]",
                        "in": "query",
                        "description": "an order, charge, refund, dispute, hold, adjustment or payout public id the row belongs to",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "payout_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "an id contains",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "columns[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "description": "Column keys in order; unknown keys are 422 unknown_column; none = the default set.",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "occurred_at",
                                    "available_on",
                                    "available_at",
                                    "category",
                                    "gross_cents",
                                    "tax_cents",
                                    "fee_cents",
                                    "reserve_cents",
                                    "net_cents",
                                    "currency",
                                    "source_type",
                                    "source_id",
                                    "order_id",
                                    "charge_id",
                                    "entry_id",
                                    "payout_id",
                                    "statement_id",
                                    "memo",
                                    "merchant_id"
                                ]
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "CSV (text/csv; header row = the columns' labels). 422 export_too_large past 10 000 rows (with max).",
                        "content": {
                            "text/csv": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/reports/balance-transactions/export \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.reports.balanceTransactionsExport();"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->reports()->balanceTransactionsExport();"
                    }
                ]
            }
        },
        "/v1/reports/finance": {
            "get": {
                "tags": [
                    "Balance and payouts"
                ],
                "summary": "Get the finance report",
                "description": "Returns orders, gross, refunds, chargebacks, fees and reserve per period, store or card brand, with the totals. Money is in integer cents, rates in basis points.\n\nScope: `v1.reports.read`.",
                "operationId": "reportsFinance",
                "x-kit-scope": "v1.reports.read",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "description": "the first business day (YYYY-MM-DD, inclusive); default: the first day of this business month",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "the last business day (inclusive); default: today",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "group",
                        "in": "query",
                        "description": "the period rows are cut on (business days of the tenant's zone)",
                        "schema": {
                            "type": "string",
                            "x-enum-name": "FinanceGroup",
                            "enum": [
                                "day",
                                "week",
                                "month"
                            ],
                            "default": "month"
                        }
                    },
                    {
                        "name": "by",
                        "in": "query",
                        "description": "the dimension of the rows",
                        "schema": {
                            "type": "string",
                            "x-enum-name": "MerchantFinanceBy",
                            "enum": [
                                "period",
                                "store",
                                "card_brand"
                            ],
                            "default": "period"
                        }
                    },
                    {
                        "name": "store_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "currency",
                        "in": "query",
                        "required": false,
                        "description": "The report is one currency's, never a sum over currencies; absent, the home currency. The answer's currencies lists every currency the range has figures in",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReportingMerchantFinanceReport"
                                },
                                "examples": {
                                    "month": {
                                        "value": {
                                            "from": "2026-10-01",
                                            "to": "2026-10-29",
                                            "zone": "America/New_York",
                                            "business_day_label": "New York days",
                                            "group": "month",
                                            "by": "period",
                                            "rows": [
                                                {
                                                    "key": "2026-10-01",
                                                    "label": "Oct 2026",
                                                    "orders": 42,
                                                    "gross_cents": 131838,
                                                    "refunded_cents": 3139,
                                                    "net_volume_cents": 128699,
                                                    "chargebacks": 1,
                                                    "chargebacks_cents": 3139,
                                                    "chargeback_fees_cents": 1500,
                                                    "sale_fees_cents": 6090,
                                                    "refund_fees_cents": 0,
                                                    "account_fees_cents": 0,
                                                    "income_cents": 7590,
                                                    "reserve_held_cents": 13183,
                                                    "reserve_released_cents": 0
                                                }
                                            ],
                                            "totals": {
                                                "key": "2026-10-01",
                                                "label": "Oct 2026",
                                                "orders": 42,
                                                "gross_cents": 131838,
                                                "refunded_cents": 3139,
                                                "net_volume_cents": 128699,
                                                "chargebacks": 1,
                                                "chargebacks_cents": 3139,
                                                "chargeback_fees_cents": 1500,
                                                "sale_fees_cents": 6090,
                                                "refund_fees_cents": 0,
                                                "account_fees_cents": 0,
                                                "income_cents": 7590,
                                                "reserve_held_cents": 13183,
                                                "reserve_released_cents": 0
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/reports/finance \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.reports.finance();"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->reports()->finance();"
                    }
                ]
            }
        },
        "/v1/reports/finance/export": {
            "get": {
                "tags": [
                    "Balance and payouts"
                ],
                "summary": "Export the finance report",
                "description": "Returns the finance report as CSV, with the same filters and the `columns[]` you choose. Money is in integer cents.\n\nScope: `v1.reports.read`.",
                "operationId": "reportsFinanceExport",
                "x-kit-scope": "v1.reports.read",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "description": "the first business day (YYYY-MM-DD, inclusive); default: the first day of this business month",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "the last business day (inclusive); default: today",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "group",
                        "in": "query",
                        "description": "the period rows are cut on (business days of the tenant's zone)",
                        "schema": {
                            "type": "string",
                            "x-enum-name": "FinanceGroup",
                            "enum": [
                                "day",
                                "week",
                                "month"
                            ],
                            "default": "month"
                        }
                    },
                    {
                        "name": "by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "x-enum-name": "MerchantFinanceBy",
                            "enum": [
                                "period",
                                "store",
                                "card_brand"
                            ],
                            "default": "period"
                        }
                    },
                    {
                        "name": "store_id[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "columns[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "description": "Column keys in order; unknown keys are 422 unknown_column; none = the default set.",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "key",
                                    "label",
                                    "orders",
                                    "gross_cents",
                                    "refunded_cents",
                                    "net_volume_cents",
                                    "chargebacks",
                                    "chargebacks_cents",
                                    "chargeback_fees_cents",
                                    "sale_fees_cents",
                                    "refund_fees_cents",
                                    "account_fees_cents",
                                    "income_cents",
                                    "reserve_held_cents",
                                    "reserve_released_cents"
                                ]
                            }
                        }
                    },
                    {
                        "name": "currency",
                        "in": "query",
                        "required": false,
                        "description": "The report is one currency's, never a sum over currencies; absent, the home currency. The answer's currencies lists every currency the range has figures in",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "CSV (text/csv; header row = the columns' labels).",
                        "content": {
                            "text/csv": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/reports/finance/export \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.reports.financeExport();"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->reports()->financeExport();"
                    }
                ]
            }
        },
        "/v1/reports/payouts/{payout}/transactions": {
            "get": {
                "tags": [
                    "Balance and payouts"
                ],
                "summary": "List a payout's transactions",
                "description": "Lists the balance transactions a payout paid out. Their nets sum to the payout.\n\nScope: `v1.reports.read`.",
                "operationId": "reportsPayoutTransactions",
                "x-kit-scope": "v1.reports.read",
                "parameters": [
                    {
                        "name": "payout",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReportingPayoutReconciliation"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/reports/payouts/pay_01HZX5Y3V8N2K7QJ4R9T6B3M1C/transactions \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.reports.payoutTransactions('pay_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->reports()->payoutTransactions('pay_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/disputes": {
            "get": {
                "tags": [
                    "Disputes"
                ],
                "summary": "List disputes",
                "description": "Sort keys: `opened_at`, `evidence_due_at`, `closed_at`, `amount_cents`, `fee_cents`, `status`, `source`, `reason_code`, `merchant_id` (default `-opened_at`).\n\nThe `from`, `to` and `range` filters read `opened_at`.\n\nScope: `v1.disputes.read`.",
                "operationId": "disputesList",
                "x-kit-scope": "v1.disputes.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "status[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "open",
                                    "evidence_submitted",
                                    "won",
                                    "lost",
                                    "accepted",
                                    "expired"
                                ]
                            }
                        }
                    },
                    {
                        "name": "source[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "chargeback"
                                ]
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "dispute, charge or order id, or reason code contains",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/RiskDispute"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/disputes \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.disputes.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->disputes()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/disputes/{dispute}": {
            "get": {
                "tags": [
                    "Disputes"
                ],
                "summary": "Get a dispute",
                "description": "Scope: `v1.disputes.read`.",
                "operationId": "disputesGet",
                "x-kit-scope": "v1.disputes.read",
                "parameters": [
                    {
                        "name": "dispute",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RiskDispute"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/disputes/dsp_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.disputes.get('dsp_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->disputes()->get('dsp_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/webhook-endpoints": {
            "get": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "List webhook endpoints",
                "description": "Sort keys: `created_at`, `url`, `description`, `consecutive_failures`, `disabled_at` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsList",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "disabled",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "url, description or id contains",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/DeliveryWebhookEndpoint"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/webhook-endpoints \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.webhookEndpoints.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->webhookEndpoints()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            },
            "post": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "Create a webhook endpoint",
                "description": "Registers an endpoint. The signing secret is returned once.\n\nScope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsCreate",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DeliveryWebhookEndpointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeliveryWebhookEndpointWithSecret"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/webhook-endpoints \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"store_id\": \"sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"url\": \"https://shop.example.com/webhooks\",\n    \"events\": [\n        \"order.paid\",\n        \"refund.issued\"\n    ],\n    \"description\": \"One-line description.\",\n    \"merchant_id\": \"mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C\"\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.webhookEndpoints.create({\n  store_id: 'sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  url: 'https://shop.example.com/webhooks',\n  events: [\n    'order.paid',\n    'refund.issued'\n  ],\n  description: 'One-line description.',\n  merchant_id: 'mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C'\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->webhookEndpoints()->create([\n    'store_id' => 'sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'url' => 'https://shop.example.com/webhooks',\n    'events' => [\n        'order.paid',\n        'refund.issued',\n    ],\n    'description' => 'One-line description.',\n    'merchant_id' => 'mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n]);"
                    }
                ]
            }
        },
        "/v1/webhook-endpoints/{endpoint}": {
            "get": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "Get a webhook endpoint",
                "description": "Scope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsGet",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeliveryWebhookEndpoint"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/webhook-endpoints/whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.webhookEndpoints.get('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->webhookEndpoints()->get('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "Update a webhook endpoint",
                "description": "Changes the events, description or url.\n\nScope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsUpdate",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DeliveryWebhookEndpointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeliveryWebhookEndpoint"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X PATCH https://api.sandbox.staging.regoria.com/v1/webhook-endpoints/whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"store_id\": \"sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"url\": \"https://shop.example.com/webhooks\",\n    \"events\": [\n        \"order.paid\",\n        \"refund.issued\"\n    ],\n    \"description\": \"One-line description.\",\n    \"merchant_id\": \"mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C\"\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.webhookEndpoints.update('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  store_id: 'sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  url: 'https://shop.example.com/webhooks',\n  events: [\n    'order.paid',\n    'refund.issued'\n  ],\n  description: 'One-line description.',\n  merchant_id: 'mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C'\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->webhookEndpoints()->update('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'store_id' => 'sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'url' => 'https://shop.example.com/webhooks',\n    'events' => [\n        'order.paid',\n        'refund.issued',\n    ],\n    'description' => 'One-line description.',\n    'merchant_id' => 'mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n]);"
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "Delete a webhook endpoint",
                "description": "Scope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsDelete",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "deleted"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X DELETE https://api.sandbox.staging.regoria.com/v1/webhook-endpoints/whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.webhookEndpoints.delete('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->webhookEndpoints()->delete('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/webhook-endpoints/{endpoint}/deliveries": {
            "get": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "List an endpoint's deliveries",
                "description": "Sort keys: `created_at`, `event_type`, `status`, `attempts`, `http_status`, `last_attempted_at`, `next_attempt_at`, `delivered_at` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsDeliveries",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "status[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "WebhookDeliveryStatus",
                                "enum": [
                                    "pending",
                                    "sending",
                                    "succeeded",
                                    "failed",
                                    "dead"
                                ]
                            }
                        }
                    },
                    {
                        "name": "event_type[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "http_status[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "replay",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "event id or delivery id contains",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/DeliveryWebhookDelivery"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/webhook-endpoints/whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C/deliveries \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.webhookEndpoints.deliveries('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->webhookEndpoints()->deliveries('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/webhook-endpoints/{endpoint}/deliveries/replay": {
            "post": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "Replay deliveries in a window",
                "description": "Re-queues every dead or failed delivery of the endpoint created between from and to (oldest first, up to 10,000 per call; truncated says there were more). Each replay keeps the original event id.\n\nScope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsReplayRange",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DeliveryWebhookReplayRange"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "queued",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeliveryWebhookReplayResult"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/webhook-endpoints/whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C/deliveries/replay \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"from\": \"2026-10-21T00:00:00.000Z\",\n    \"to\": \"2026-10-22T00:00:00.000Z\",\n    \"event_types\": [\n        \"order.paid\"\n    ]\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.webhookEndpoints.replayRange('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C', {\n  from: '2026-10-21T00:00:00.000Z',\n  to: '2026-10-22T00:00:00.000Z',\n  event_types: [\n    'order.paid'\n  ]\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->webhookEndpoints()->replayRange('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C', [\n    'from' => '2026-10-21T00:00:00.000Z',\n    'to' => '2026-10-22T00:00:00.000Z',\n    'event_types' => [\n        'order.paid',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/webhook-endpoints/{endpoint}/deliveries/{delivery}/replay": {
            "post": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "Replay a delivery",
                "description": "Scope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsReplayDelivery",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "delivery",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "queued",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeliveryWebhookDelivery"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/webhook-endpoints/whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C/deliveries/wdl_01HZX5Y3V8N2K7QJ4R9T6B3M1C/replay \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.webhookEndpoints.replayDelivery('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C', 'wdl_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->webhookEndpoints()->replayDelivery('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C', 'wdl_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/webhook-endpoints/{endpoint}/ping": {
            "post": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "Send a ping",
                "description": "Sends a test delivery to the endpoint.\n\nScope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsPing",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "queued",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeliveryWebhookDelivery"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/webhook-endpoints/whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C/ping \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.webhookEndpoints.ping('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->webhookEndpoints()->ping('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/webhook-endpoints/{endpoint}/rotate-secret": {
            "post": {
                "tags": [
                    "Webhook endpoints"
                ],
                "summary": "Rotate the signing secret",
                "description": "Returns a new secret and re-enables a disabled endpoint.\n\nScope: `v1.webhook_endpoints.manage`.",
                "operationId": "webhookEndpointsRotateSecret",
                "x-kit-scope": "v1.webhook_endpoints.manage",
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeliveryWebhookEndpointWithSecret"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/webhook-endpoints/whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C/rotate-secret \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.webhookEndpoints.rotateSecret('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->webhookEndpoints()->rotateSecret('whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/api-keys": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "List API keys",
                "description": "Revoked keys are listed with `include_revoked`.\n\nSort keys: `created_at`, `last_used_at`, `revoked_at`, `name`, `mode` (default `-created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.api_keys.manage`.",
                "operationId": "apiKeysList",
                "x-kit-scope": "v1.api_keys.manage",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "mode[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "ApiKeyMode",
                                "enum": [
                                    "live",
                                    "test"
                                ]
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "name or prefix contains",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include_revoked",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/IdentityApiKey"
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/api-keys \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.apiKeys.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->apiKeys()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            },
            "post": {
                "tags": [
                    "Account"
                ],
                "summary": "Create an API key",
                "description": "The key itself is shown once, in the answer.\n\nScope: `v1.api_keys.manage`.\n\nRequires `Idempotency-Key`; the same key replays the first answer for 24 hours.",
                "operationId": "apiKeysCreate",
                "x-kit-scope": "v1.api_keys.manage",
                "x-kit-idempotent": true,
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IdentityApiKeyRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "created; `key` is shown once",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/IdentityApiKey2"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/api-keys \\\n  -H \"Authorization: Bearer $API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"store_id\": \"sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C\",\n    \"name\": \"Server\",\n    \"mode\": \"test\",\n    \"scopes\": [\n        \"v1.orders.read\",\n        \"v1.refunds.write\"\n    ]\n}'"
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.apiKeys.create({\n  store_id: 'sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n  name: 'Server',\n  mode: 'test',\n  scopes: [\n    'v1.orders.read',\n    'v1.refunds.write'\n  ]\n});"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->apiKeys()->create([\n    'store_id' => 'sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C',\n    'name' => 'Server',\n    'mode' => 'test',\n    'scopes' => [\n        'v1.orders.read',\n        'v1.refunds.write',\n    ],\n]);"
                    }
                ]
            }
        },
        "/v1/api-keys/{key}": {
            "delete": {
                "tags": [
                    "Account"
                ],
                "summary": "Revoke an API key",
                "description": "The key stops working within a minute.\n\nScope: `v1.api_keys.manage`.",
                "operationId": "apiKeysDelete",
                "x-kit-scope": "v1.api_keys.manage",
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "the revoked key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/IdentityApiKey"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X DELETE https://api.sandbox.staging.regoria.com/v1/api-keys/key_01HZX5Y3V8N2K7QJ4R9T6B3M1C \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.apiKeys.delete('key_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->apiKeys()->delete('key_01HZX5Y3V8N2K7QJ4R9T6B3M1C');"
                    }
                ]
            }
        },
        "/v1/merchants/me": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Get your merchant profile",
                "description": "Returns your names, status, support email and time zone.\n\nScope: `v1.merchants.read`.",
                "operationId": "merchantsMe",
                "x-kit-scope": "v1.merchants.read",
                "responses": {
                    "200": {
                        "description": "your merchant profile",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/IdentityMerchantProfile"
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/merchants/me \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.merchants.me();"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->merchants()->me();"
                    }
                ]
            }
        },
        "/v1/openapi.json": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Get the OpenAPI document",
                "description": "Returns the published OpenAPI 3.1 document of this API, with the servers filled for your account. Any valid key may call it. The same document the docs host serves at `/openapi.json`. SDKs compare `info.version` and `info.x-kit-fingerprint` with the spec they were generated from.\n\nScope: `none`.",
                "operationId": "openapiList",
                "x-kit-scope": "none",
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "description": "An OpenAPI 3.1 document.",
                                    "required": [
                                        "openapi",
                                        "info",
                                        "paths"
                                    ],
                                    "properties": {
                                        "openapi": {
                                            "type": "string"
                                        },
                                        "info": {
                                            "type": "object",
                                            "additionalProperties": true
                                        },
                                        "paths": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    },
                                    "additionalProperties": true
                                },
                                "example": {
                                    "openapi": "3.1.0",
                                    "info": {
                                        "title": "Merchant API",
                                        "version": "1.0.0"
                                    },
                                    "servers": [
                                        {
                                            "url": "https://api.regoria.com",
                                            "description": "Live"
                                        },
                                        {
                                            "url": "https://api.sandbox.regoria.com",
                                            "description": "Sandbox"
                                        }
                                    ],
                                    "paths": {
                                        "/v1/orders": {
                                            "get": {
                                                "summary": "List orders"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/openapi.json \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst result = await client.openapi.list();"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$result = $client->openapi()->list();"
                    }
                ]
            }
        },
        "/v1/terms": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Get the current terms",
                "description": "Returns the current terms and merchant agreement.\n\nScope: `v1.terms.read`.",
                "operationId": "termsList",
                "x-kit-scope": "v1.terms.read",
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/AdminPublicPolicy"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/terms \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.terms.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->terms()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/users": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "List users",
                "description": "Lists the users of your merchant account and their roles.\n\nSort keys: `created_at`, `name`, `email`, `status`, `role`, `last_login_at` (default `created_at`).\n\nThe `from`, `to` and `range` filters read `created_at`.\n\nScope: `v1.users.read`.",
                "operationId": "usersList",
                "x-kit-scope": "v1.users.read",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/page"
                    },
                    {
                        "$ref": "#/components/parameters/perPage"
                    },
                    {
                        "$ref": "#/components/parameters/sort"
                    },
                    {
                        "$ref": "#/components/parameters/from"
                    },
                    {
                        "$ref": "#/components/parameters/to"
                    },
                    {
                        "$ref": "#/components/parameters/range"
                    },
                    {
                        "$ref": "#/components/parameters/timezone"
                    },
                    {
                        "name": "status[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "x-enum-name": "MerchantUserStatus",
                                "enum": [
                                    "invited",
                                    "active",
                                    "suspended",
                                    "deactivated"
                                ]
                            }
                        }
                    },
                    {
                        "name": "role[]",
                        "in": "query",
                        "style": "form",
                        "explode": true,
                        "description": "role public ids (rol_) of this merchant",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "name or email contains",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ok",
                        "headers": {
                            "X-Total-Count": {
                                "$ref": "#/components/headers/X-Total-Count"
                            },
                            "Link": {
                                "$ref": "#/components/headers/Link"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/IdentityUser"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X GET https://api.sandbox.staging.regoria.com/v1/users \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "import { Client } from '@regoria/sdk';\n\nconst client = new Client({ apiKey: process.env.API_KEY! });\nconst page = await client.users.list();\nfor (const row of page.data) {\n  // …\n}"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "use Regoria\\Sdk\\Client;\n\n$client = new Client(apiKey: getenv('API_KEY'));\n$page = $client->users()->list();\nforeach ($page as $row) {\n    // …\n}"
                    }
                ]
            }
        },
        "/v1/ai/ask": {
            "post": {
                "tags": [
                    "Account"
                ],
                "summary": "Ask the assistant",
                "description": "The assistant reads through the v1 operations your key's other scopes allow and answers with its sources. Answers are JSON-shaped prose; the call is kept in your tenant's audit with a redacted transcript. Refused with `ai_disabled` when the tenant switched the assistant off, `ai_rate_limited` (Retry-After) past the per-key rate, `ai_budget_exhausted` once the tenant's monthly token budget is used up.\n\nScope: `v1.ai.use`.",
                "operationId": "aiAsk",
                "x-kit-scope": "v1.ai.use",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AiAiAsk"
                            },
                            "examples": {
                                "question": {
                                    "summary": "Why was a charge declined",
                                    "value": {
                                        "surface": "general",
                                        "question": "Why was charge chg_01HZX5Y3V8N2K7QJ4R9T6B3M01 declined and what should I tell the buyer?",
                                        "subject_type": "charge",
                                        "subject_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M01"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "ok",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AiAiAnswer"
                                },
                                "examples": {
                                    "answer": {
                                        "summary": "An explanation with its sources",
                                        "value": {
                                            "id": "aic_01HZX5Y3V8N2K7QJ4R9T6B3M01",
                                            "board": "v1",
                                            "surface": "general",
                                            "text": "{\"explanation\":\"The charge was declined by the issuer (code 05, do not honor).\",\"evidence\":[{\"tool\":\"get_charge\",\"id\":\"chg_01HZX5Y3V8N2K7QJ4R9T6B3M01\",\"note\":\"declined, issuer code 05\"}],\"next_step\":\"Ask the buyer for another card.\",\"draft_reply\":null}",
                                            "answer": {
                                                "explanation": "The charge was declined by the issuer (code 05, do not honor).",
                                                "evidence": [
                                                    {
                                                        "tool": "get_charge",
                                                        "id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M01",
                                                        "note": "declined, issuer code 05"
                                                    }
                                                ],
                                                "next_step": "Ask the buyer for another card.",
                                                "draft_reply": null
                                            },
                                            "sources": [
                                                {
                                                    "tool": "get_charge",
                                                    "arguments": {
                                                        "charge": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M01"
                                                    },
                                                    "status": 200
                                                }
                                            ],
                                            "usage": {
                                                "input_tokens": 1840,
                                                "output_tokens": 92,
                                                "rounds": 2
                                            },
                                            "finish_reason": "stop",
                                            "refused": false,
                                            "cost_micros": 782,
                                            "duration_ms": 2310,
                                            "first_token_ms": 1140
                                        }
                                    }
                                }
                            },
                            "text/event-stream": {
                                "schema": {
                                    "type": "string",
                                    "description": "With `Accept: text/event-stream` the answer streams as server-sent events: `searching` `{tool, query}` before each docs search or read (a `searching` after some text means that text was thinking aloud: clear it), `text` `{delta}` the next piece of the explanation, `done` the whole answer (this operation's JSON), `error` `{key, message}` when the model fails after the stream opened. Refusals (switch off, rate, budget, validation) come before the stream as the usual JSON error and status."
                                }
                            }
                        }
                    },
                    "4XX": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "description": "the model could not answer (ai_unavailable); try again shortly",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiKey": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Shell",
                        "label": "curl",
                        "source": "curl -X POST https://api.sandbox.staging.regoria.com/v1/ai/ask \\\n  -H \"Authorization: Bearer $API_KEY\""
                    },
                    {
                        "lang": "TypeScript",
                        "label": "TypeScript SDK",
                        "source": "const result = await client.ai.ask();"
                    },
                    {
                        "lang": "PHP",
                        "label": "PHP SDK",
                        "source": "$result = $client->ai()->ask();"
                    }
                ]
            }
        }
    },
    "webhooks": {
        "charge.declined": {
            "post": {
                "summary": "A card charge was declined.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `charge.declined`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookChargeDeclined",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventChargeDeclined"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "checkout.abandoned": {
            "post": {
                "summary": "A checkout session expired without a payment.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `checkout.abandoned`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookCheckoutAbandoned",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventCheckoutAbandoned"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "checkout.completed": {
            "post": {
                "summary": "A checkout session was paid: its session, order, subscription and customer together.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `checkout.completed`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookCheckoutCompleted",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventCheckoutCompleted"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "dispute.closed": {
            "post": {
                "summary": "A dispute closed, won or lost.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `dispute.closed`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookDisputeClosed",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventDisputeClosed"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "dispute.opened": {
            "post": {
                "summary": "A chargeback or retrieval was opened against a charge.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `dispute.opened`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookDisputeOpened",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventDisputeOpened"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "order.access_revoked": {
            "post": {
                "summary": "Access to a paid order was revoked (refund or dispute).",
                "description": "Sent as `POST` to each of your endpoints subscribed to `order.access_revoked`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookOrderAccessRevoked",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventOrderAccessRevoked"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "order.in_review": {
            "post": {
                "summary": "An order was held for review before fulfilment.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `order.in_review`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookOrderInReview",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventOrderInReview"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "order.paid": {
            "post": {
                "summary": "An order was paid: the charge captured and the order is yours to fulfil.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `order.paid`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookOrderPaid",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventOrderPaid"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "order.review_closed": {
            "post": {
                "summary": "A review on an order closed, approved or rejected.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `order.review_closed`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookOrderReviewClosed",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventOrderReviewClosed"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "payment_method.created": {
            "post": {
                "summary": "A card was saved for a customer.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `payment_method.created`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookPaymentMethodCreated",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventPaymentMethodCreated"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "payment_method.updated": {
            "post": {
                "summary": "A saved card was updated (expiry or account updater).",
                "description": "Sent as `POST` to each of your endpoints subscribed to `payment_method.updated`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookPaymentMethodUpdated",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventPaymentMethodUpdated"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "payout.sent": {
            "post": {
                "summary": "A payout was sent to your bank account.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `payout.sent`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookPayoutSent",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventPayoutSent"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "refund.issued": {
            "post": {
                "summary": "A refund was issued on a charge.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `refund.issued`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookRefundIssued",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventRefundIssued"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.cancelled": {
            "post": {
                "summary": "A subscription was canceled.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.cancelled`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionCancelled",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionCancelled"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.past_due": {
            "post": {
                "summary": "A renewal failed and the subscription is past due.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.past_due`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionPastDue",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionPastDue"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.pause_cancelled": {
            "post": {
                "summary": "A scheduled pause was cleared before it took effect; the subscription keeps renewing.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.pause_cancelled`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionPauseCancelled",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionPauseCancelled"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.pause_scheduled": {
            "post": {
                "summary": "A pause was scheduled for the end of the current period, by the buyer or by you.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.pause_scheduled`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionPauseScheduled",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionPauseScheduled"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.paused": {
            "post": {
                "summary": "A subscription was paused.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.paused`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionPaused",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionPaused"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.payment_method_changed": {
            "post": {
                "summary": "The card a subscription renews on changed.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.payment_method_changed`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionPaymentMethodChanged",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionPaymentMethodChanged"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.plan_change_scheduled": {
            "post": {
                "summary": "A plan change was scheduled for the next period.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.plan_change_scheduled`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionPlanChangeScheduled",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionPlanChangeScheduled"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.plan_changed": {
            "post": {
                "summary": "A subscription moved to another plan.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.plan_changed`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionPlanChanged",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionPlanChanged"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.renewed": {
            "post": {
                "summary": "A subscription renewed for a new period.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.renewed`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionRenewed",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionRenewed"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.resumed": {
            "post": {
                "summary": "A paused subscription was resumed and charged for a new period.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.resumed`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionResumed",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionResumed"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.started": {
            "post": {
                "summary": "A subscription started and its first period was paid.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.started`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionStarted",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionStarted"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.trial_ending": {
            "post": {
                "summary": "A trial ends within your trial-ending lead days; sent with the buyer's reminder email.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.trial_ending`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionTrialEnding",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionTrialEnding"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        },
        "subscription.updated": {
            "post": {
                "summary": "A subscription changed status, plan, price, card or cancellation; the full subscription.",
                "description": "Sent as `POST` to each of your endpoints subscribed to `subscription.updated`. Verify `X-Webhook-Signature` before trusting the body; `X-Webhook-Delivery` is the same across retries of one event, so use it to deduplicate.",
                "operationId": "webhookSubscriptionUpdated",
                "parameters": [
                    {
                        "name": "X-Webhook-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>`. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Event",
                        "in": "header",
                        "required": true,
                        "description": "The event type, the same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-Webhook-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "The event id (`evt_…`), stable across retries and replays of the same event.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EventSubscriptionUpdated"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Acknowledged. Any 2xx within 10 seconds; anything else is retried at 1, 5 and 30 minutes, then 2, 6 and 24 hours."
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Address": {
                "type": "object",
                "description": "A US postal address (v1 is US-only).",
                "required": [
                    "line1",
                    "city",
                    "state",
                    "postal_code"
                ],
                "properties": {
                    "line1": {
                        "type": "string"
                    },
                    "line2": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "city": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "description": "Two-letter state"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "postal_code_suffix": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The four digits after the ZIP (ZIP+4) when the address form has them; the tax fallback reads the seed's ZIP+4 range first"
                    },
                    "country": {
                        "type": "string",
                        "default": "US"
                    }
                }
            },
            "AdminPublicPolicy": {
                "examples": [
                    {
                        "kind": "terms",
                        "version": 1,
                        "text": "text",
                        "text_hash": "text",
                        "effective_from": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "kind",
                    "version",
                    "text",
                    "text_hash",
                    "effective_from"
                ],
                "properties": {
                    "kind": {
                        "type": "string",
                        "enum": [
                            "terms",
                            "privacy",
                            "merchant_agreement",
                            "refund_policy",
                            "merchant_privacy",
                            "declarations"
                        ]
                    },
                    "version": {
                        "type": "integer"
                    },
                    "text": {
                        "type": "string"
                    },
                    "text_hash": {
                        "type": "string"
                    },
                    "effective_from": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "AiAiAnswer": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "public id aic_ of the call (its audit row)"
                    },
                    "board": {
                        "type": "string",
                        "x-enum-name": "AiBoard",
                        "enum": [
                            "admin",
                            "merchant",
                            "v1",
                            "buyer"
                        ]
                    },
                    "surface": {
                        "type": "string"
                    },
                    "text": {
                        "type": "string",
                        "description": "The model's final text (the JSON of `answer` when it complied)"
                    },
                    "answer": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The parsed answer when the model answered the asked JSON shape",
                        "properties": {
                            "explanation": {
                                "type": "string"
                            },
                            "evidence": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "tool": {
                                            "type": "string"
                                        },
                                        "id": {
                                            "type": "string"
                                        },
                                        "note": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "next_step": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the model may answer null when nothing is to be done"
                            },
                            "draft_reply": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "sources": {
                        "type": "array",
                        "description": "Every tool the model ran, with its arguments and the HTTP status of the route",
                        "items": {
                            "type": "object",
                            "properties": {
                                "tool": {
                                    "type": "string"
                                },
                                "arguments": {
                                    "type": "object"
                                },
                                "status": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "usage": {
                        "type": "object",
                        "properties": {
                            "input_tokens": {
                                "type": "integer"
                            },
                            "output_tokens": {
                                "type": "integer"
                            },
                            "rounds": {
                                "type": "integer"
                            }
                        }
                    },
                    "finish_reason": {
                        "type": "string"
                    },
                    "refused": {
                        "type": "boolean",
                        "description": "true when the model stopped for a safety reason"
                    },
                    "cost_micros": {
                        "type": "integer",
                        "description": "micro-dollars at list price"
                    },
                    "duration_ms": {
                        "type": "integer"
                    },
                    "first_token_ms": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Milliseconds from the ask to the first streamed text; null when the ask did not stream"
                    },
                    "links": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "The link of each help or docs section `answer.evidence` cites, by its id: `help/<board>/<page>#<section>` (a help page, opened in the board) or the docs site URL of a guide, operation or event"
                    },
                    "link_titles": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "object",
                            "required": [
                                "page",
                                "heading"
                            ],
                            "properties": {
                                "page": {
                                    "type": "string",
                                    "description": "the help page, guide or operation title"
                                },
                                "heading": {
                                    "type": "string",
                                    "description": "the section heading, \"A › B\" when nested; empty for the page itself"
                                }
                            }
                        },
                        "description": "The names of each section `answer.evidence` cites, by its id, from the docs index the assistant searched (the sources read \"page › heading\")"
                    }
                }
            },
            "AiAiAsk": {
                "type": "object",
                "required": [
                    "question"
                ],
                "properties": {
                    "surface": {
                        "type": "string",
                        "description": "The surface prompt of the board (default `general`); the detail pages name theirs (`order`, `charge`, `dispute`, `subscription`, `balance` on the dashboard; `alert`, `dead_letter`, `dispute`, `reconciliation`, `payment_review`, `merchant`, `tenant`, `platform_usage` in the back office)."
                    },
                    "question": {
                        "type": "string",
                        "maxLength": 4000
                    },
                    "subject_type": {
                        "type": "string",
                        "description": "The kind of record the question is about (order, charge, dispute, …); with subject_id."
                    },
                    "subject_id": {
                        "type": "string",
                        "description": "The public id of the subject."
                    },
                    "route": {
                        "type": "string",
                        "maxLength": 200,
                        "description": "The app route pattern of the screen the panel is open on (`/merchants/:id`); its help page goes into the assistant's instructions"
                    },
                    "history": {
                        "type": "array",
                        "maxItems": 5,
                        "description": "The earlier turns of the open panel, oldest first (at most 5); closing the panel clears them",
                        "items": {
                            "type": "object",
                            "required": [
                                "question",
                                "explanation"
                            ],
                            "properties": {
                                "question": {
                                    "type": "string",
                                    "maxLength": 4000
                                },
                                "explanation": {
                                    "type": "string",
                                    "maxLength": 8000
                                }
                            }
                        }
                    }
                }
            },
            "BillingAttempt": {
                "type": "object",
                "properties": {
                    "attempt": {
                        "type": "integer"
                    },
                    "idempotency_key": {
                        "type": "string"
                    },
                    "scheduled_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "finished_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "result": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "paid",
                            "declined",
                            "error"
                        ]
                    },
                    "decline_category": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "error": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The key of a refusal before any charge on an attempt that ended in error, e.g. tax_unavailable (no correct tax quote: the renewal waits for the next retry, decision 12); null otherwise"
                    },
                    "order_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "BillingCancelRequest": {
                "examples": [
                    {
                        "immediately": false,
                        "reason": "requested_by_customer"
                    }
                ],
                "type": "object",
                "properties": {
                    "immediately": {
                        "type": "boolean",
                        "description": "Staff and merchants only; buyers always cancel at period end"
                    },
                    "reason": {
                        "type": "string"
                    }
                }
            },
            "BillingChangePlanRequest": {
                "examples": [
                    {
                        "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                    }
                ],
                "type": "object",
                "required": [
                    "price_id"
                ],
                "properties": {
                    "price_id": {
                        "type": "string",
                        "description": "An active, recurring, non-inline price of the subscription's merchant in its currency, on any product and any interval; the current price clears a pending change"
                    }
                }
            },
            "BillingPaymentMethodChangeRequest": {
                "examples": [
                    {
                        "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                    }
                ],
                "type": "object",
                "description": "a stored card only: merchants never host a card form, so a payment_token field answers 422 validation",
                "required": [
                    "payment_method_id"
                ],
                "properties": {
                    "payment_method_id": {
                        "type": "string",
                        "description": "an active saved card of the subscription's merchant"
                    }
                }
            },
            "BillingPeriod": {
                "examples": [
                    {
                        "id": "per_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "number": 1,
                        "period_start": "2026-10-21T14:05:00.000Z",
                        "period_end": "2026-10-21T14:05:00.000Z",
                        "due_at": "2026-10-21T14:05:00.000Z",
                        "state": "scheduled",
                        "amount_cents": 2900,
                        "tax_cents": 239,
                        "total_cents": 3139,
                        "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "attempts": 1,
                        "next_attempt_at": "2026-10-21T14:05:00.000Z",
                        "last_decline_category": "text",
                        "paid_at": "2026-10-21T14:05:00.000Z",
                        "attempts_log": [
                            {
                                "attempt": 1,
                                "idempotency_key": "text",
                                "scheduled_at": "2026-10-21T14:05:00.000Z",
                                "started_at": "2026-10-21T14:05:00.000Z",
                                "finished_at": "2026-10-21T14:05:00.000Z",
                                "result": "pending",
                                "decline_category": "text",
                                "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                            }
                        ]
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "number",
                    "period_start",
                    "period_end",
                    "due_at",
                    "state",
                    "amount_cents"
                ],
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "number": {
                        "type": "integer"
                    },
                    "period_start": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "period_end": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "due_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "scheduled",
                            "charging",
                            "pending",
                            "paid",
                            "declined",
                            "cancelled",
                            "skipped"
                        ]
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "tax_cents": {
                        "type": "integer"
                    },
                    "total_cents": {
                        "type": "integer"
                    },
                    "order_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "charge_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "attempts": {
                        "type": "integer"
                    },
                    "next_attempt_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_decline_category": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "paid_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "attempts_log": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BillingAttempt"
                        }
                    }
                }
            },
            "BillingPlanChangeConfirmation": {
                "examples": [
                    {
                        "id": "pcc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "url": "https://shop.example.com/webhooks",
                        "expires_at": "2026-10-21T14:05:00.000Z",
                        "price": {
                            "id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "name": "Pro monthly",
                            "amount_cents": 2900,
                            "currency": "USD",
                            "interval": "week",
                            "interval_count": 3
                        },
                        "effective_at": "2026-10-21T14:05:00.000Z",
                        "card": {
                            "brand": "visa",
                            "last4": "4242"
                        }
                    }
                ],
                "type": "object",
                "description": "a plan-change confirmation: a checkout session of mode plan_change pinning the target price id and its price version",
                "required": [
                    "id",
                    "url",
                    "expires_at",
                    "price",
                    "effective_at",
                    "card"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "the checkout session (cks_)"
                    },
                    "url": {
                        "type": "string",
                        "description": "the hosted confirmation page, its buyer token in the fragment"
                    },
                    "expires_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "24 hours after creation"
                    },
                    "price": {
                        "type": "object",
                        "description": "the target price; name is its product's name",
                        "required": [
                            "id",
                            "name",
                            "amount_cents",
                            "currency",
                            "interval",
                            "interval_count"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "amount_cents": {
                                "type": "integer"
                            },
                            "currency": {
                                "type": "string"
                            },
                            "interval": {
                                "type": "string",
                                "enum": [
                                    "week",
                                    "month",
                                    "year"
                                ]
                            },
                            "interval_count": {
                                "type": "integer"
                            }
                        }
                    },
                    "effective_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "the end of the current period, when the new price applies"
                    },
                    "card": {
                        "type": "object",
                        "required": [
                            "brand",
                            "last4"
                        ],
                        "properties": {
                            "brand": {
                                "type": "string"
                            },
                            "last4": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "BillingPlanChangeConfirmationRequest": {
                "examples": [
                    {
                        "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                    }
                ],
                "type": "object",
                "required": [
                    "price_id"
                ],
                "properties": {
                    "price_id": {
                        "type": "string",
                        "description": "Another active, recurring, non-inline price of the subscription's merchant in its currency"
                    }
                }
            },
            "BillingRecurring": {
                "type": "object",
                "description": "The recurring terms of the subscription's price (interval, interval_count, trial_interval, trial_interval_count, trial_price_cents), as the catalogue Price.recurring block",
                "properties": {
                    "interval": {
                        "type": "string",
                        "enum": [
                            "week",
                            "month",
                            "year"
                        ]
                    },
                    "interval_count": {
                        "type": "integer"
                    },
                    "trial_interval": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "day",
                            "week",
                            "month",
                            "year",
                            null
                        ],
                        "description": "The trial unit; null exactly when trial_interval_count is 0"
                    },
                    "trial_interval_count": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "the trial is this many trial_interval units; 0 = no trial"
                    },
                    "trial_price_cents": {
                        "type": "integer",
                        "minimum": 0
                    }
                },
                "required": [
                    "interval",
                    "interval_count",
                    "trial_interval",
                    "trial_interval_count",
                    "trial_price_cents"
                ]
            },
            "BillingSubscription": {
                "examples": [
                    {
                        "id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "store": {
                            "id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "name": "Starter pack",
                            "display_name": "Acme Goods LLC",
                            "logo_url": "https://cdn.example.com/logo.png"
                        },
                        "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "buyer_email": "buyer@example.com",
                        "customer_ref": "cus_A1B2",
                        "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "product_id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "recurring": {
                            "interval": "week",
                            "interval_count": 3,
                            "trial_interval": "day",
                            "trial_interval_count": 30,
                            "trial_price_cents": 0
                        },
                        "status": "trialing",
                        "trial_end": "2026-10-21T14:05:00.000Z",
                        "current_period_start": "2026-10-21T14:05:00.000Z",
                        "current_period_end": "2026-10-21T14:05:00.000Z",
                        "next_charge_at": "2026-10-21T14:05:00.000Z",
                        "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "billing_address": {
                            "key": "value"
                        },
                        "amount_cents": 2900,
                        "currency": "USD",
                        "origin_order_id": "text",
                        "cancel_at_period_end": false,
                        "cancel_source": "buyer",
                        "cancel_reason": "text",
                        "cancelled_at": "2026-10-21T14:05:00.000Z",
                        "ended_at": "2026-10-21T14:05:00.000Z",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        },
                        "billing_mode": "tenant_managed",
                        "pending_price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M2D",
                        "plan_change_confirmation": {
                            "state": "pending_confirmation",
                            "expires_at": "2026-10-21T14:05:00.000Z",
                            "url": "https://shop.example.com/webhooks"
                        },
                        "pause_at": "2026-10-21T14:05:00.000Z",
                        "version": 1,
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "merchant_id",
                    "buyer_email",
                    "price_id",
                    "status",
                    "current_period_start",
                    "current_period_end",
                    "amount_cents",
                    "currency",
                    "version"
                ],
                "properties": {
                    "price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The currency the merchant set the price in; shown beside the charged amount when it differs from currency"
                    },
                    "price_amount_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The amount in the price currency, in its smallest unit"
                    },
                    "id": {
                        "type": "string"
                    },
                    "store": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The store the row names (id, name, display_name, logo_url); null when it names none",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "display_name": {
                                "type": "string"
                            },
                            "logo_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "store_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The store the row belongs to (public id sto_); null for a row made before the backfill"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "buyer_email": {
                        "type": "string"
                    },
                    "customer_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's customer reference copied from the order that started the subscription; null on subscriptions started before it was carried"
                    },
                    "customer_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the subscription's customer, its cus_ id, copied from the order that started it; null when that order had no customer"
                    },
                    "product_id": {
                        "type": "string"
                    },
                    "price_id": {
                        "type": "string",
                        "description": "The price the subscription renews on (public id prc_)"
                    },
                    "recurring": {
                        "$ref": "#/components/schemas/BillingRecurring"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "trialing",
                            "active",
                            "past_due",
                            "paused",
                            "cancelled"
                        ]
                    },
                    "trial_end": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "current_period_start": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "current_period_end": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "next_charge_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "payment_method_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "billing_address": {
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "origin_order_id": {
                        "type": "string"
                    },
                    "cancel_at_period_end": {
                        "type": "boolean"
                    },
                    "cancel_source": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "buyer",
                            "merchant_api",
                            "merchant",
                            "staff",
                            "dunning",
                            "dispute",
                            "system",
                            null
                        ]
                    },
                    "cancel_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "cancelled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "ended_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "metadata": {
                        "type": "object"
                    },
                    "billing_mode": {
                        "type": "string",
                        "enum": [
                            "tenant_managed",
                            "merchant_managed"
                        ],
                        "description": "who drives renewals, snapshotted at checkout and never changed: tenant_managed is collected by the tenant; merchant_managed only by POST /v1/subscriptions/{subscription}/charge"
                    },
                    "pending_price_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The price a change-plan request moves the subscription to at its next renewal (no proration); null when none is pending"
                    },
                    "plan_change_confirmation": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The subscription's open plan-change confirmation the buyer has not accepted yet, or null; on the 201 of /v1 change-plan it also carries url",
                        "properties": {
                            "state": {
                                "type": "string",
                                "enum": [
                                    "pending_confirmation"
                                ]
                            },
                            "expires_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "24 hours after creation"
                            },
                            "url": {
                                "type": "string",
                                "description": "the hosted confirmation page, its buyer token in the fragment: on the 201 of /v1 change-plan only, never on a read or on /merchant"
                            }
                        }
                    },
                    "pause_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "when a requested pause takes effect (the end of the paid period); the status turns paused then"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "BillingUpdateCardLink": {
                "examples": [
                    {
                        "url": "https://pay.example.com/card/sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C?t=ten_01HZX5Y3V8N2K7QJ4R9T6B3M1D&m=mer_01HZX5Y3V8N2K7QJ4R9T6B3M1E#g=Q2hhbmdlTWVJbjEwTWludXRlc09ubHlPbmNlMDAw",
                        "expires_at": "2026-10-27T14:10:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "url",
                    "expires_at"
                ],
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "https://{pay host}/card/{subscription}?t&m#g={token}: the single-use grant token rides after #, so no server log or Referer sees it"
                    },
                    "expires_at": {
                        "$ref": "#/components/schemas/Timestamp"
                    }
                }
            },
            "CatalogueArchiveRequest": {
                "examples": [
                    {
                        "version": 1
                    }
                ],
                "type": "object",
                "properties": {
                    "version": {
                        "type": "integer"
                    }
                },
                "required": [
                    "version"
                ]
            },
            "CataloguePrice": {
                "examples": [
                    {
                        "id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "product_id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "price_version": 2,
                        "type": "recurring",
                        "status": "active",
                        "nickname": "Pro monthly",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        },
                        "replaces_price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M0B",
                        "recurring": {
                            "interval": "month",
                            "interval_count": 1,
                            "trial_interval": "day",
                            "trial_interval_count": 14,
                            "trial_price_cents": 0
                        },
                        "amount_cents": 2900,
                        "currency": "USD",
                        "tax_inclusive": false,
                        "buyer_selectable": false,
                        "active_from": "2026-10-21T14:05:00.000Z",
                        "active_to": null,
                        "effective_at": null,
                        "created_by": "key_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "description": "A price is immutable: amount, currency, type, tax_inclusive and the recurring terms never change after creation; a different value is a successor price (replaces_price_id). Only nickname and metadata are edited.",
                "properties": {
                    "base_price_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The price this one is a fixed amount of in another currency; null for a price of its own"
                    },
                    "amounts": {
                        "type": "array",
                        "description": "The fixed amounts of this price in other currencies (its active linked prices); empty on a linked price",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string",
                                    "description": "public id prc_ of the linked price"
                                },
                                "currency": {
                                    "type": "string"
                                },
                                "amount_cents": {
                                    "type": "integer"
                                }
                            },
                            "required": [
                                "id",
                                "currency",
                                "amount_cents"
                            ]
                        }
                    },
                    "id": {
                        "type": "string",
                        "description": "public id prc_"
                    },
                    "product_id": {
                        "type": "string",
                        "description": "public id prd_"
                    },
                    "price_version": {
                        "type": "integer",
                        "description": "per-product counter: every new price of the product takes the next one"
                    },
                    "type": {
                        "type": "string",
                        "x-enum-name": "PriceType",
                        "enum": [
                            "one_off",
                            "recurring"
                        ],
                        "description": "recurring = the line starts a subscription on the recurring terms; one_off = a single charge"
                    },
                    "status": {
                        "type": "string",
                        "x-enum-name": "PriceStatus",
                        "enum": [
                            "active",
                            "archived"
                        ],
                        "description": "read-only, derived from active_to: active while active_to is null, archived once it is set (archive sets it, unarchive clears it, a successor archives the price it replaces)"
                    },
                    "nickname": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's label for the price; editable"
                    },
                    "metadata": {
                        "type": [
                            "object",
                            "array"
                        ],
                        "items": [],
                        "description": "free-form key/value pairs; editable"
                    },
                    "replaces_price_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the price this one succeeds (public id prc_); null on a price that replaces none"
                    },
                    "recurring": {
                        "description": "the recurring terms on a recurring price; null on a one_off price",
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/CatalogueRecurring"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "tax_inclusive": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "The amount includes sales tax (tax-inclusive at the provider); null = the merchant's default (tax_settings.tax_inclusive, else false)"
                    },
                    "buyer_selectable": {
                        "type": "boolean",
                        "default": false,
                        "description": "Buyers may switch a subscription to this price from the customer portal; edited in place, and a successor price copies it from the price it replaces unless its create sets it"
                    },
                    "active_from": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "active_to": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "when the price was archived or superseded; null while it is active"
                    },
                    "effective_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "On a successor, when the replaced price's subscribers move to this price, at their first renewal on or after it; null when they do not move (new buyers only) or the price replaces none"
                    },
                    "replace_locked": {
                        "type": "boolean",
                        "description": "read-only, on the single price and single product reads and the price create response only: true while a change on this price's replaces_price_id chain that needs a notice is still pending (its effective_at ahead, or a subscriber noticed of it not moved yet); a successor of this price is refused 422 price_increase_pending until then"
                    },
                    "replace_locked_until": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "read-only, beside replace_locked: the latest effective_at of the pending changes on the chain; the lock lasts at least until then, and after it while a subscriber noticed of the change has not renewed onto it. Null when the lock is held only by such subscribers, or nothing is locked"
                    },
                    "notice_owed": {
                        "type": "boolean",
                        "description": "read-only, beside replace_locked: true when this price is a successor whose effective_at is still ahead and its change sends the increase notice: it needs one over the terms in effect, or a live subscriber on an earlier link of the chain is sent or owed one, judged against that subscriber's own price. A noticed subscriber moves only at a renewal at least the notice lead days after the notice. False when no notice is sent"
                    },
                    "created_by": {
                        "type": "string",
                        "description": "public id key_"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "product_id",
                    "price_version",
                    "type",
                    "status",
                    "nickname",
                    "metadata",
                    "replaces_price_id",
                    "recurring",
                    "amount_cents",
                    "currency",
                    "buyer_selectable",
                    "active_from",
                    "active_to",
                    "effective_at",
                    "created_by",
                    "created_at"
                ]
            },
            "CataloguePriceRequest": {
                "examples": [
                    {
                        "product_id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "recurring",
                        "amount_cents": 2900,
                        "recurring": {
                            "interval": "month",
                            "interval_count": 1,
                            "trial_interval": "day",
                            "trial_interval_count": 14,
                            "trial_price_cents": 0
                        },
                        "nickname": "Pro monthly",
                        "tax_inclusive": false
                    }
                ],
                "type": "object",
                "description": "Adds a price beside the product's other active prices. With replaces_price_id it is a successor: same product, same type, the replaced price archived in the same transaction.",
                "properties": {
                    "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "One of the currencies the business prices in (422 currency_not_supported); omitted = the home currency when the business prices in it, else its first price currency. A linked price names a currency other than its base price's"
                    },
                    "base_price_id": {
                        "type": "string",
                        "description": "Makes this a fixed amount of an existing price in another currency (a linked price): an active price of the same product that is not itself linked (422 invalid_base_price). It takes the base price's type, recurring terms and tax_inclusive; one per currency (409 linked_price_exists). A buyer of that currency pays this amount instead of a converted one"
                    },
                    "product_id": {
                        "type": "string",
                        "description": "public id prd_"
                    },
                    "type": {
                        "type": "string",
                        "x-enum-name": "PriceType",
                        "enum": [
                            "one_off",
                            "recurring"
                        ]
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "tax_inclusive": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "the amount includes sales tax; omitted or null = the merchant's default"
                    },
                    "recurring": {
                        "$ref": "#/components/schemas/CatalogueRecurringRequest"
                    },
                    "replaces_price_id": {
                        "type": "string",
                        "description": "the active, non-inline price of the same product and type this price succeeds (422 invalid_replaces_price; 409 price_superseded when it already has a successor)"
                    },
                    "effective_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "With replaces_price_id on a recurring price, when the replaced price's subscribers move to this one, at their first renewal on or after it. A higher amount or any interval change needs the merchant's price_increase_lead_days (422 effective_at_too_soon) and sends the increase notice; a lower or equal amount with the same interval moves at the next renewal with no notice. A second pending increase on the same price is 422 price_increase_pending; a past date, or effective_at on a one_off price, is 422 invalid_effective_at. Absent = sold to new buyers only."
                    },
                    "nickname": {
                        "type": "string"
                    },
                    "metadata": {
                        "type": "object"
                    },
                    "buyer_selectable": {
                        "type": "boolean",
                        "description": "Buyers may switch to this price from the customer portal (422 invalid_buyer_selectable unless true or false); omitted = false, or on a successor the replaced price's value"
                    }
                },
                "required": [
                    "product_id",
                    "type",
                    "amount_cents"
                ]
            },
            "CataloguePriceUpdateRequest": {
                "examples": [
                    {
                        "nickname": "Pro monthly",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        }
                    }
                ],
                "type": "object",
                "description": "Edits the labels only; amount, currency, type, tax_inclusive and the recurring terms never change (a change is a successor price)",
                "properties": {
                    "nickname": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": "object"
                    },
                    "buyer_selectable": {
                        "type": "boolean",
                        "description": "Buyers may switch to this price from the customer portal; edited in place, never a new price version (422 invalid_buyer_selectable unless true or false)"
                    }
                }
            },
            "CatalogueProduct": {
                "examples": [
                    {
                        "id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "store": {
                            "id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "name": "Starter pack",
                            "display_name": "Acme Goods LLC",
                            "logo_url": "https://cdn.example.com/logo.png"
                        },
                        "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "name": "Starter pack",
                        "description": "One-line description.",
                        "sku": "SKU-001",
                        "tax_code": "text",
                        "status": "active",
                        "metadata": [],
                        "version": 1,
                        "prices": [
                            {
                                "id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "product_id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "price_version": 1,
                                "type": "one_off",
                                "status": "active",
                                "nickname": null,
                                "metadata": [],
                                "replaces_price_id": null,
                                "recurring": null,
                                "amount_cents": 2900,
                                "currency": "USD",
                                "tax_inclusive": false,
                                "active_from": "2026-10-21T14:05:00.000Z",
                                "active_to": null,
                                "effective_at": null,
                                "created_by": "key_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "created_at": "2026-10-21T14:05:00.000Z"
                            }
                        ],
                        "created_at": "2026-10-21T14:05:00.000Z",
                        "updated_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "description": "A product holds one-off and recurring prices side by side; it has no type of its own",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "public id prd_"
                    },
                    "store": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The store the row names (id, name, display_name, logo_url); null when it names none",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "display_name": {
                                "type": "string"
                            },
                            "logo_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "store_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The store the row belongs to (public id sto_); null for a row made before the backfill"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The merchant's optional product identifier, unique per store; an inline price_data line may name its product by it (product_sku)"
                    },
                    "tax_code": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "x-enum-name": "ProductStatus",
                        "enum": [
                            "active",
                            "archived"
                        ]
                    },
                    "metadata": {
                        "type": [
                            "object",
                            "array"
                        ],
                        "items": []
                    },
                    "version": {
                        "type": "integer"
                    },
                    "prices": {
                        "type": "array",
                        "description": "the active prices, inline prices left out",
                        "items": {
                            "$ref": "#/components/schemas/CataloguePrice"
                        }
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "description",
                    "sku",
                    "tax_code",
                    "status",
                    "metadata",
                    "version",
                    "prices",
                    "created_at",
                    "updated_at"
                ]
            },
            "CatalogueProductRequest2": {
                "examples": [
                    {
                        "name": "Starter pack",
                        "sku": "SKU-001",
                        "tax_code": "text",
                        "amount_cents": 2900,
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        }
                    }
                ],
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "sku": {
                        "type": "string",
                        "description": "unique per store (422 duplicate_sku)"
                    },
                    "tax_code": {
                        "type": "string"
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "metadata": {
                        "type": "object"
                    }
                },
                "required": [
                    "name",
                    "tax_code"
                ]
            },
            "CatalogueProductUpdateRequest": {
                "examples": [
                    {
                        "name": "Starter pack",
                        "version": 1
                    }
                ],
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "unique per store (422 duplicate_sku)"
                    },
                    "version": {
                        "type": "integer"
                    }
                },
                "required": [
                    "name",
                    "version"
                ]
            },
            "CatalogueRecurring": {
                "type": "object",
                "description": "the recurring terms of a price, fixed at creation",
                "properties": {
                    "interval": {
                        "type": "string",
                        "x-enum-name": "RecurringInterval",
                        "enum": [
                            "week",
                            "month",
                            "year"
                        ]
                    },
                    "interval_count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 52
                    },
                    "trial_interval": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "x-enum-name": "TrialInterval",
                        "enum": [
                            "day",
                            "week",
                            "month",
                            "year",
                            null
                        ],
                        "description": "The trial unit; null exactly when trial_interval_count is 0"
                    },
                    "trial_interval_count": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "the trial is this many trial_interval units, ending on the calendar date start + count x interval (a month trial started on the 31st ends on the last day of the next month); 0 = no trial"
                    },
                    "trial_price_cents": {
                        "type": "integer",
                        "minimum": 0
                    }
                },
                "required": [
                    "interval",
                    "interval_count",
                    "trial_interval",
                    "trial_interval_count",
                    "trial_price_cents"
                ]
            },
            "CatalogueRecurringRequest": {
                "type": "object",
                "description": "required on a recurring price, refused on a one_off one (422 invalid_recurring). interval week, month or year (422 invalid_interval); interval_count 1 to 52 (422 invalid_interval_count); trial_interval day, week, month or year, required when trial_interval_count is above 0 and absent or null when it is 0 (422 invalid_trial_interval); trial_interval_count 0 or more, spanning at most the configured maximum of days (365: day 365, week 52, month 12, year 1; 422 invalid_trial_interval_count); trial_price_cents above 0 only with trial_interval_count above 0 (422 invalid_trial_price). A price carries no retry schedule.",
                "properties": {
                    "interval": {
                        "type": "string",
                        "x-enum-name": "RecurringInterval",
                        "enum": [
                            "week",
                            "month",
                            "year"
                        ]
                    },
                    "interval_count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 52
                    },
                    "trial_interval": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "x-enum-name": "TrialInterval",
                        "enum": [
                            "day",
                            "week",
                            "month",
                            "year",
                            null
                        ]
                    },
                    "trial_interval_count": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "trial_price_cents": {
                        "type": "integer",
                        "minimum": 0
                    }
                },
                "required": [
                    "interval"
                ]
            },
            "CheckoutCompletion": {
                "examples": [
                    {
                        "status": "paid",
                        "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "attempt": 1,
                        "order": {
                            "id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "store": {
                                "id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "name": "Starter pack",
                                "display_name": "Acme Goods LLC",
                                "logo_url": "https://cdn.example.com/logo.png"
                            },
                            "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "period_id": "per_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.com",
                            "buyer_name": "Jamie Rivera",
                            "billing_address": {
                                "line1": "1 Main St",
                                "line2": "Suite 200",
                                "city": "Austin",
                                "state": "TX",
                                "postal_code": "73301",
                                "country": "US"
                            },
                            "customer_ref": "cus_A1B2",
                            "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "reference": "INV-1001",
                            "status": "paid",
                            "subtotal_cents": 2900,
                            "tax_cents": 239,
                            "total_cents": 3139,
                            "currency": "USD",
                            "refunded_cents": 0,
                            "tax_fallback": false,
                            "tax_rate_source": "provider",
                            "tax_rate_source_version": "anrok:v1",
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "card": {
                                "brand": "visa",
                                "last4": "4242",
                                "payment_method_public_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                            },
                            "captured_at": "2026-10-21T14:05:00.000Z",
                            "available_at": "2026-10-21T14:05:00.000Z",
                            "fee_cents": 145,
                            "fee_breakdown": [
                                {
                                    "kind": "base",
                                    "name": "Starter pack",
                                    "pct_bps": 290,
                                    "cents": 84
                                }
                            ],
                            "reserve_cents": 0,
                            "reserve_release_at": "2026-10-21T14:05:00.000Z",
                            "lines": [
                                {
                                    "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                    "price_version": 1,
                                    "product_id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                    "name": "Starter pack",
                                    "quantity": 1,
                                    "unit_price_cents": 2900,
                                    "tax_cents": 239
                                }
                            ],
                            "acceptances": [
                                {
                                    "id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                    "consent_type": "card",
                                    "policy_versions": {
                                        "key": "value"
                                    },
                                    "accepted_at": "2026-10-21T14:05:00.000Z"
                                }
                            ],
                            "fulfilment_due_at": "2026-10-21T14:05:00.000Z",
                            "fulfilled_at": "2026-10-21T14:05:00.000Z",
                            "fulfilment_evidence": {
                                "key": "value"
                            },
                            "access_revoked_at": "2026-10-21T14:05:00.000Z",
                            "access_revoked_reason": "text",
                            "source": "hosted",
                            "metadata": {
                                "crm_ref": "CRM-1001"
                            },
                            "version": 1,
                            "created_at": "2026-10-21T14:05:00.000Z"
                        },
                        "receipt_url": "https://shop.example.com/webhooks",
                        "receipt_pdf_url": "https://pay.example.com/api/public/receipts/ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C/pdf?t=ten_01HZX5Y3V8N2K7QJ4R9T6B3M1C&m=mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C&exp=1793000000&sig=3f2a",
                        "success_url": "https://shop.example.com/thanks",
                        "decline_category": "text",
                        "decline_code": "text",
                        "can_retry": false,
                        "errors": [
                            {
                                "key": "mor_test_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
                                "message": "text",
                                "field": "text",
                                "permission": "text",
                                "retry_after": 1,
                                "correlation_id": "text"
                            }
                        ]
                    }
                ],
                "type": "object",
                "required": [
                    "status"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": [
                            "paid",
                            "pending",
                            "in_review",
                            "declined",
                            "risk_declined",
                            "saved",
                            "three_ds_required"
                        ],
                        "description": "in_review: the card is authorized and held for a staff decision, nothing is charged yet and no order exists; success_url is still returned. saved: a setup session's card check was authorised and released; the card is stored, nothing is charged and no order exists. three_ds_required: on a merchant in dynamic 3-D Secure mode the risk check asked for the challenge; nothing is charged, the page runs the step and sends the same Pay again with three_ds_outcome and three_ds_amount_cents"
                    },
                    "three_ds_amount_cents": {
                        "type": "integer",
                        "description": "With status three_ds_required, the amount the 3-D Secure step must declare, in cents"
                    },
                    "session_id": {
                        "type": "string"
                    },
                    "attempt": {
                        "type": "integer"
                    },
                    "order": {
                        "$ref": "#/components/schemas/CheckoutOrder"
                    },
                    "receipt_url": {
                        "type": "string"
                    },
                    "receipt_pdf_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "On paid, beside receipt_url: the receipt as a PDF download, the pay host's /api/public/receipts/{order}/pdf with receipt_url's t, m, exp and sig"
                    },
                    "success_url": {
                        "description": "returned on paid, in_review and saved",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "decline_category": {
                        "type": "string",
                        "description": "on declined: Payments' decline category of the charge, or Checkout's own when no charge was made: authentication_required for a 3-D Secure check the bank refused, three_ds_abandoned for a step that timed out or the buyer cancelled (reason timeout or cancel), which the page answers with no decline message"
                    },
                    "decline_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Payments' decline_code of the charge (duplicate_transaction for a duplicate the processor refused); null when no charge was declined. A reload reads it back from the stored charge: PagePayload.decline_code"
                    },
                    "can_retry": {
                        "type": "boolean"
                    },
                    "subscription_updated": {
                        "type": "boolean",
                        "description": "saved only, on the answer that saved the session and only when the session names a subscription: whether that subscription now charges the new card; a replay of a saved session omits it"
                    },
                    "retry": {
                        "$ref": "#/components/schemas/CheckoutSubscriptionRetry"
                    },
                    "errors": {
                        "type": "array",
                        "description": "on a /public 402 only: the same decline as the platform error body (key declined or risk_declined, plus decline_category and decline_code), for clients that read a 4xx through errors[]",
                        "items": {
                            "$ref": "#/components/schemas/ErrorItem"
                        }
                    }
                }
            },
            "CheckoutCustomer": {
                "examples": [
                    {
                        "id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "customer_ref": "cus_A1B2",
                        "email": "buyer@example.com",
                        "name": "Starter pack",
                        "buyer_email": "buyer@example.com",
                        "orders_count": 3,
                        "refunded_cents": 0,
                        "first_order_at": "2026-10-21T14:05:00.000Z",
                        "last_order_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "description": "a list item: one customer of the merchant with its order aggregates; customers with an order first (latest order first, then customer_ref), then customers with no order (newest first); no paid total",
                "required": [
                    "id",
                    "customer_ref",
                    "email",
                    "name",
                    "buyer_email",
                    "orders_count",
                    "refunded_cents",
                    "first_order_at",
                    "last_order_at"
                ],
                "properties": {
                    "id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the customer's cus_ id; null only for a customer_ref that ordered before its customers row was written"
                    },
                    "customer_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's reference; null for a customer created at pay time with none, whose orders are counted by its cus_ id"
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the customer row's email (its first value unless PATCH /v1/customers changed it)"
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the customer row's name (its first value unless PATCH /v1/customers changed it)"
                    },
                    "buyer_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the email of the latest order; null for a customer with no order"
                    },
                    "orders_count": {
                        "type": "integer"
                    },
                    "refunded_cents": {
                        "type": "integer",
                        "description": "the sum of the orders' refunded_cents"
                    },
                    "first_order_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "the earliest captured_at; null for a customer with no order"
                    },
                    "last_order_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "the latest captured_at; null for a customer with no order"
                    }
                }
            },
            "CheckoutCustomerCreateRequest": {
                "examples": [
                    {
                        "customer_ref": "cus_A1B2",
                        "email": "buyer@example.com",
                        "name": "Starter pack",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        }
                    }
                ],
                "type": "object",
                "properties": {
                    "customer_ref": {
                        "type": "string",
                        "description": "optional: 1 to 255 characters, no control character; absent, the customer has none; 409 customer_exists when the merchant already has it"
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "a valid address of at most 254 characters; stored lowercased"
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "1 to 200 characters"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "an object of at most 4 KB"
                    }
                }
            },
            "CheckoutCustomerResource": {
                "examples": [
                    {
                        "id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "customer_ref": "cus_A1B2",
                        "email": "buyer@example.com",
                        "name": "Starter pack",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        },
                        "created_at": "2026-10-21T14:05:00.000Z",
                        "updated_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "description": "one customer of the merchant, one per customer_ref; sessions and orders store the customer_ref, never this id",
                "required": [
                    "id",
                    "customer_ref",
                    "email",
                    "name",
                    "metadata",
                    "created_at",
                    "updated_at"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "the cus_ public id"
                    },
                    "customer_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's customer reference, unique per merchant and immutable; null for a customer created from a buyer's email at Pay"
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "CheckoutCustomerUpdateRequest": {
                "examples": [
                    {
                        "email": "buyer@example.com",
                        "name": "Starter pack",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        }
                    }
                ],
                "type": "object",
                "description": "only the fields sent are changed; customer_ref is refused 422 customer_ref_immutable",
                "properties": {
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "a valid address of at most 254 characters; stored lowercased"
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "1 to 200 characters"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "an object of at most 4 KB"
                    }
                }
            },
            "CheckoutFulfilRequest": {
                "examples": [
                    {
                        "evidence": {
                            "type": "card",
                            "url": "https://shop.example.com/webhooks",
                            "note": "text"
                        }
                    }
                ],
                "type": "object",
                "properties": {
                    "evidence": {
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "string"
                            },
                            "url": {
                                "type": "string"
                            },
                            "note": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "CheckoutLine": {
                "description": "A session line names a catalogue price by price_id or carries an inline price_data; exactly one of the two",
                "oneOf": [
                    {
                        "$ref": "#/components/schemas/CheckoutPriceLine"
                    },
                    {
                        "$ref": "#/components/schemas/CheckoutPriceDataLine"
                    }
                ]
            },
            "CheckoutOrder": {
                "examples": [
                    {
                        "id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "order_number": "7KQ4-X2M9P",
                        "statement_id": null,
                        "paid_out_at": null,
                        "store": {
                            "id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "name": "Starter pack",
                            "display_name": "Acme Goods LLC",
                            "logo_url": "https://cdn.example.com/logo.png"
                        },
                        "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "period_id": "per_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "buyer_email": "buyer@example.com",
                        "buyer_name": "Jamie Rivera",
                        "billing_address": {
                            "line1": "1 Main St",
                            "line2": "Suite 200",
                            "city": "Austin",
                            "state": "TX",
                            "postal_code": "73301",
                            "country": "US"
                        },
                        "customer_ref": "cus_A1B2",
                        "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "reference": "INV-1001",
                        "status": "paid",
                        "subtotal_cents": 2900,
                        "tax_cents": 239,
                        "total_cents": 3139,
                        "currency": "USD",
                        "refunded_cents": 0,
                        "tax_fallback": false,
                        "tax_rate_source": "provider",
                        "tax_rate_source_version": "anrok:v1",
                        "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "card": {
                            "brand": "visa",
                            "last4": "4242",
                            "payment_method_public_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                        },
                        "captured_at": "2026-10-21T14:05:00.000Z",
                        "available_at": "2026-10-21T14:05:00.000Z",
                        "fee_cents": 145,
                        "fee_breakdown": [
                            {
                                "kind": "base",
                                "name": "Starter pack",
                                "pct_bps": 290,
                                "cents": 84
                            }
                        ],
                        "reserve_cents": 0,
                        "reserve_release_at": "2026-10-21T14:05:00.000Z",
                        "lines": [
                            {
                                "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "price_version": 1,
                                "product_id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "name": "Starter pack",
                                "quantity": 1,
                                "unit_price_cents": 2900,
                                "tax_cents": 239
                            }
                        ],
                        "acceptances": [
                            {
                                "id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "consent_type": "card",
                                "policy_versions": {
                                    "key": "value"
                                },
                                "accepted_at": "2026-10-21T14:05:00.000Z"
                            }
                        ],
                        "fulfilment_due_at": "2026-10-21T14:05:00.000Z",
                        "fulfilled_at": "2026-10-21T14:05:00.000Z",
                        "fulfilment_evidence": {
                            "key": "value"
                        },
                        "access_revoked_at": "2026-10-21T14:05:00.000Z",
                        "access_revoked_reason": "text",
                        "source": "hosted",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        },
                        "version": 1,
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "merchant_id",
                    "buyer_email",
                    "billing_address",
                    "status",
                    "subtotal_cents",
                    "tax_cents",
                    "total_cents",
                    "currency",
                    "charge_id",
                    "captured_at",
                    "lines",
                    "source",
                    "version"
                ],
                "properties": {
                    "order_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The short number a buyer reads out for the order (for example 7KQ4-X2M9P), unique within your account and printed on the receipt and in the emails; null on older orders that have none"
                    },
                    "price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[A-Z]{3}$",
                        "description": "The currency the merchant set the price in; equal to currency unless the buyer pays in another one"
                    },
                    "price_amount_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The amount in the price currency, in its smallest unit"
                    },
                    "fx_bearer": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "merchant",
                            "platform",
                            null
                        ],
                        "description": "Who bears the exchange difference if the processor settles this sale in another currency than it was charged in. merchant: the merchant receives what the processor paid; platform: the amount promised at the sale"
                    },
                    "settled_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The currency the processor settled the sale in, when it is not the charged one; null while pending settlement or when settled in the charged currency"
                    },
                    "settled_gross_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "what the processor paid for the sale, in the smallest unit of settled_currency"
                    },
                    "settled_net_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "the merchant's share of it: what became available, in the smallest unit of settled_currency"
                    },
                    "rate_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The exchange rate the price was converted with (public id fxr_); null when the currencies are equal or a linked price in the buyer's currency was used (a fixed amount)"
                    },
                    "statement_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The statement that pays it (Ledger's stm_), null until one lists it"
                    },
                    "paid_out_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When that statement's payout was sent; null until then or after the bank returned it"
                    },
                    "id": {
                        "type": "string"
                    },
                    "store": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The store the row names (id, name, display_name, logo_url); null when it names none",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "display_name": {
                                "type": "string"
                            },
                            "logo_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "store_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The store the row belongs to (public id sto_); null for a row made before the backfill"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "session_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "subscription_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "period_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "buyer_email": {
                        "type": "string"
                    },
                    "buyer_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "billing_address": {
                        "$ref": "#/components/schemas/Address"
                    },
                    "customer_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's customer reference copied from the order's session; null when the session held none"
                    },
                    "customer_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the order's customer, its cus_ id, copied from the order's session; null when the session had no customer"
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's own order reference copied from the order's session; not unique; null when none was sent"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "paid",
                            "fulfilled",
                            "refunded",
                            "partially_refunded",
                            "access_revoked"
                        ]
                    },
                    "subtotal_cents": {
                        "type": "integer"
                    },
                    "tax_cents": {
                        "type": "integer"
                    },
                    "total_cents": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "refunded_cents": {
                        "type": "integer"
                    },
                    "tax_fallback": {
                        "type": "boolean"
                    },
                    "tax_rate_source": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "x-enum-name": "TaxQuoteSource",
                        "enum": [
                            "provider",
                            "learned",
                            "seed_zip4",
                            "seed_zip",
                            null
                        ],
                        "description": "Which source taxed the order: the tax provider, its stored answer for the ZIP, the seed by ZIP+4 or by ZIP; null on an order from before provenance was recorded"
                    },
                    "tax_rate_source_version": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the provider and API version (anrok:v1), the provider of a stored answer, or the seed release (v0.59.0)"
                    },
                    "charge_id": {
                        "type": "string"
                    },
                    "card": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "brand": {
                                "type": "string"
                            },
                            "last4": {
                                "type": "string"
                            },
                            "payment_method_public_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "captured_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "available_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale's money was queued for payout (Ledger posted its gross settlement); null while the processor has not settled it"
                    },
                    "fee_cents": {
                        "type": "integer",
                        "description": "The platform's fee on the sale, priced at capture from the merchant's fee card in force on the gross including tax"
                    },
                    "fee_breakdown": {
                        "type": "array",
                        "description": "The fee card rules that made the fee, base first then add-ons; never the cost card",
                        "items": {
                            "type": "object",
                            "properties": {
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "base",
                                        "addon"
                                    ]
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "pct_bps": {
                                    "type": "integer"
                                },
                                "cents": {
                                    "type": "integer"
                                }
                            },
                            "required": [
                                "kind",
                                "name",
                                "pct_bps",
                                "cents"
                            ]
                        }
                    },
                    "reserve_cents": {
                        "type": "integer",
                        "description": "The rolling reserve held from the sale (0 when none)"
                    },
                    "reserve_release_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the reserve falls due for release; null without a reserve"
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/CheckoutOrderLine"
                        }
                    },
                    "acceptances": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "consent_type": {
                                    "type": "string"
                                },
                                "policy_versions": {
                                    "type": "object"
                                },
                                "accepted_at": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    },
                    "fulfilment_due_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "fulfilled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "fulfilment_evidence": {
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "access_revoked_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "access_revoked_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "source": {
                        "type": "string",
                        "enum": [
                            "hosted",
                            "server",
                            "renewal",
                            "console"
                        ]
                    },
                    "metadata": {
                        "type": "object"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "CheckoutOrderLine": {
                "type": "object",
                "properties": {
                    "price_id": {
                        "type": "string"
                    },
                    "price_version": {
                        "type": "integer"
                    },
                    "product_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "unit_price_cents": {
                        "type": "integer"
                    },
                    "tax_cents": {
                        "type": "integer"
                    }
                }
            },
            "CheckoutPortalSession": {
                "examples": [
                    {
                        "url": "https://pay.example.com/portal/mer_01J9ZZZZZZZZZZZZZZZZZZZZZZ?c=cus_A1B2&t=ten_01J9ZZZZZZZZZZZZZZZZZZZZZZ&exp=1792591500&sig=9f2c#g=Zx3k",
                        "expires_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "url",
                    "expires_at"
                ],
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "https://{pay host}/portal/{merchant_id}?c (or cid)&t&exp&sig#g=<grant token>: 10 minutes, single use, signs in with no email and no code"
                    },
                    "expires_at": {
                        "$ref": "#/components/schemas/Timestamp"
                    }
                }
            },
            "CheckoutPortalSessionRequest": {
                "examples": [
                    {
                        "customer_ref": "cus_A1B2",
                        "email": "buyer@example.com"
                    },
                    {
                        "customer_id": "cus_01J9ZZZZZZZZZZZZZZZZZZZZZZ",
                        "flow": "update_card",
                        "subscription_id": "sub_01J9ZZZZZZZZZZZZZZZZZZZZZZ"
                    }
                ],
                "type": "object",
                "description": "names the customer by customer_id or customer_ref, one of the two; both is 422 validation on customer_id",
                "properties": {
                    "customer_ref": {
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "string",
                        "description": "the customer's cus_ id, in place of customer_ref"
                    },
                    "flow": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "update_card",
                            "cancel",
                            null
                        ],
                        "description": "opens that portal flow on subscription_id, which it needs; without it the link opens the portal home"
                    },
                    "subscription_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "a sub_ id of this customer: the portal opens on it; another customer's is 422 validation on subscription"
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "fills the customer email only when none is on file"
                    }
                }
            },
            "CheckoutPriceData": {
                "type": "object",
                "description": "An inline price created with the session as one is_custom price: hidden from every catalogue list, never referenced by price_id in a later session (422 price_unavailable) and never a change-plan target. Names its product by exactly one of product, product_sku or product_data; product_data still creates a hidden product. Needs the catalogue write permission. Checkout sessions only: POST /v1/orders refuses it.",
                "required": [
                    "amount_cents",
                    "currency"
                ],
                "oneOf": [
                    {
                        "required": [
                            "product"
                        ]
                    },
                    {
                        "required": [
                            "product_sku"
                        ]
                    },
                    {
                        "required": [
                            "product_data"
                        ]
                    }
                ],
                "properties": {
                    "amounts": {
                        "type": "array",
                        "description": "The same price in other currencies, each a fixed amount the buyer of that currency pays instead of a converted one (one per currency, none in the price's own)",
                        "items": {
                            "type": "object",
                            "required": [
                                "currency",
                                "amount_cents"
                            ],
                            "properties": {
                                "currency": {
                                    "type": "string",
                                    "pattern": "^[A-Z]{3}$"
                                },
                                "amount_cents": {
                                    "type": "integer",
                                    "minimum": 1
                                }
                            }
                        }
                    },
                    "product": {
                        "type": "string",
                        "description": "an active product of the merchant (public id prd_)"
                    },
                    "product_sku": {
                        "type": "string",
                        "description": "the sku of a product in the session's store (422 unknown_product_sku)"
                    },
                    "product_data": {
                        "type": "object",
                        "description": "a new hidden product for this price",
                        "required": [
                            "name"
                        ],
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string",
                                "description": "optional; stored on the hidden product and shown under the line name on the hosted page"
                            },
                            "tax_code": {
                                "type": "string"
                            }
                        }
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "Any currency the merchant may price in (422 currency_not_supported otherwise)"
                    },
                    "tax_inclusive": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "the amount includes sales tax; omitted or null = the merchant's default"
                    },
                    "recurring": {
                        "type": "object",
                        "description": "present for a recurring price (the session mode becomes plan): interval week, month or year, interval_count 1 to 52, trial_interval and trial_interval_count, trial_price_cents, as the catalogue RecurringRequest (422 invalid_recurring, invalid_interval, invalid_interval_count, invalid_trial_interval, invalid_trial_interval_count, invalid_trial_price)",
                        "required": [
                            "interval"
                        ],
                        "properties": {
                            "interval": {
                                "type": "string",
                                "enum": [
                                    "week",
                                    "month",
                                    "year"
                                ]
                            },
                            "interval_count": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 52
                            },
                            "trial_interval": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "day",
                                    "week",
                                    "month",
                                    "year",
                                    null
                                ]
                            },
                            "trial_interval_count": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "trial_price_cents": {
                                "type": "integer",
                                "minimum": 0
                            }
                        }
                    }
                }
            },
            "CheckoutPriceDataLine": {
                "type": "object",
                "required": [
                    "price_data"
                ],
                "properties": {
                    "price_data": {
                        "$ref": "#/components/schemas/CheckoutPriceData"
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "default 1; a recurring price line keeps quantity 1 (422 invalid_plan_quantity)"
                    }
                }
            },
            "CheckoutPriceLine": {
                "type": "object",
                "required": [
                    "price_id"
                ],
                "properties": {
                    "price_id": {
                        "type": "string",
                        "description": "an active, non-inline price of the merchant (422 price_unavailable otherwise)"
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "default 1; a recurring price line keeps quantity 1 (422 invalid_plan_quantity)"
                    }
                }
            },
            "CheckoutPricePreview": {
                "examples": [
                    {
                        "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "price_currency": "USD",
                        "price_amount_cents": 1960,
                        "currency": "EUR",
                        "amount_cents": 1803,
                        "mode": "converted",
                        "rate_id": "fxr_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "options": [
                            "EUR",
                            "USD"
                        ]
                    }
                ],
                "type": "object",
                "description": "A price as a buyer of a country would see it at checkout",
                "properties": {
                    "price_id": {
                        "type": "string"
                    },
                    "price_currency": {
                        "type": "string"
                    },
                    "price_amount_cents": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string",
                        "description": "the currency the checkout would open in"
                    },
                    "amount_cents": {
                        "type": "integer",
                        "description": "the unit amount in that currency, in its smallest unit, before tax"
                    },
                    "mode": {
                        "type": "string",
                        "enum": [
                            "same",
                            "fixed",
                            "converted"
                        ],
                        "description": "same: the price's own currency; fixed: the amount the business set in that currency; converted: the price converted with the rate in force"
                    },
                    "rate_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the rate used when converted (fxr_)"
                    },
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "the currencies the buyer could switch between at checkout"
                    }
                },
                "required": [
                    "price_id",
                    "price_currency",
                    "price_amount_cents",
                    "currency",
                    "amount_cents",
                    "mode",
                    "rate_id",
                    "options"
                ]
            },
            "CheckoutReceipt": {
                "examples": [
                    {
                        "order": {
                            "id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "store": {
                                "id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "name": "Starter pack",
                                "display_name": "Acme Goods LLC",
                                "logo_url": "https://cdn.example.com/logo.png"
                            },
                            "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "period_id": "per_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.com",
                            "buyer_name": "Jamie Rivera",
                            "billing_address": {
                                "line1": "1 Main St",
                                "line2": "Suite 200",
                                "city": "Austin",
                                "state": "TX",
                                "postal_code": "73301",
                                "country": "US"
                            },
                            "customer_ref": "cus_A1B2",
                            "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "reference": "INV-1001",
                            "status": "paid",
                            "subtotal_cents": 2900,
                            "tax_cents": 239,
                            "total_cents": 3139,
                            "currency": "USD",
                            "refunded_cents": 0,
                            "tax_fallback": false,
                            "tax_rate_source": "provider",
                            "tax_rate_source_version": "anrok:v1",
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "card": {
                                "brand": "visa",
                                "last4": "4242",
                                "payment_method_public_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                            },
                            "captured_at": "2026-10-21T14:05:00.000Z",
                            "available_at": "2026-10-21T14:05:00.000Z",
                            "fee_cents": 145,
                            "fee_breakdown": [
                                {
                                    "kind": "base",
                                    "name": "Starter pack",
                                    "pct_bps": 290,
                                    "cents": 84
                                }
                            ],
                            "reserve_cents": 0,
                            "reserve_release_at": "2026-10-21T14:05:00.000Z",
                            "lines": [
                                {
                                    "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                    "price_version": 1,
                                    "product_id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                    "name": "Starter pack",
                                    "quantity": 1,
                                    "unit_price_cents": 2900,
                                    "tax_cents": 239
                                }
                            ],
                            "acceptances": [
                                {
                                    "id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                    "consent_type": "card",
                                    "policy_versions": {
                                        "key": "value"
                                    },
                                    "accepted_at": "2026-10-21T14:05:00.000Z"
                                }
                            ],
                            "fulfilment_due_at": "2026-10-21T14:05:00.000Z",
                            "fulfilled_at": "2026-10-21T14:05:00.000Z",
                            "fulfilment_evidence": {
                                "key": "value"
                            },
                            "access_revoked_at": "2026-10-21T14:05:00.000Z",
                            "access_revoked_reason": "text",
                            "source": "hosted",
                            "metadata": {
                                "crm_ref": "CRM-1001"
                            },
                            "version": 1,
                            "created_at": "2026-10-21T14:05:00.000Z"
                        },
                        "tenant": {
                            "key": "value"
                        },
                        "merchant": {
                            "key": "value"
                        },
                        "store": {
                            "id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "display_name": "Acme Goods LLC",
                            "logo_url": "https://cdn.example.com/logo.png",
                            "site_url": "https://shop.example.com/webhooks",
                            "support_email": "buyer@example.com",
                            "descriptor": "text",
                            "brand": {
                                "primary": "text",
                                "radius": "sharp"
                            }
                        },
                        "statement_descriptor": "active",
                        "receipt_url": "https://shop.example.com/webhooks",
                        "receipt_pdf_url": "https://pay.example.com/api/public/receipts/ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C/pdf?t=ten_01HZX5Y3V8N2K7QJ4R9T6B3M1C&m=mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C&exp=1793000000&sig=3f2a"
                    }
                ],
                "type": "object",
                "properties": {
                    "order": {
                        "$ref": "#/components/schemas/CheckoutOrder"
                    },
                    "tenant": {
                        "type": "object"
                    },
                    "merchant": {
                        "type": "object"
                    },
                    "store": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The store the session names: display name, logo, brand (primary, radius), descriptor, support email; the page falls back to the tenant brand and the merchant name. null for a session of a merchant made before the backfill",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "display_name": {
                                "type": "string"
                            },
                            "logo_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "site_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "support_email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "descriptor": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "brand": {
                                "type": "object",
                                "properties": {
                                    "primary": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "radius": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "sharp",
                                            "default",
                                            "round",
                                            null
                                        ]
                                    }
                                },
                                "required": [
                                    "primary",
                                    "radius"
                                ]
                            }
                        },
                        "required": [
                            "id",
                            "display_name",
                            "logo_url",
                            "site_url",
                            "support_email",
                            "descriptor",
                            "brand"
                        ]
                    },
                    "statement_descriptor": {
                        "type": "string",
                        "description": "The store's descriptor when it has one, else the tenant prefix plus the store's display name"
                    },
                    "timezone": {
                        "type": "string",
                        "description": "The merchant's zone (IANA); the receipt's dates are shown in it and the page names it"
                    },
                    "receipt_url": {
                        "type": "string"
                    },
                    "receipt_pdf_url": {
                        "type": "string",
                        "format": "uri",
                        "description": "The receipt as a PDF download, the pay host's /api/public/receipts/{order}/pdf; on the public receipt it carries the opened link's t, m, exp and sig, on a reissue receipt_url's"
                    },
                    "portal_url": {
                        "type": "string",
                        "description": "The public receipt only: the customer's signed portal link (the one the receipt email carries); '' for an order with no customer_ref or a customer without an email"
                    }
                }
            },
            "CheckoutServerSideOrderRequest": {
                "examples": [
                    {
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "lines": [
                            {
                                "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "quantity": 1
                            }
                        ],
                        "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "buyer_email": "buyer@example.com",
                        "customer_ref": "cus_A1B2",
                        "reference": "INV-1001",
                        "billing_address": {
                            "line1": "1 Main St",
                            "line2": "Suite 200",
                            "city": "Austin",
                            "state": "TX",
                            "postal_code": "73301",
                            "country": "US"
                        },
                        "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "period_id": "per_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_initiated": false,
                        "agreement": "recurring",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        }
                    }
                ],
                "type": "object",
                "required": [
                    "lines",
                    "payment_method_id"
                ],
                "properties": {
                    "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "Forces the checkout currency (the buyer gets no switch). Absent, the currency follows the buyer's country within the merchant's checkout map. 422 currency_not_supported, currency_not_chargeable, session_mixed_currency, currency_not_accepted"
                    },
                    "merchant_id": {
                        "type": "string",
                        "description": "required on /internal/orders"
                    },
                    "lines": {
                        "type": "array",
                        "description": "price_id lines only: price_data is refused",
                        "items": {
                            "$ref": "#/components/schemas/CheckoutPriceLine"
                        }
                    },
                    "payment_method_id": {
                        "type": "string"
                    },
                    "buyer_id": {
                        "type": "string",
                        "deprecated": true,
                        "description": "Still read; name the buyer by customer_id or customer_ref instead."
                    },
                    "buyer_email": {
                        "type": "string"
                    },
                    "customer_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "the merchant's customer reference, 1 to 255 characters, no control character, case-sensitive; the order carries it, or null when absent. /v1/orders names its customer by customer_ref or customer_id, one of the two (422 customer_ref_required on customer_id when neither), and the saved card must be that customer's (422 payment_method_unusable)"
                    },
                    "customer_id": {
                        "type": "string",
                        "description": "/v1/orders, in place of customer_ref: the cus_ id of one of your customers; the order, its charge and order.paid carry it. Sending both, or an id that is not one of your customers, answers 422 validation on customer_id"
                    },
                    "reference": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "the merchant's own order reference: 1 to 255 characters, no control character, not unique (422 validation)"
                    },
                    "billing_address": {
                        "$ref": "#/components/schemas/Address"
                    },
                    "subscription_id": {
                        "type": "string"
                    },
                    "period_id": {
                        "type": "string"
                    },
                    "merchant_initiated": {
                        "type": "boolean",
                        "default": false,
                        "description": "/v1/orders: the merchant charges the buyer's saved card on its own schedule; the platform picks the card-network intent from the card"
                    },
                    "agreement": {
                        "type": "string",
                        "enum": [
                            "recurring",
                            "unscheduled"
                        ],
                        "description": "/v1/orders with merchant_initiated true: the agreement to charge under; required when the card holds both, else 422 agreement_required"
                    },
                    "metadata": {
                        "type": "object"
                    }
                }
            },
            "CheckoutSession": {
                "examples": [
                    {
                        "id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "mode": "one_off",
                        "state": "open",
                        "lines": [
                            {
                                "key": "value"
                            }
                        ],
                        "buyer_email": "buyer@example.com",
                        "customer_ref": "cus_A1B2",
                        "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "reference": "INV-1001",
                        "attempt": 1,
                        "last_decline_category": "text",
                        "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "subscription_id": null,
                        "success_url": "https://shop.example.com/thanks",
                        "cancel_url": "https://shop.example.com/cart",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        },
                        "url": "https://shop.example.com/webhooks",
                        "expires_at": "2026-10-21T14:05:00.000Z",
                        "completed_at": "2026-10-21T14:05:00.000Z",
                        "version": 1,
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "merchant_id",
                    "mode",
                    "state",
                    "lines",
                    "attempt",
                    "expires_at",
                    "version"
                ],
                "properties": {
                    "currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[A-Z]{3}$",
                        "description": "The checkout currency of the session: what the buyer sees and pays in"
                    },
                    "price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[A-Z]{3}$",
                        "description": "The currency the merchant set the price in; equal to currency unless the buyer pays in another one"
                    },
                    "price_amount_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The amount in the price currency, in its smallest unit"
                    },
                    "fx_bearer": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "merchant",
                            "platform",
                            null
                        ],
                        "description": "Who bears the exchange difference if the processor settles this sale in another currency than it was charged in. merchant: the merchant receives what the processor paid; platform: the amount promised at the sale"
                    },
                    "settled_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The currency the processor settled the sale in, when it is not the charged one; null while pending settlement or when settled in the charged currency"
                    },
                    "settled_gross_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "what the processor paid for the sale, in the smallest unit of settled_currency"
                    },
                    "settled_net_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "the merchant's share of it: what became available, in the smallest unit of settled_currency"
                    },
                    "rate_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The exchange rate the price was converted with (public id fxr_); null when the currencies are equal or a linked price in the buyer's currency was used (a fixed amount)"
                    },
                    "id": {
                        "type": "string"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "mode": {
                        "type": "string",
                        "enum": [
                            "one_off",
                            "plan",
                            "plan_change",
                            "setup",
                            "resume"
                        ]
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "open",
                            "quoted",
                            "paying",
                            "pending",
                            "in_review",
                            "paid",
                            "declined",
                            "expired",
                            "cancelled",
                            "refused",
                            "saved"
                        ]
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "buyer_email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "customer_ref": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "customer_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the session's customer, its cus_ id; null when the session has no customer"
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's own order reference; null when the session was created without one"
                    },
                    "attempt": {
                        "type": "integer"
                    },
                    "last_decline_category": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "order_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "subscription_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the subscription a paid plan session starts, its sub_ id, reserved at Pay; null until the session is paid and on a session with no plan line. a GET of that subscription answers 404 until the subscription is created"
                    },
                    "success_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "cancel_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": "object"
                    },
                    "url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "https://<pay host>/s/<id>#<buyer token>; only on creation"
                    },
                    "expires_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "completed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "CheckoutSessionRequest": {
                "examples": [
                    {
                        "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "mode": "setup",
                        "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "buyer_email": "buyer@example.com",
                        "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "buyer_name": "Jamie Rivera",
                        "customer_ref": "cus_A1B2",
                        "reference": "INV-1001",
                        "billing_address": {
                            "line1": "1 Main St",
                            "line2": "Suite 200",
                            "city": "Austin",
                            "state": "TX",
                            "postal_code": "73301",
                            "country": "US"
                        },
                        "save_payment_method": false,
                        "success_url": "https://shop.example.com/thanks",
                        "cancel_url": "https://shop.example.com/cart",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        }
                    }
                ],
                "type": "object",
                "properties": {
                    "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "Forces the checkout currency (the buyer gets no switch). Absent, the currency follows the buyer's country within the merchant's checkout map. 422 currency_not_supported, currency_not_chargeable, session_mixed_currency, currency_not_accepted"
                    },
                    "store_id": {
                        "type": "string",
                        "description": "The store the session belongs to (dashboard callers); an API key names its store itself. 404 store_not_found, 409 store_archived"
                    },
                    "mode": {
                        "type": "string",
                        "enum": [
                            "setup"
                        ],
                        "description": "setup asks for a card-only session: no lines (422 setup_lines_forbidden), the card always saved for recurring merchant charges, and its Pay requires the stored_credential consent (422 stored_credential_consent_required); card_usage is not read on any mode; absent, the mode is derived from the lines (one_off or plan)"
                    },
                    "lines": {
                        "type": "array",
                        "description": "required unless mode is setup (422 lines_required)",
                        "items": {
                            "$ref": "#/components/schemas/CheckoutLine"
                        }
                    },
                    "subscription_id": {
                        "type": "string",
                        "description": "setup mode only, optional: the one subscription of this customer the saved card replaces"
                    },
                    "buyer_email": {
                        "type": "string"
                    },
                    "buyer_id": {
                        "type": "string",
                        "deprecated": true,
                        "description": "Still read; name the buyer by customer_id or customer_ref instead."
                    },
                    "buyer_name": {
                        "type": "string"
                    },
                    "customer_ref": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "optional: the merchant's customer reference, 1 to 255 characters, no control character, case-sensitive. Absent, the customer is the one holding the buyer's email at Pay, created then if none does; a customer already holding the buyer's email owns the session, and takes this reference when it has none. A setup session names its customer by customer_ref or customer_id (422 customer_ref_required when neither)"
                    },
                    "customer_id": {
                        "type": "string",
                        "description": "optional, in place of customer_ref: the cus_ id of one of your customers, who owns the session whatever email the buyer types. Sending both, or an id that is not one of your customers, answers 422 validation on customer_id"
                    },
                    "reference": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "the merchant's own order reference, copied onto the order: 1 to 255 characters, no control character, not unique (422 validation)"
                    },
                    "billing_address": {
                        "$ref": "#/components/schemas/Address"
                    },
                    "save_payment_method": {
                        "type": "boolean"
                    },
                    "success_url": {
                        "type": "string"
                    },
                    "cancel_url": {
                        "type": "string"
                    },
                    "metadata": {
                        "type": "object"
                    }
                }
            },
            "CheckoutSubscriptionRetry": {
                "type": "object",
                "description": "saved only, present only when the saved card moved a tenant-managed past_due subscription: the retry of its declined period on the new card, run once the save committed and stored on the session, so a replay or a reload answers the same. paid and confirming are final: a further complete answers the stored outcome and charges nothing. declined offers Try another card: the next complete on the same session (Idempotency-Key <session>:<attempt + 1>) checks another card and retries again, up to checkout.max_attempts card checks per session, then 409 too_many_attempts. A buyer retry consumes no dunning attempt: a decline leaves the period's attempts, next attempt and grace as they were, and a hard decline never cancels the subscription",
                "required": [
                    "outcome",
                    "amount_cents",
                    "currency",
                    "decline_category"
                ],
                "properties": {
                    "outcome": {
                        "type": "string",
                        "enum": [
                            "paid",
                            "declined",
                            "confirming"
                        ],
                        "description": "confirming: the processor timed out or answered an unknown outcome; the scheduled collection settles the period under the same attempt key"
                    },
                    "amount_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "paid: the amount collected, tax included; null on declined and confirming, which store no tax-inclusive attempted amount (the period amount excludes tax, so it would understate the charge the bank declined)"
                    },
                    "currency": {
                        "type": "string",
                        "description": "ISO code, USD"
                    },
                    "decline_category": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "on declined, the decline category of the period; else null"
                    }
                },
                "examples": [
                    {
                        "outcome": "paid",
                        "amount_cents": 1999,
                        "currency": "USD",
                        "decline_category": null
                    }
                ]
            },
            "DeliveryWebhookDelivery": {
                "examples": [
                    {
                        "id": "wdl_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "endpoint_id": "whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "event_id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "event_type": "order.paid",
                        "status": "pending",
                        "attempts": 1,
                        "http_status": 1,
                        "response_excerpt": "OK",
                        "next_attempt_at": "2026-10-21T14:05:00.000Z",
                        "last_attempted_at": "2026-10-21T14:05:00.000Z",
                        "delivered_at": "2026-10-21T14:05:00.000Z",
                        "replay": false,
                        "payload": {
                            "key": "value"
                        },
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "event_id",
                    "event_type",
                    "status",
                    "attempts",
                    "replay",
                    "payload"
                ],
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "endpoint_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "event_id": {
                        "type": "string"
                    },
                    "event_type": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "sending",
                            "succeeded",
                            "failed",
                            "dead"
                        ]
                    },
                    "attempts": {
                        "type": "integer"
                    },
                    "http_status": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "response_excerpt": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "next_attempt_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_attempted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "delivered_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "replay": {
                        "type": "boolean"
                    },
                    "payload": {
                        "type": "object",
                        "description": "the event envelope sent: id, type, version, occurred_at, merchant_id, data"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "DeliveryWebhookEndpoint": {
                "examples": [
                    {
                        "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "store": {
                            "id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "name": "Starter pack",
                            "display_name": "Acme Goods LLC",
                            "logo_url": "https://cdn.example.com/logo.png"
                        },
                        "id": "whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "url": "https://shop.example.com/webhooks",
                        "description": "One-line description.",
                        "events": [
                            "order.paid",
                            "refund.issued"
                        ],
                        "secret_last4": "b1a0",
                        "disabled": false,
                        "disabled_at": null,
                        "disabled_reason": null,
                        "consecutive_failures": 0,
                        "failing_since": null,
                        "last_http_status": 200,
                        "last_excerpt": null,
                        "version": 1,
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "merchant_id",
                    "url",
                    "events",
                    "secret_last4",
                    "disabled",
                    "consecutive_failures",
                    "version"
                ],
                "properties": {
                    "store_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The store whose events the endpoint receives; null = every store of the merchant"
                    },
                    "store": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The store the row names (id, name, display_name, logo_url); null when it names none",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "display_name": {
                                "type": "string"
                            },
                            "logo_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "id": {
                        "type": "string"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "secret_last4": {
                        "type": "string"
                    },
                    "disabled": {
                        "type": "boolean"
                    },
                    "disabled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "disabled_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "consecutive_failures": {
                        "type": "integer"
                    },
                    "failing_since": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the current run of failed deliveries began; null while the endpoint delivers"
                    },
                    "last_http_status": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "the status of the last attempt, null when it got no response"
                    },
                    "last_excerpt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the start of the last failed response body"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "DeliveryWebhookEndpointRequest": {
                "examples": [
                    {
                        "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "url": "https://shop.example.com/webhooks",
                        "events": [
                            "order.paid",
                            "refund.issued"
                        ],
                        "description": "One-line description.",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                    }
                ],
                "type": "object",
                "properties": {
                    "store_id": {
                        "type": "string",
                        "description": "The store the endpoint belongs to; default = the key's store or the merchant's default store"
                    },
                    "url": {
                        "type": "string",
                        "description": "https only, public host"
                    },
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "order.paid",
                                "order.access_revoked",
                                "refund.issued",
                                "dispute.opened",
                                "dispute.closed",
                                "subscription.started",
                                "subscription.renewed",
                                "subscription.past_due",
                                "subscription.paused",
                                "subscription.cancelled",
                                "subscription.plan_change_scheduled",
                                "subscription.plan_changed",
                                "payout.sent",
                                "checkout.abandoned",
                                "order.in_review",
                                "order.review_closed",
                                "charge.declined",
                                "payment_method.created",
                                "payment_method.updated",
                                "subscription.payment_method_changed",
                                "checkout.completed",
                                "subscription.resumed",
                                "subscription.trial_ending",
                                "subscription.updated",
                                "subscription.pause_scheduled",
                                "subscription.pause_cancelled"
                            ]
                        }
                    },
                    "description": {
                        "type": "string"
                    },
                    "merchant_id": {
                        "type": "string",
                        "description": "staff only"
                    }
                }
            },
            "DeliveryWebhookEndpointWithSecret": {
                "examples": [
                    {
                        "id": "whk_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "store_id": null,
                        "store": null,
                        "url": "https://shop.example.com/webhooks",
                        "description": "Production server",
                        "events": [
                            "order.paid",
                            "refund.issued"
                        ],
                        "secret": "whsec_9f8e7d6c5b4a39281706f5e4d3c2b1a0",
                        "secret_last4": "b1a0",
                        "disabled": false,
                        "disabled_at": null,
                        "disabled_reason": null,
                        "consecutive_failures": 0,
                        "version": 1,
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "allOf": [
                    {
                        "$ref": "#/components/schemas/DeliveryWebhookEndpoint"
                    },
                    {
                        "type": "object",
                        "required": [
                            "secret"
                        ],
                        "properties": {
                            "secret": {
                                "type": "string",
                                "description": "shown once"
                            }
                        }
                    }
                ]
            },
            "DeliveryWebhookReplayRange": {
                "examples": [
                    {
                        "from": "2026-10-21T00:00:00.000Z",
                        "to": "2026-10-22T00:00:00.000Z",
                        "event_types": [
                            "order.paid"
                        ]
                    }
                ],
                "type": "object",
                "required": [
                    "from",
                    "to"
                ],
                "properties": {
                    "from": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "to": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "event_types": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "only these event types; omitted = every type"
                    }
                }
            },
            "DeliveryWebhookReplayResult": {
                "examples": [
                    {
                        "queued": 42,
                        "truncated": false
                    }
                ],
                "type": "object",
                "required": [
                    "queued",
                    "truncated"
                ],
                "properties": {
                    "queued": {
                        "type": "integer"
                    },
                    "truncated": {
                        "type": "boolean",
                        "description": "true when more than 10,000 deliveries matched; call again with a later from"
                    }
                }
            },
            "Error": {
                "type": "object",
                "required": [
                    "errors"
                ],
                "properties": {
                    "errors": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ErrorItem"
                        }
                    }
                },
                "examples": [
                    {
                        "errors": [
                            {
                                "key": "not_found",
                                "message": "Not found."
                            }
                        ]
                    },
                    {
                        "errors": [
                            {
                                "key": "validation",
                                "field": "lines.0.quantity",
                                "message": "The quantity must be at least 1."
                            }
                        ]
                    }
                ]
            },
            "ErrorItem": {
                "type": "object",
                "required": [
                    "key",
                    "message"
                ],
                "properties": {
                    "key": {
                        "type": "string",
                        "description": "Stable machine key (validation, not_found, permission_denied, version_conflict, …)"
                    },
                    "message": {
                        "type": "string"
                    },
                    "field": {
                        "type": "string",
                        "description": "The request field at fault, for 422"
                    },
                    "permission": {
                        "type": "string",
                        "description": "The permission a 403 permission_denied wanted"
                    },
                    "scope": {
                        "type": "string",
                        "description": "The API key scope a 403 insufficient_scope wanted"
                    },
                    "retry_after": {
                        "type": "integer",
                        "description": "Seconds, for 425/429/503"
                    },
                    "correlation_id": {
                        "type": "string"
                    }
                },
                "additionalProperties": true
            },
            "EventChargeDeclined": {
                "type": "object",
                "description": "A card charge was declined. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "charge.declined"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "charge_id",
                            "merchant_id",
                            "amount_cents",
                            "currency",
                            "cof_intent",
                            "decline_code",
                            "decline_category",
                            "idempotency_key"
                        ],
                        "properties": {
                            "charge_id": {
                                "type": "string",
                                "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "subscription_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "amount_cents": {
                                "type": "integer"
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                            },
                            "nmi_txn_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "provider_txn_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "cof_intent": {
                                "type": "string"
                            },
                            "card": {
                                "type": "object",
                                "properties": {
                                    "brand": {
                                        "type": "string"
                                    },
                                    "bin": {
                                        "type": "string"
                                    },
                                    "last4": {
                                        "type": "string"
                                    },
                                    "exp_month": {
                                        "type": "integer"
                                    },
                                    "exp_year": {
                                        "type": "integer"
                                    },
                                    "payment_method_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                                    }
                                }
                            },
                            "captured_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "idempotency_key": {
                                "type": "string"
                            },
                            "decline_code": {
                                "type": "string"
                            },
                            "decline_category": {
                                "type": "string"
                            },
                            "retryable": {
                                "type": "boolean",
                                "description": "whether a recurring engine may retry the decline, Payments' Outcome::retryable"
                            },
                            "response_text": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "buyer_email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "request_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency the platform sent to the processor; currency is the one the processor confirmed"
                            },
                            "request_amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "The amount sent to the processor, in the request currency's smallest unit"
                            },
                            "processor_rate": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The processor's own conversion rate as answered, when it converted"
                            },
                            "processor_rate_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The processor's reference of that rate"
                            },
                            "fx_bearer": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "merchant",
                                    "platform",
                                    null
                                ],
                                "description": "Who bears the exchange difference if the processor settles in another currency than the charged one, fixed at the sale."
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "charge.declined",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "subscription_id": null,
                            "amount_cents": 3139,
                            "currency": "USD",
                            "nmi_txn_id": null,
                            "provider_txn_id": null,
                            "cof_intent": "cit_hosted",
                            "card": {
                                "brand": "visa",
                                "bin": "411111",
                                "last4": "1111",
                                "exp_month": 12,
                                "exp_year": 2030,
                                "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                            },
                            "captured_at": null,
                            "idempotency_key": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C:1",
                            "decline_code": "200",
                            "decline_category": "do_not_honor",
                            "retryable": true,
                            "response_text": "DECLINE",
                            "buyer_email": "buyer@example.test",
                            "request_currency": "USD",
                            "request_amount_cents": 3139,
                            "processor_rate": null,
                            "processor_rate_ref": null
                        }
                    }
                ]
            },
            "EventCheckoutAbandoned": {
                "type": "object",
                "description": "A checkout session expired without a payment. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "checkout.abandoned"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "session_id",
                            "merchant_id",
                            "last_event",
                            "last_event_at"
                        ],
                        "properties": {
                            "session_id": {
                                "type": "string",
                                "pattern": "^cks_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "last_event": {
                                "type": "string"
                            },
                            "last_event_at": {
                                "type": "string",
                                "format": "date-time"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "checkout.abandoned",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "last_event": "card_fields_ready",
                            "last_event_at": "2026-10-08T12:00:00.000Z"
                        }
                    }
                ]
            },
            "EventCheckoutCompleted": {
                "type": "object",
                "description": "A checkout session was paid: its session, order, subscription and customer together. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "checkout.completed"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "session_id",
                            "order_id",
                            "merchant_id",
                            "buyer_email",
                            "billing_address"
                        ],
                        "properties": {
                            "session_id": {
                                "type": "string",
                                "pattern": "^cks_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": "string",
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "billing_address": {
                                "type": "object"
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "save_payment_method": {
                                "type": "boolean"
                            },
                            "subscription_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$",
                                "description": "the subscription the paid session starts, reserved at Pay; null without a plan line"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the session has no customer"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "checkout.completed",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "buyer_id": null,
                            "billing_address": {
                                "line1": "1 Main St",
                                "city": "Austin",
                                "state": "TX",
                                "postal_code": "78701",
                                "country": "US"
                            },
                            "name": "Jane Buyer",
                            "save_payment_method": true,
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                        }
                    }
                ]
            },
            "EventDisputeClosed": {
                "type": "object",
                "description": "A dispute closed, won or lost. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "dispute.closed"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "dispute_id",
                            "merchant_id",
                            "charge_id",
                            "source",
                            "amount_cents",
                            "fee_cents",
                            "status",
                            "outcome",
                            "occurred_at"
                        ],
                        "properties": {
                            "dispute_id": {
                                "type": "string",
                                "pattern": "^dsp_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "charge_id": {
                                "type": "string",
                                "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "source": {
                                "type": "string",
                                "enum": [
                                    "chargeback",
                                    "rdr",
                                    "ethoca"
                                ]
                            },
                            "reason_code": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "amount_cents": {
                                "type": "integer"
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of amount_cents and fee_cents (the disputed charge's); absent on an event from before, read as the home currency"
                            },
                            "fee_cents": {
                                "type": "integer"
                            },
                            "status": {
                                "type": "string"
                            },
                            "outcome": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "evidence_due_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "occurred_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "fraud": {
                                "type": "boolean",
                                "description": "The dispute carries a network fraud reason code, or staff marked it fraud"
                            },
                            "provider_case_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The processor's chargeback id"
                            },
                            "merchant_evidence_due_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time",
                                "description": "The merchant's evidence deadline (3 business days)"
                            },
                            "over_disputed": {
                                "type": "boolean",
                                "description": "The charge's open and lost disputes exceed its amount"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "dispute.closed",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "dispute_id": "dsp_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "source": "chargeback",
                            "reason_code": "10.4",
                            "amount_cents": 3139,
                            "fee_cents": 1500,
                            "status": "closed",
                            "outcome": "lost",
                            "evidence_due_at": "2026-10-20T00:00:00.000Z",
                            "occurred_at": "2026-10-08T12:00:00.000Z",
                            "fraud": true
                        }
                    }
                ]
            },
            "EventDisputeOpened": {
                "type": "object",
                "description": "A chargeback or retrieval was opened against a charge. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "dispute.opened"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "dispute_id",
                            "merchant_id",
                            "charge_id",
                            "source",
                            "amount_cents",
                            "fee_cents",
                            "status",
                            "occurred_at"
                        ],
                        "properties": {
                            "dispute_id": {
                                "type": "string",
                                "pattern": "^dsp_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "store_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^sto_[0-9A-HJKMNP-TV-Z]{26}$",
                                "description": "The store of the charge the event is about; absent on older events"
                            },
                            "charge_id": {
                                "type": "string",
                                "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "source": {
                                "type": "string",
                                "enum": [
                                    "chargeback",
                                    "rdr",
                                    "ethoca"
                                ]
                            },
                            "reason_code": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "amount_cents": {
                                "type": "integer"
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of amount_cents and fee_cents (the disputed charge's); absent on an event from before, read as the home currency"
                            },
                            "fee_cents": {
                                "type": "integer"
                            },
                            "status": {
                                "type": "string"
                            },
                            "outcome": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "evidence_due_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "occurred_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "fraud": {
                                "type": "boolean",
                                "description": "The dispute carries a network fraud reason code, or staff marked it fraud"
                            },
                            "provider_case_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The processor's chargeback id"
                            },
                            "merchant_evidence_due_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time",
                                "description": "The merchant's evidence deadline (3 business days)"
                            },
                            "over_disputed": {
                                "type": "boolean",
                                "description": "The charge's open and lost disputes exceed its amount"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "dispute.opened",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "dispute_id": "dsp_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "source": "chargeback",
                            "reason_code": "10.4",
                            "amount_cents": 3139,
                            "fee_cents": 1500,
                            "status": "open",
                            "outcome": null,
                            "evidence_due_at": "2026-10-20T00:00:00.000Z",
                            "occurred_at": "2026-10-08T12:00:00.000Z",
                            "fraud": true
                        }
                    }
                ]
            },
            "EventOrderAccessRevoked": {
                "type": "object",
                "description": "Access to a paid order was revoked (refund or dispute). The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "order.access_revoked"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "order_id",
                            "merchant_id",
                            "reason",
                            "revoked_at"
                        ],
                        "properties": {
                            "order_id": {
                                "type": "string",
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "reason": {
                                "type": "string",
                                "enum": [
                                    "refund",
                                    "dispute",
                                    "chargeback_lost",
                                    "past_due",
                                    "risk",
                                    "staff"
                                ]
                            },
                            "revoked_at": {
                                "type": "string",
                                "format": "date-time"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "order.access_revoked",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "reason": "refund",
                            "revoked_at": "2026-10-08T12:00:00.000Z"
                        }
                    }
                ]
            },
            "EventOrderInReview": {
                "type": "object",
                "description": "An order was held for review before fulfilment. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "order.in_review"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "description": "A checkout session's charge is held for a review decision. Informational, never the delivery webhook; no order row exists until the capture, so the event describes the session and the charge.",
                        "type": "object",
                        "required": [
                            "session_id",
                            "order_id",
                            "charge_id",
                            "merchant_id",
                            "amount_cents",
                            "currency",
                            "customer_ref"
                        ],
                        "properties": {
                            "session_id": {
                                "type": "string",
                                "pattern": "^cks_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$",
                                "description": "the order id the session reserved; the order row is written only at the capture"
                            },
                            "charge_id": {
                                "type": "string",
                                "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "amount_cents": {
                                "type": "integer"
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the merchant's own customer reference"
                            },
                            "price_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency the merchant set the price in; equal to currency unless the buyer paid in another one"
                            },
                            "price_amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "The amount in the price currency, in its smallest unit"
                            },
                            "rate_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The exchange rate the price was converted with (fxr_); null for equal currencies or a fixed amount in the buyer's currency"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "order.in_review",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "amount_cents": 3139,
                            "currency": "USD",
                            "customer_ref": "cus_Merchant-001",
                            "price_currency": "USD",
                            "price_amount_cents": 3139,
                            "rate_id": null
                        }
                    }
                ]
            },
            "EventOrderPaid": {
                "type": "object",
                "description": "An order was paid: the charge captured and the order is yours to fulfil. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "order.paid"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "order_id",
                            "merchant_id",
                            "buyer_email",
                            "charge_id",
                            "captured_at",
                            "subtotal_cents",
                            "tax_cents",
                            "total_cents",
                            "currency",
                            "fee_bps",
                            "fee_cents",
                            "lines",
                            "source"
                        ],
                        "properties": {
                            "order_id": {
                                "type": "string",
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The short number a buyer reads out for the order (7KQ4-X2M9P), unique within your account; null on older orders that have none"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "reference": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "session_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^cks_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "subscription_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "charge_id": {
                                "type": "string",
                                "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "captured_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "subtotal_cents": {
                                "type": "integer"
                            },
                            "tax_cents": {
                                "type": "integer"
                            },
                            "total_cents": {
                                "type": "integer"
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                            },
                            "fee_bps": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10000
                            },
                            "fee_fixed_cents": {
                                "type": "integer"
                            },
                            "fee_cents": {
                                "type": "integer"
                            },
                            "expected_cost_cents": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "The cost card's estimate of the platform's processing cost at capture (Reporting's expected margin); optional, additive"
                            },
                            "reserve_cents": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "The reserve held from the sale; optional, additive"
                            },
                            "fee_card_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The fee card the merchant pricing resolved at capture (public id); optional, additive; null when nothing was priced"
                            },
                            "fee_rule": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "`<fee card name> · <base rule name or \"base\">`, the rule the fee came from; optional, additive; null when nothing was priced"
                            },
                            "tax_quote": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "rate_source": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "provider",
                                            "learned",
                                            "seed_zip4",
                                            "seed_zip",
                                            null
                                        ],
                                        "description": "Optional: which source taxed the sale"
                                    },
                                    "rate_source_version": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "the provider and API version (anrok:v1), the provider of a stored answer, or the seed release"
                                    }
                                }
                            },
                            "tax_fallback": {
                                "type": "boolean"
                            },
                            "lines": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "required": [
                                        "price_id",
                                        "price_version",
                                        "product_id",
                                        "quantity",
                                        "unit_price_cents",
                                        "tax_cents"
                                    ],
                                    "properties": {
                                        "price_id": {
                                            "type": "string",
                                            "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "price_version": {
                                            "type": "integer"
                                        },
                                        "product_id": {
                                            "type": "string",
                                            "pattern": "^prd_[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "quantity": {
                                            "type": "integer",
                                            "minimum": 1
                                        },
                                        "unit_price_cents": {
                                            "type": "integer"
                                        },
                                        "tax_cents": {
                                            "type": "integer"
                                        },
                                        "snapshot": {
                                            "type": "object"
                                        }
                                    }
                                }
                            },
                            "billing_address": {
                                "type": "object"
                            },
                            "card": {
                                "type": "object",
                                "properties": {
                                    "brand": {
                                        "type": "string"
                                    },
                                    "last4": {
                                        "type": "string"
                                    },
                                    "payment_method_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                                    }
                                }
                            },
                            "acceptance_ids": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "cof_intent": {
                                "type": "string"
                            },
                            "source": {
                                "type": "string",
                                "enum": [
                                    "hosted",
                                    "server",
                                    "renewal",
                                    "console"
                                ]
                            },
                            "metadata": {
                                "type": "object",
                                "description": "the order's metadata object, {} when none"
                            },
                            "price_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency the merchant set the price in; equal to currency unless the buyer paid in another one"
                            },
                            "price_amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "The amount in the price currency, in its smallest unit"
                            },
                            "rate_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The exchange rate the price was converted with (fxr_); null for equal currencies or a fixed amount in the buyer's currency"
                            },
                            "fx_bearer": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "merchant",
                                    "platform",
                                    null
                                ],
                                "description": "Who bears the exchange difference if the processor settles in another currency than the charged one, fixed at the sale."
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "order.paid",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "subscription_id": null,
                            "period_id": null,
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "captured_at": "2026-10-08T12:00:00.000Z",
                            "subtotal_cents": 2900,
                            "tax_cents": 239,
                            "total_cents": 3139,
                            "currency": "USD",
                            "fee_bps": 500,
                            "fee_fixed_cents": 0,
                            "fee_cents": 145,
                            "tax_quote": {
                                "anrok_quote_id": "q_123",
                                "jurisdictions": [
                                    {
                                        "name": "TX",
                                        "cents": 239
                                    }
                                ],
                                "provider_quote_id": "q_123",
                                "provider": "anrok",
                                "rate_source": "provider",
                                "rate_source_version": "anrok:v1"
                            },
                            "tax_fallback": false,
                            "lines": [
                                {
                                    "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                    "price_version": 2,
                                    "product_id": "prd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                    "name": "Starter pack",
                                    "quantity": 1,
                                    "unit_price_cents": 2900,
                                    "tax_cents": 239
                                }
                            ],
                            "billing_address": {
                                "line1": "1 Main St",
                                "city": "Austin",
                                "state": "TX",
                                "postal_code": "78701",
                                "country": "US"
                            },
                            "card": {
                                "brand": "visa",
                                "last4": "1111",
                                "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                            },
                            "acceptance_ids": [
                                "acc_1"
                            ],
                            "cof_intent": "cit_hosted",
                            "source": "hosted",
                            "metadata": {
                                "campaign": "spring"
                            },
                            "expected_cost_cents": 210,
                            "reserve_cents": 314,
                            "fee_card_id": "crd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "fee_rule": "Standard · base",
                            "price_currency": "USD",
                            "price_amount_cents": 3139,
                            "rate_id": null
                        }
                    }
                ]
            },
            "EventOrderReviewClosed": {
                "type": "object",
                "description": "A review on an order closed, approved or rejected. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "order.review_closed"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "description": "The review order.in_review announced ended without a capture. The same session and charge as order.in_review, plus the outcome; an approve sends the ordinary order.paid instead.",
                        "type": "object",
                        "required": [
                            "session_id",
                            "order_id",
                            "charge_id",
                            "merchant_id",
                            "amount_cents",
                            "currency",
                            "customer_ref",
                            "outcome"
                        ],
                        "properties": {
                            "session_id": {
                                "type": "string",
                                "pattern": "^cks_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$",
                                "description": "the order id the session reserved; no order row was written"
                            },
                            "charge_id": {
                                "type": "string",
                                "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "amount_cents": {
                                "type": "integer"
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the merchant's own customer reference"
                            },
                            "outcome": {
                                "type": "string",
                                "enum": [
                                    "rejected",
                                    "expired"
                                ]
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "order.review_closed",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "session_id": "cks_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "amount_cents": 3139,
                            "currency": "USD",
                            "customer_ref": "cus_Merchant-001",
                            "outcome": "rejected"
                        }
                    }
                ]
            },
            "EventPaymentMethodCreated": {
                "type": "object",
                "description": "A card was saved for a customer. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "payment_method.created"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "description": "A new card's first activation. The payload of payment_method.updated; replaces_id is always null.",
                        "type": "object",
                        "required": [
                            "payment_method_id",
                            "merchant_id",
                            "brand",
                            "bin",
                            "last4",
                            "exp_month",
                            "exp_year",
                            "status"
                        ],
                        "properties": {
                            "payment_method_id": {
                                "type": "string",
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "buyer_email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "brand": {
                                "type": "string"
                            },
                            "bin": {
                                "type": "string"
                            },
                            "last4": {
                                "type": "string"
                            },
                            "exp_month": {
                                "type": "integer"
                            },
                            "exp_year": {
                                "type": "integer"
                            },
                            "initial_txn_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "agreements": {
                                "type": "array",
                                "items": {
                                    "enum": [
                                        "recurring",
                                        "unscheduled"
                                    ]
                                },
                                "uniqueItems": true
                            },
                            "recurring_consent_acceptance_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "unscheduled_consent_acceptance_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "status": {
                                "type": "string",
                                "enum": [
                                    "active",
                                    "replaced",
                                    "deleted"
                                ]
                            },
                            "replaces_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "payment_method.created",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "brand": "visa",
                            "bin": "411111",
                            "last4": "1111",
                            "exp_month": 12,
                            "exp_year": 2030,
                            "initial_txn_id": "12649462316",
                            "status": "active",
                            "replaces_id": null
                        }
                    }
                ]
            },
            "EventPaymentMethodUpdated": {
                "type": "object",
                "description": "A saved card was updated (expiry or account updater). The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "payment_method.updated"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "payment_method_id",
                            "merchant_id",
                            "brand",
                            "bin",
                            "last4",
                            "exp_month",
                            "exp_year",
                            "status"
                        ],
                        "properties": {
                            "payment_method_id": {
                                "type": "string",
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "buyer_email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "brand": {
                                "type": "string"
                            },
                            "bin": {
                                "type": "string"
                            },
                            "last4": {
                                "type": "string"
                            },
                            "exp_month": {
                                "type": "integer"
                            },
                            "exp_year": {
                                "type": "integer"
                            },
                            "initial_txn_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "agreements": {
                                "type": "array",
                                "items": {
                                    "enum": [
                                        "recurring",
                                        "unscheduled"
                                    ]
                                },
                                "uniqueItems": true
                            },
                            "recurring_consent_acceptance_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "unscheduled_consent_acceptance_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "status": {
                                "type": "string",
                                "enum": [
                                    "active",
                                    "replaced",
                                    "deleted"
                                ]
                            },
                            "replaces_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "payment_method.updated",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "brand": "visa",
                            "bin": "411111",
                            "last4": "1111",
                            "exp_month": 12,
                            "exp_year": 2030,
                            "initial_txn_id": "12649462316",
                            "status": "active",
                            "replaces_id": null
                        }
                    }
                ]
            },
            "EventPayoutSent": {
                "type": "object",
                "description": "A payout was sent to your bank account. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "payout.sent"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "payout_id",
                            "merchant_id",
                            "statement_id",
                            "amount_cents",
                            "state",
                            "occurred_at"
                        ],
                        "properties": {
                            "payout_id": {
                                "type": "string",
                                "pattern": "^pay_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "statement_id": {
                                "type": "string",
                                "pattern": "^stm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": "integer"
                            },
                            "corpay_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "state": {
                                "type": "string"
                            },
                            "failure_reason": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "occurred_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "attempt": {
                                "type": "integer"
                            },
                            "run_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "statement_state": {
                                "type": "string"
                            },
                            "returned": {
                                "type": "boolean"
                            },
                            "rejected_by_bank": {
                                "type": "boolean"
                            },
                            "bank_reason": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "sent_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "payout.sent",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "payout_id": "pay_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "statement_id": "stm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "amount_cents": 240971,
                            "corpay_ref": "cp_1",
                            "state": "sent",
                            "failure_reason": null,
                            "occurred_at": "2026-10-08T12:00:00.000Z"
                        }
                    }
                ]
            },
            "EventRefundIssued": {
                "type": "object",
                "description": "A refund was issued on a charge. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "refund.issued"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "refund_id",
                            "charge_id",
                            "merchant_id",
                            "amount_cents",
                            "currency",
                            "initiated_by",
                            "occurred_at",
                            "captured_at",
                            "full"
                        ],
                        "properties": {
                            "refund_id": {
                                "type": "string",
                                "pattern": "^rfd_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "charge_id": {
                                "type": "string",
                                "pattern": "^chg_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "amount_cents": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                            },
                            "reason": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "initiated_by": {
                                "type": "string"
                            },
                            "nmi_txn_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "provider_txn_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "occurred_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "captured_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "full": {
                                "type": "boolean"
                            },
                            "approval_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^apv_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "request_currency": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency the platform sent to the processor; currency is the one the processor confirmed"
                            },
                            "request_amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "The amount sent to the processor, in the request currency's smallest unit"
                            },
                            "processor_rate": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The processor's own conversion rate as answered, when it converted"
                            },
                            "processor_rate_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The processor's reference of that rate"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "refund.issued",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "refund_id": "rfd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "amount_cents": 3139,
                            "currency": "USD",
                            "reason": "requested_by_buyer",
                            "initiated_by": "usr_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "nmi_txn_id": "12649462417",
                            "provider_txn_id": "12649462417",
                            "occurred_at": "2026-10-08T12:00:00.000Z",
                            "captured_at": "2026-10-08T12:00:00.000Z",
                            "full": true,
                            "approval_id": null,
                            "request_currency": "USD",
                            "request_amount_cents": 3139,
                            "processor_rate": null,
                            "processor_rate_ref": null
                        }
                    }
                ]
            },
            "EventSubscriptionCancelled": {
                "type": "object",
                "description": "A subscription was canceled. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.cancelled"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.cancelled",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "cancelled",
                            "current_period_start": "2026-10-08T12:00:00.000Z",
                            "current_period_end": "2026-11-08T12:00:00.000Z",
                            "next_charge_at": "2026-11-08T12:00:00.000Z",
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "period_id": "per_1",
                            "amount_cents": 1900,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": 1
                        }
                    }
                ]
            },
            "EventSubscriptionPastDue": {
                "type": "object",
                "description": "A renewal failed and the subscription is past due. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.past_due"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.past_due",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "past_due",
                            "current_period_start": "2026-10-08T12:00:00.000Z",
                            "current_period_end": "2026-11-08T12:00:00.000Z",
                            "next_charge_at": "2026-11-08T12:00:00.000Z",
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "period_id": "per_1",
                            "amount_cents": 1900,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": 1
                        }
                    }
                ]
            },
            "EventSubscriptionPauseCancelled": {
                "type": "object",
                "description": "A scheduled pause was cleared before it took effect; the subscription keeps renewing. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.pause_cancelled"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "description": "A scheduled pause was cleared before it took effect; the subscription keeps renewing and nothing is charged now.",
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.pause_cancelled",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                        }
                    }
                ]
            },
            "EventSubscriptionPauseScheduled": {
                "type": "object",
                "description": "A pause was scheduled for the end of the current period, by the buyer or by you. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.pause_scheduled"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "description": "A pause was scheduled for the subscription's period end, by the buyer from the portal or by the merchant. A second pause while one is scheduled publishes nothing.",
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "pause_at",
                            "scheduled_by"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "pause_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "when the subscription becomes paused: the end of its current period"
                            },
                            "scheduled_by": {
                                "type": "string",
                                "enum": [
                                    "buyer",
                                    "merchant"
                                ]
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.pause_scheduled",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "pause_at": "2026-11-08T12:00:00.000Z",
                            "scheduled_by": "buyer"
                        }
                    }
                ]
            },
            "EventSubscriptionPaused": {
                "type": "object",
                "description": "A subscription was paused. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.paused"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status",
                            "pause_at"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "pause_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.paused",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "customer_ref": "cus_1",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "paused",
                            "current_period_start": "2026-10-08T12:00:00.000Z",
                            "current_period_end": "2026-11-08T12:00:00.000Z",
                            "next_charge_at": null,
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": null,
                            "period_id": null,
                            "amount_cents": 1900,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": null,
                            "pause_at": "2026-11-08T12:00:00.000Z"
                        }
                    }
                ]
            },
            "EventSubscriptionPaymentMethodChanged": {
                "type": "object",
                "description": "The card a subscription renews on changed. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.payment_method_changed"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "payment_method_id",
                            "status"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "payment_method_id": {
                                "type": "string",
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string",
                                "enum": [
                                    "trialing",
                                    "active",
                                    "past_due",
                                    "paused",
                                    "cancelled"
                                ]
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.payment_method_changed",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "active"
                        }
                    }
                ]
            },
            "EventSubscriptionPlanChangeScheduled": {
                "type": "object",
                "description": "A plan change was scheduled for the next period. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.plan_change_scheduled"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status",
                            "old_price_id",
                            "new_price_id",
                            "old_amount_cents",
                            "new_amount_cents",
                            "effective_at",
                            "acceptance_id"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "old_price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "new_price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "old_amount_cents": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "new_amount_cents": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "effective_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "acceptance_id": {
                                "type": "string",
                                "pattern": "^acp_[0-9A-HJKMNP-TV-Z]{26}$"
                            }
                        },
                        "additionalProperties": true,
                        "description": "The buyer accepted a plan-change confirmation (a checkout session of mode plan_change): the change is pending and applies from effective_at, the end of the current period; nothing is charged now. price_id is the price before, as old_price_id. Merchant-webhook subscribable."
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.plan_change_scheduled",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "active",
                            "current_period_start": "2025-11-14T12:00:00.000Z",
                            "current_period_end": "2026-11-14T12:00:00.000Z",
                            "next_charge_at": "2026-11-14T12:00:00.000Z",
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": null,
                            "period_id": null,
                            "amount_cents": 9900,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": null,
                            "old_price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "new_price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M2D",
                            "new_amount_cents": 14900,
                            "effective_at": "2026-11-14T12:00:00.000Z",
                            "old_amount_cents": 9900,
                            "acceptance_id": "acp_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                        }
                    }
                ]
            },
            "EventSubscriptionPlanChanged": {
                "type": "object",
                "description": "A subscription moved to another plan. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.plan_changed"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status",
                            "old_price_id",
                            "new_price_id",
                            "old_amount_cents",
                            "new_amount_cents",
                            "cause"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "old_price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "new_price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "old_amount_cents": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "new_amount_cents": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "cause": {
                                "type": "string",
                                "enum": [
                                    "plan_change",
                                    "price_change"
                                ]
                            }
                        },
                        "additionalProperties": true,
                        "description": "The subscription's plan or price changed, applied at the charge of the period it prices (period_id): cause plan_change is a buyer-confirmed plan change, price_change a new price version reaching an existing subscriber. price_id and amount_cents are the values after the change (the price is the plan). Nothing is charged or refunded for the change itself. Merchant-webhook subscribable."
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.plan_changed",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M2D",
                            "status": "active",
                            "current_period_start": "2025-11-14T12:00:00.000Z",
                            "current_period_end": "2025-12-14T12:00:00.000Z",
                            "next_charge_at": null,
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": null,
                            "period_id": "per_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "amount_cents": 999,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": null,
                            "old_price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "new_price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M2D",
                            "old_amount_cents": 1999,
                            "new_amount_cents": 999,
                            "cause": "plan_change"
                        }
                    }
                ]
            },
            "EventSubscriptionRenewed": {
                "type": "object",
                "description": "A subscription renewed for a new period. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.renewed"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.renewed",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "active",
                            "current_period_start": "2026-10-08T12:00:00.000Z",
                            "current_period_end": "2026-11-08T12:00:00.000Z",
                            "next_charge_at": "2026-11-08T12:00:00.000Z",
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "period_id": "per_1",
                            "amount_cents": 1900,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": 1
                        }
                    }
                ]
            },
            "EventSubscriptionResumed": {
                "type": "object",
                "description": "A paused subscription was resumed and charged for a new period. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.resumed"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "description": "A paused subscription was resumed and charged; sent with subscription.renewed for the paid period",
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "pause_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.resumed",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "customer_ref": "cus_1",
                            "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "active",
                            "current_period_start": "2026-11-20T10:00:00.000Z",
                            "current_period_end": "2026-12-20T10:00:00.000Z",
                            "next_charge_at": "2026-12-20T10:00:00.000Z",
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "period_id": "per_1",
                            "amount_cents": 1900,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": 1,
                            "pause_at": null
                        }
                    }
                ]
            },
            "EventSubscriptionStarted": {
                "type": "object",
                "description": "A subscription started and its first period was paid. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.started"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.started",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "active",
                            "current_period_start": "2026-10-08T12:00:00.000Z",
                            "current_period_end": "2026-11-08T12:00:00.000Z",
                            "next_charge_at": "2026-11-08T12:00:00.000Z",
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "period_id": "per_1",
                            "amount_cents": 1900,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": 1
                        }
                    }
                ]
            },
            "EventSubscriptionTrialEnding": {
                "type": "object",
                "description": "A trial ends within your trial-ending lead days; sent with the buyer's reminder email. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.trial_ending"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "receipt_url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The signed receipt page of the subscription's origin order"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.trial_ending",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "trialing",
                            "current_period_start": "2026-10-08T12:00:00.000Z",
                            "current_period_end": "2026-11-08T12:00:00.000Z",
                            "next_charge_at": "2026-11-08T12:00:00.000Z",
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "period_id": "per_1",
                            "amount_cents": 1900,
                            "cancel_source": null,
                            "decline_category": null,
                            "attempt": 1
                        }
                    }
                ]
            },
            "EventSubscriptionUpdated": {
                "type": "object",
                "description": "A subscription changed status, plan, price, card or cancellation; the full subscription. The delivery envelope; `data` is the event payload.",
                "required": [
                    "id",
                    "type",
                    "version",
                    "occurred_at",
                    "merchant_id",
                    "data"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The event id, also sent as X-Webhook-Delivery."
                    },
                    "type": {
                        "type": "string",
                        "const": "subscription.updated"
                    },
                    "version": {
                        "type": "integer",
                        "const": 1
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "data": {
                        "description": "The full subscription after a status, plan, price, card or cancellation change, sent beside that change's own event; no changed-fields diff",
                        "type": "object",
                        "required": [
                            "subscription_id",
                            "merchant_id",
                            "buyer_email",
                            "price_id",
                            "status"
                        ],
                        "properties": {
                            "subscription_id": {
                                "type": "string",
                                "pattern": "^sub_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "merchant_id": {
                                "type": "string",
                                "pattern": "^mer_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^buy_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "buyer_email": {
                                "type": "string"
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "the customer's cus_ id; null when the row has no customer"
                            },
                            "customer_ref": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "minLength": 1,
                                "maxLength": 255
                            },
                            "price_id": {
                                "type": "string",
                                "pattern": "^prc_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "status": {
                                "type": "string"
                            },
                            "current_period_start": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "current_period_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "next_charge_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "trial_end": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "payment_method_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^pm_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "order_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "pattern": "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "period_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "currency": {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$",
                                "description": "The currency of the amounts; absent on an event from before, read as the home currency"
                            },
                            "amount_cents": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "cancel_source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "decline_category": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "attempt": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "pause_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        },
                        "additionalProperties": true
                    }
                },
                "examples": [
                    {
                        "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "type": "subscription.updated",
                        "version": 1,
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "data": {
                            "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "buyer_email": "buyer@example.test",
                            "customer_ref": "cus_1",
                            "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "status": "past_due",
                            "current_period_start": "2026-10-08T12:00:00.000Z",
                            "current_period_end": "2026-11-08T12:00:00.000Z",
                            "next_charge_at": "2026-11-09T12:00:00.000Z",
                            "trial_end": null,
                            "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "order_id": null,
                            "period_id": "per_2",
                            "amount_cents": 1900,
                            "cancel_source": null,
                            "decline_category": "insufficient_funds",
                            "attempt": 1,
                            "pause_at": null
                        }
                    }
                ]
            },
            "IdentityApiKey": {
                "examples": [
                    {
                        "id": "key_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "name": "Server",
                        "mode": "test",
                        "prefix": "mor_test_1a2b",
                        "scopes": [
                            "v1.orders.read",
                            "v1.refunds.write"
                        ],
                        "created_by": "text",
                        "last_used_at": "2026-10-21T14:05:00.000Z",
                        "revoked_at": "2026-10-21T14:05:00.000Z",
                        "created_at": "2026-10-21T14:05:00.000Z",
                        "store": {
                            "id": "key_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "name": "Server",
                            "display_name": "Acme Goods LLC",
                            "logo_url": "https://cdn.example.com/logo.png"
                        }
                    }
                ],
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "public id key_"
                    },
                    "name": {
                        "type": "string"
                    },
                    "mode": {
                        "type": "string"
                    },
                    "prefix": {
                        "type": "string"
                    },
                    "scopes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "created_by": {
                        "type": "string",
                        "description": "public id usr_"
                    },
                    "last_used_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "revoked_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "store": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/IdentityStoreRef"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The store the key names; null for a key made before the backfill"
                    }
                },
                "required": [
                    "store",
                    "id",
                    "name",
                    "mode",
                    "prefix",
                    "scopes",
                    "created_by",
                    "last_used_at",
                    "revoked_at",
                    "created_at"
                ]
            },
            "IdentityApiKey2": {
                "examples": [
                    {
                        "id": "obj_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "name": "Server",
                        "mode": "test",
                        "prefix": "mor_test_1a2b",
                        "scopes": [
                            "v1.orders.read",
                            "v1.refunds.write"
                        ],
                        "created_by": "text",
                        "last_used_at": "2026-10-21T14:05:00.000Z",
                        "revoked_at": "2026-10-21T14:05:00.000Z",
                        "created_at": "2026-10-21T14:05:00.000Z",
                        "key": "mor_test_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
                        "store": {
                            "id": "obj_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "name": "Server",
                            "display_name": "Acme Goods LLC",
                            "logo_url": "https://cdn.example.com/logo.png"
                        }
                    }
                ],
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "public id key_"
                    },
                    "name": {
                        "type": "string"
                    },
                    "mode": {
                        "type": "string"
                    },
                    "prefix": {
                        "type": "string"
                    },
                    "scopes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "created_by": {
                        "type": "string",
                        "description": "public id usr_"
                    },
                    "last_used_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "revoked_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "key": {
                        "type": "string"
                    },
                    "store": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/IdentityStoreRef"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The store the key names; null for a key made before the backfill"
                    }
                },
                "required": [
                    "store",
                    "id",
                    "name",
                    "mode",
                    "prefix",
                    "scopes",
                    "created_by",
                    "last_used_at",
                    "revoked_at",
                    "created_at",
                    "key"
                ]
            },
            "IdentityApiKeyRequest": {
                "examples": [
                    {
                        "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "name": "Server",
                        "mode": "test",
                        "scopes": [
                            "v1.orders.read",
                            "v1.refunds.write"
                        ]
                    }
                ],
                "type": "object",
                "properties": {
                    "store_id": {
                        "type": "string",
                        "description": "The store the key names; default = the merchant's default store"
                    },
                    "name": {
                        "type": "string"
                    },
                    "mode": {
                        "type": "string"
                    },
                    "scopes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name",
                    "scopes"
                ]
            },
            "IdentityMerchantProfile": {
                "type": "object",
                "description": "Your merchant account as the merchant API shows it: names, status, support contact and time zone. Further fields may appear; integrations read the ones listed.",
                "required": [
                    "id",
                    "legal_name",
                    "display_name",
                    "status",
                    "kyc_status",
                    "support_email",
                    "timezone",
                    "version",
                    "created_at"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "mer_…"
                    },
                    "legal_name": {
                        "type": "string"
                    },
                    "display_name": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "pending",
                            "approved",
                            "suspended",
                            "closed"
                        ]
                    },
                    "kyc_status": {
                        "type": "string",
                        "enum": [
                            "not_started",
                            "in_progress",
                            "submitted",
                            "verified",
                            "rejected"
                        ]
                    },
                    "support_email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "card_update_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "where a buyer updates a card when your account hosts that page"
                    },
                    "organization_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "timezone": {
                        "type": "string",
                        "description": "IANA zone, the default for date filters"
                    },
                    "address": {
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "refund_policy_version": {
                        "type": "integer"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "additionalProperties": true,
                "examples": [
                    {
                        "id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "legal_name": "Acme Goods LLC",
                        "display_name": "Acme Goods",
                        "status": "approved",
                        "kyc_status": "verified",
                        "support_email": "help@acme-goods.example",
                        "card_update_url": null,
                        "organization_id": "org_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "timezone": "America/New_York",
                        "address": {
                            "line1": "1 Main St",
                            "city": "Austin",
                            "state": "TX",
                            "postal_code": "73301",
                            "country": "US"
                        },
                        "refund_policy_version": 1,
                        "version": 3,
                        "created_at": "2026-10-01T09:00:00.000Z",
                        "updated_at": "2026-10-21T14:05:00.000Z"
                    }
                ]
            },
            "IdentityStoreRef": {
                "type": "object",
                "description": "A store named on another resource",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "public id sto_"
                    },
                    "name": {
                        "type": "string"
                    },
                    "display_name": {
                        "type": "string"
                    },
                    "logo_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name"
                ]
            },
            "IdentityUser": {
                "examples": [
                    {
                        "id": "usr_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "user": {
                            "id": "usr_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                            "email": "buyer@example.com",
                            "name": "Starter pack",
                            "status": "pending_verification",
                            "timezone": "America/New_York",
                            "email_verified_at": "2026-10-21T14:05:00.000Z",
                            "totp_enabled": false,
                            "sso": false,
                            "last_login_at": "2026-10-21T14:05:00.000Z",
                            "created_at": "2026-10-21T14:05:00.000Z"
                        },
                        "role": "text",
                        "status": "invited",
                        "invited_by": "text",
                        "version": 1,
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "public id usr_"
                    },
                    "user": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string",
                                "description": "public id usr_"
                            },
                            "email": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "status": {
                                "type": "string",
                                "x-enum-name": "UserStatus",
                                "enum": [
                                    "pending_verification",
                                    "invited",
                                    "active",
                                    "suspended",
                                    "deactivated"
                                ]
                            },
                            "timezone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "email_verified_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "totp_enabled": {
                                "type": "boolean"
                            },
                            "sso": {
                                "type": "boolean"
                            },
                            "last_login_at": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "created_at": {
                                "type": "string",
                                "format": "date-time"
                            }
                        },
                        "required": [
                            "id",
                            "email",
                            "name",
                            "status",
                            "timezone",
                            "email_verified_at",
                            "totp_enabled",
                            "sso",
                            "last_login_at",
                            "created_at"
                        ]
                    },
                    "role": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the role's public id (rol_): null when the role was deleted (no access to the merchant until given one)"
                    },
                    "role_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "x-enum-name": "MerchantUserStatus",
                        "enum": [
                            "invited",
                            "active",
                            "suspended",
                            "deactivated"
                        ]
                    },
                    "invited_by": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "public id usr_"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "user",
                    "role",
                    "status",
                    "invited_by",
                    "version",
                    "created_at"
                ]
            },
            "LedgerBalance": {
                "examples": [
                    {
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "pending_cents": 0,
                        "available_cents": 2755,
                        "reserve_cents": 0,
                        "on_hold_cents": 2900,
                        "in_transit_cents": 2900,
                        "paid_out_cents": 2900,
                        "receivable_cents": 2900,
                        "as_of_entry_id": 1,
                        "next_payout": {
                            "on": "2026-10-21",
                            "estimate_cents": 2900
                        }
                    }
                ],
                "type": "object",
                "description": "The merchant's money in Stripe's terms (pending, available, reserve, on hold, in transit, paid out), integer cents.",
                "properties": {
                    "currency": {
                        "type": "string",
                        "description": "The currency these figures are in"
                    },
                    "currencies": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "The tenant's declared currencies, the first being its default"
                    },
                    "merchant_id": {
                        "type": "string",
                        "description": "public id mer_"
                    },
                    "pending_cents": {
                        "type": "integer",
                        "description": "sold and not yet settled by the processor: the net of the merchant's unsettled sales (gross less tax and fee)"
                    },
                    "available_cents": {
                        "type": "integer",
                        "description": "settled and payable: the payable balance less what is still pending, open holds and a negative carry-forward; never below 0"
                    },
                    "reserve_cents": {
                        "type": "integer"
                    },
                    "on_hold_cents": {
                        "type": "integer"
                    },
                    "in_transit_cents": {
                        "type": "integer",
                        "description": "cleared for a payout that has not landed yet"
                    },
                    "paid_out_cents": {
                        "type": "integer",
                        "description": "lifetime payouts"
                    },
                    "receivable_cents": {
                        "type": "integer",
                        "description": "the open acquirer receivable (gross captured, not settled); staff and reconciliation"
                    },
                    "as_of_entry_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "next_payout": {
                        "$ref": "#/components/schemas/LedgerNextPayout"
                    }
                },
                "required": [
                    "merchant_id",
                    "pending_cents",
                    "available_cents",
                    "reserve_cents",
                    "on_hold_cents",
                    "in_transit_cents",
                    "paid_out_cents",
                    "receivable_cents",
                    "as_of_entry_id",
                    "next_payout"
                ]
            },
            "LedgerBalanceAsOf": {
                "type": "object",
                "description": "A balance at an as-of point. The account figures only: pending, open holds, paid out and the next payout are now, so they are not part of it.",
                "examples": [
                    {
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "payable_cents": 2755,
                        "reserve_cents": 290,
                        "in_transit_cents": 0,
                        "receivable_cents": 2900,
                        "as_of_entry_id": 1187,
                        "as_of": "2026-10-28T04:00:00.000Z",
                        "provisional": false
                    }
                ],
                "properties": {
                    "currency": {
                        "type": "string",
                        "description": "The currency these figures are in"
                    },
                    "currencies": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "The tenant's declared currencies, the first being its default"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "payable_cents": {
                        "type": "integer",
                        "description": "the payable balance at the point (before pending and holds)"
                    },
                    "reserve_cents": {
                        "type": "integer"
                    },
                    "in_transit_cents": {
                        "type": "integer"
                    },
                    "receivable_cents": {
                        "type": "integer"
                    },
                    "as_of_entry_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "the last entry the closing balance covers; null when provisional"
                    },
                    "as_of": {
                        "type": "string",
                        "format": "date-time",
                        "description": "the instant the figures stand at (a date: midnight after it in the tenant's zone)"
                    },
                    "provisional": {
                        "type": "boolean",
                        "description": "false = the stored closing balance of a closed day; true = summed from the postings, no close stands behind it"
                    }
                },
                "required": [
                    "merchant_id",
                    "payable_cents",
                    "reserve_cents",
                    "in_transit_cents",
                    "receivable_cents",
                    "as_of_entry_id",
                    "as_of",
                    "provisional"
                ]
            },
            "LedgerNextPayout": {
                "type": [
                    "object",
                    "null"
                ],
                "description": "The next payout day of the schedule, the estimated amount (settled payable) and why it would be held back; read-time",
                "properties": {
                    "on": {
                        "type": "string",
                        "format": "date"
                    },
                    "estimate_cents": {
                        "type": "integer"
                    },
                    "minimum_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "the minimum of `currency`; null when nobody set one for it (reason minimum_missing)"
                    },
                    "reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "not_approved",
                            "risk_paused",
                            "tax_form_missing",
                            "no_instruction",
                            "instruction_unverified",
                            "instruction_currency",
                            "minimum_missing",
                            "below_minimum",
                            null
                        ],
                        "description": "instruction_currency: your bank account is in another currency than this balance, and a payout is paid like to like; minimum_missing: no payout minimum is set for this currency yet"
                    },
                    "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "The currency of the estimate and the minimum"
                    }
                },
                "required": [
                    "on",
                    "estimate_cents"
                ]
            },
            "PaymentsCardSummary": {
                "type": "object",
                "properties": {
                    "brand": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "bin": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last4": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "exp_month": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "exp_year": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "payment_method_public_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "PaymentsCharge": {
                "examples": [
                    {
                        "id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "store_id": "sto_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "customer_ref": "cus_A1B2",
                        "amount_cents": 2900,
                        "refunded_cents": 0,
                        "currency": "USD",
                        "state": "pending",
                        "cof_intent": "one_off",
                        "decline_code": "text",
                        "decline_category": "text",
                        "response_text": "text",
                        "payment_system": "credit_card",
                        "capabilities": {
                            "refund": "partial",
                            "void": true
                        },
                        "avs_result": "text",
                        "cvv_result": "text",
                        "card": {
                            "brand": "visa",
                            "bin": "text",
                            "last4": "4242",
                            "exp_month": 10,
                            "exp_year": 2027,
                            "payment_method_public_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C"
                        },
                        "captured_at": "2026-10-21T14:05:00.000Z",
                        "settled_at": "2026-10-21T14:05:00.000Z",
                        "idempotency_key": "text",
                        "metadata": {
                            "crm_ref": "CRM-1001"
                        },
                        "version": 1,
                        "created_at": "2026-10-21T14:05:00.000Z",
                        "provider": "nmi"
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "merchant_id",
                    "amount_cents",
                    "refunded_cents",
                    "currency",
                    "state",
                    "cof_intent",
                    "payment_system",
                    "capabilities",
                    "card",
                    "idempotency_key",
                    "version",
                    "created_at"
                ],
                "properties": {
                    "request_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[A-Z]{3}$",
                        "description": "The currency the platform sent to the processor; currency is the one the processor confirmed the buyer paid in"
                    },
                    "request_amount_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The amount sent to the processor, in the request currency's smallest unit"
                    },
                    "processor_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The processor's own conversion rate as it answered it, when it converted (request and charged currency differ)"
                    },
                    "processor_rate_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The processor's reference of that rate; a refund is sent with it where the card account refunds at the original rate"
                    },
                    "fx_bearer": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "merchant",
                            "platform",
                            null
                        ],
                        "description": "Who bears the exchange difference if this charge settles in another currency, fixed when the charge was taken"
                    },
                    "id": {
                        "type": "string"
                    },
                    "store_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The store the row belongs to (public id sto_); null for a row made before the backfill"
                    },
                    "payment_system": {
                        "type": "string",
                        "description": "The method type the charge was paid with, read from the charge's payment system (credit_card, apple_pay, google_pay); never a provider or account"
                    },
                    "capabilities": {
                        "type": "object",
                        "description": "What the charge's payment system allows on it: a refund (none, full or partial) and a void; a call it refuses answers 422 refund_not_supported, partial_refund_not_supported or void_not_supported",
                        "required": [
                            "refund",
                            "void"
                        ],
                        "properties": {
                            "refund": {
                                "type": "string",
                                "description": "partial: any amount up to what is left; full: only what is left, in one refund; none: no refund",
                                "x-enum-name": "PaymentSystemRefundCapability",
                                "enum": [
                                    "none",
                                    "full",
                                    "partial"
                                ]
                            },
                            "void": {
                                "type": "boolean"
                            }
                        }
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "order_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "subscription_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "buyer_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "deprecated": true,
                        "description": "Still returned; it is being phased out."
                    },
                    "customer_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's customer reference sent with the charge request; null on older charges that carried none"
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "refunded_cents": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string",
                        "description": "authorized: funds held by an auth, not taken; in_review: held, waiting for a staff decision; approved: funds taken, by a capture or by a sale. A trial_initial charge authorises, stores the card, then voids the authorisation in the same request: it answers voided once its card is stored, and authorized, card stored, when the void failed",
                        "enum": [
                            "pending",
                            "authorized",
                            "in_review",
                            "approved",
                            "declined",
                            "unknown",
                            "voided",
                            "refunded",
                            "partially_refunded",
                            "duplicate",
                            "invalid",
                            "error"
                        ]
                    },
                    "cof_intent": {
                        "type": "string",
                        "enum": [
                            "one_off",
                            "one_off_store",
                            "sub_initial",
                            "trial_initial",
                            "card_update_cit",
                            "renewal_mit",
                            "buyer_cit_on_file",
                            "unscheduled_mit"
                        ]
                    },
                    "decline_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "decline_category": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "do_not_honor, insufficient_funds, over_limit, not_allowed, expired_card, cvv_mismatch, invalid_card, pick_up, stop_recurring, card_updated, retry_later, call_issuer, gateway_error, invalid_request, authentication_required, other"
                    },
                    "response_text": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "avs_result": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "cvv_result": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "card": {
                        "$ref": "#/components/schemas/PaymentsCardSummary"
                    },
                    "captured_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "null until a capture or a sale takes the funds: an approved auth (authorized, in_review) carries none"
                    },
                    "settled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "idempotency_key": {
                        "type": "string"
                    },
                    "metadata": {
                        "type": "object"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "PaymentsPaymentMethod": {
                "examples": [
                    {
                        "type": "card",
                        "provider": "text",
                        "id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "customer_ref": "cus_A1B2",
                        "customer_id": "cus_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "is_default": true,
                        "brand": "visa",
                        "bin": "text",
                        "last4": "4242",
                        "exp_month": 10,
                        "exp_year": 2027,
                        "issuer_country": "US",
                        "status": "active",
                        "version": 1,
                        "created_at": "2026-10-21T14:05:00.000Z"
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "merchant_id",
                    "customer_id",
                    "is_default",
                    "type",
                    "brand",
                    "bin",
                    "last4",
                    "exp_month",
                    "exp_year",
                    "issuer_country",
                    "status",
                    "version",
                    "created_at"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "the payment system the method belongs to: credit_card"
                    },
                    "id": {
                        "type": "string"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "customer_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the merchant's customer reference the card was stored under; set once"
                    },
                    "customer_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the public id of the customer the card belongs to; null when no customer matched the card's customer_ref"
                    },
                    "is_default": {
                        "type": "boolean",
                        "description": "whether the card is its customer's default; at most one active card per customer is"
                    },
                    "brand": {
                        "type": "string"
                    },
                    "bin": {
                        "type": "string"
                    },
                    "last4": {
                        "type": "string"
                    },
                    "exp_month": {
                        "type": "integer"
                    },
                    "exp_year": {
                        "type": "integer"
                    },
                    "issuer_country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 3166-1 alpha-2 country of the issuing bank, from the BIN ranges; null when the BIN is not in them"
                    },
                    "status": {
                        "type": "string",
                        "description": "inactive: stored at authorization, not yet usable until its charge is captured; never served by a route",
                        "enum": [
                            "active",
                            "inactive",
                            "replaced",
                            "deleted"
                        ]
                    },
                    "version": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "PaymentsRefund": {
                "examples": [
                    {
                        "id": "rfd_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "statement_id": null,
                        "paid_out_at": null,
                        "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "amount_cents": 2900,
                        "currency": "USD",
                        "reason": "requested_by_customer",
                        "state": "sending",
                        "source": "api",
                        "initiated_by": "text",
                        "approval_id": "text",
                        "failure_reason": "text",
                        "issued_at": "2026-10-21T14:05:00.000Z",
                        "settled_at": "2026-10-21T14:05:00.000Z",
                        "created_at": "2026-10-21T14:05:00.000Z",
                        "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "decided_by": null,
                        "decided_at": null,
                        "provider": "nmi"
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "charge_id",
                    "order_id",
                    "merchant_id",
                    "amount_cents",
                    "currency",
                    "state",
                    "source",
                    "initiated_by",
                    "decided_by",
                    "decided_at",
                    "created_at"
                ],
                "properties": {
                    "request_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[A-Z]{3}$",
                        "description": "The currency the platform sent to the processor; currency is the one the processor confirmed the buyer paid in"
                    },
                    "request_amount_cents": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The amount sent to the processor, in the request currency's smallest unit"
                    },
                    "processor_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The processor's own conversion rate as it answered it, when it converted (request and charged currency differ)"
                    },
                    "processor_rate_ref": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The processor's reference of that rate; a refund is sent with it where the card account refunds at the original rate"
                    },
                    "fx_bearer": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "merchant",
                            "platform",
                            null
                        ],
                        "description": "Who bears the exchange difference if this charge settles in another currency, fixed when the charge was taken"
                    },
                    "statement_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The statement that pays it (Ledger's stm_), null until one lists it"
                    },
                    "paid_out_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When that statement's payout was sent; null until then or after the bank returned it"
                    },
                    "id": {
                        "type": "string"
                    },
                    "charge_id": {
                        "type": "string"
                    },
                    "order_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the order paid by the refunded charge; null for a charge with no order"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "rejected",
                            "sending",
                            "issued",
                            "failed",
                            "unknown"
                        ]
                    },
                    "source": {
                        "type": "string",
                        "enum": [
                            "api",
                            "dashboard",
                            "staff",
                            "system"
                        ]
                    },
                    "initiated_by": {
                        "type": "string"
                    },
                    "approval_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "failure_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "issued_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "settled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the processor took the refund out of trust (Ledger posted its gross settlement)"
                    },
                    "decided_by": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "history only (refunds no longer wait for approval): who granted or rejected an older refund; null otherwise"
                    },
                    "decided_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "when the approval was decided; null until a decision"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "PaymentsRefundRequest": {
                "examples": [
                    {
                        "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "amount_cents": 2900,
                        "reason": "requested_by_customer"
                    },
                    {
                        "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "amount_cents": 2900,
                        "reason": "requested_by_customer"
                    }
                ],
                "type": "object",
                "description": "Send exactly one of charge_id or order_id: neither or both is 422 validation",
                "required": [
                    "amount_cents"
                ],
                "properties": {
                    "charge_id": {
                        "type": "string",
                        "description": "the charge to refund; exactly one of charge_id or order_id"
                    },
                    "order_id": {
                        "type": "string",
                        "description": "the order to refund: resolved to the order's charge, then refunded as by charge_id; an unknown order, or one with no captured charge, is 404"
                    },
                    "amount_cents": {
                        "type": "integer",
                        "description": "at most what is left of the charge"
                    },
                    "reason": {
                        "type": "string"
                    }
                }
            },
            "RangePreset": {
                "type": "string",
                "x-enum-name": "RangePreset",
                "description": "Date-range presets of list filters: inclusive days in the viewer's zone. Custom ranges use from/to.",
                "enum": [
                    "today",
                    "yesterday",
                    "last_7_days",
                    "last_30_days",
                    "this_month",
                    "last_month",
                    "this_quarter",
                    "year_to_date"
                ]
            },
            "ReportingBalanceActivity": {
                "type": "object",
                "required": [
                    "category",
                    "count",
                    "gross_cents",
                    "tax_cents",
                    "fee_cents",
                    "reserve_cents",
                    "net_cents"
                ],
                "properties": {
                    "category": {
                        "type": "string",
                        "x-enum-name": "BalanceTransactionCategory",
                        "enum": [
                            "sale",
                            "refund",
                            "chargeback",
                            "chargeback_reversal",
                            "chargeback_fee",
                            "reserve_hold",
                            "reserve_release",
                            "hold",
                            "hold_release",
                            "adjustment",
                            "payout",
                            "payout_reversal",
                            "payout_fee",
                            "payout_return_fee",
                            "auth_declined_fee",
                            "risk_declined_fee",
                            "auth_voided_fee",
                            "chargeback_reversal_fee",
                            "boarding_fee",
                            "monthly_fee",
                            "monthly_minimum",
                            "pci_fee",
                            "conversion_out",
                            "conversion_in",
                            "conversion_fee"
                        ]
                    },
                    "count": {
                        "type": "integer"
                    },
                    "gross_cents": {
                        "type": "integer"
                    },
                    "tax_cents": {
                        "type": "integer"
                    },
                    "fee_cents": {
                        "type": "integer"
                    },
                    "reserve_cents": {
                        "type": "integer"
                    },
                    "net_cents": {
                        "type": "integer"
                    }
                }
            },
            "ReportingBalanceSummary": {
                "examples": [
                    {
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "from": "2026-10-21",
                        "to": "2026-10-21",
                        "starting_balance_cents": 2900,
                        "activity": [
                            {
                                "category": "sale",
                                "count": 3,
                                "gross_cents": 2900,
                                "tax_cents": 239,
                                "fee_cents": 145,
                                "reserve_cents": 0,
                                "net_cents": 2900
                            }
                        ],
                        "payouts_cents": 2900,
                        "ending_balance_cents": 2900
                    }
                ],
                "type": "object",
                "description": "starting_balance + sum(activity.net) - payouts = ending_balance",
                "required": [
                    "merchant_id",
                    "from",
                    "to",
                    "starting_balance_cents",
                    "activity",
                    "payouts_cents",
                    "ending_balance_cents"
                ],
                "properties": {
                    "currency": {
                        "type": "string",
                        "description": "The currency every amount of the summary is in"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "from": {
                        "type": "string",
                        "format": "date"
                    },
                    "to": {
                        "type": "string",
                        "format": "date"
                    },
                    "starting_balance_cents": {
                        "type": "integer"
                    },
                    "activity": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ReportingBalanceActivity"
                        }
                    },
                    "payouts_cents": {
                        "type": "integer",
                        "description": "paid out in the period, as a positive amount"
                    },
                    "zone": {
                        "type": "string",
                        "description": "The zone from and to were read in (the X-Timezone header, else the business zone)"
                    },
                    "ending_balance_cents": {
                        "type": "integer"
                    }
                }
            },
            "ReportingBalanceTransactionRow": {
                "examples": [
                    {
                        "id": "bt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "category": "sale",
                        "gross_cents": 2900,
                        "tax_cents": 239,
                        "fee_cents": 145,
                        "reserve_cents": 0,
                        "net_cents": 2900,
                        "currency": "USD",
                        "occurred_at": "2026-10-21T14:05:00.000Z",
                        "available_on": "2026-10-21T14:05:00.000Z",
                        "available_at": "2026-10-21T14:05:00.000Z",
                        "source_type": "order",
                        "source_id": "text",
                        "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "entry_id": "led_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "payout_id": "pay_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "statement_id": "stm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "memo": "text"
                    }
                ],
                "type": "object",
                "description": "One movement of the merchant balance. Signed from the merchant side: net = gross + tax + fee + reserve.",
                "required": [
                    "id",
                    "merchant_id",
                    "category",
                    "gross_cents",
                    "tax_cents",
                    "fee_cents",
                    "reserve_cents",
                    "net_cents",
                    "currency",
                    "occurred_at",
                    "available_on",
                    "available_at",
                    "source_type",
                    "source_id",
                    "order_id",
                    "charge_id",
                    "entry_id",
                    "payout_id",
                    "statement_id",
                    "memo"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "public id bt_"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "category": {
                        "type": "string",
                        "x-enum-name": "BalanceTransactionCategory",
                        "enum": [
                            "sale",
                            "refund",
                            "chargeback",
                            "chargeback_reversal",
                            "chargeback_fee",
                            "reserve_hold",
                            "reserve_release",
                            "hold",
                            "hold_release",
                            "adjustment",
                            "payout",
                            "payout_reversal",
                            "payout_fee",
                            "payout_return_fee",
                            "auth_declined_fee",
                            "risk_declined_fee",
                            "auth_voided_fee",
                            "chargeback_reversal_fee",
                            "boarding_fee",
                            "monthly_fee",
                            "monthly_minimum",
                            "pci_fee",
                            "conversion_out",
                            "conversion_in",
                            "conversion_fee"
                        ]
                    },
                    "gross_cents": {
                        "type": "integer",
                        "description": "what the buyer paid (positive) or was refunded / charged back (negative); a payout row carries -payout"
                    },
                    "tax_cents": {
                        "type": "integer",
                        "description": "sales tax on the row, owed by the merchant of record (negative on a sale)"
                    },
                    "fee_cents": {
                        "type": "integer",
                        "description": "Platform fee on the row (negative when charged, positive when returned)"
                    },
                    "reserve_cents": {
                        "type": "integer",
                        "description": "money set aside (negative) or given back (positive): the rolling reserve, or a hold"
                    },
                    "net_cents": {
                        "type": "integer",
                        "description": "effect on the merchant balance"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "available_on": {
                        "type": "string",
                        "format": "date-time",
                        "description": "when the net becomes payable: a reserve hold at its release date, everything else at once"
                    },
                    "available_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the processor settled the sale, refund or chargeback and its money was queued for payout (Ledger's settlement.posted); null while pending settlement"
                    },
                    "source_type": {
                        "type": "string",
                        "x-enum-name": "BalanceTransactionSourceType",
                        "description": "Merchant for the account fees (boarding, the monthly ones; source_id the merchant), risk_check for a Risk decline fee (source_id the Risk check)",
                        "enum": [
                            "order",
                            "charge",
                            "refund",
                            "dispute",
                            "hold",
                            "adjustment",
                            "payout",
                            "reserve",
                            "merchant",
                            "risk_check"
                        ]
                    },
                    "source_id": {
                        "type": "string"
                    },
                    "order_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "charge_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "entry_id": {
                        "type": "string",
                        "nullable": true,
                        "description": "the Ledger journal entry"
                    },
                    "payout_id": {
                        "type": "string",
                        "nullable": true,
                        "description": "the payout that paid the row out, once its statement closed"
                    },
                    "statement_id": {
                        "type": "string",
                        "nullable": true
                    },
                    "memo": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "ReportingMerchantFinanceReport": {
                "type": "object",
                "description": "The finance report over the Reporting views, cut on the tenant's business days.",
                "examples": [
                    {
                        "from": "2026-10-01",
                        "to": "2026-10-29",
                        "zone": "America/New_York",
                        "business_day_label": "New York days",
                        "group": "month",
                        "by": "period",
                        "rows": [
                            {
                                "key": "2026-10-01",
                                "label": "Oct 2026",
                                "orders": 42,
                                "gross_cents": 131838,
                                "refunded_cents": 3139,
                                "net_volume_cents": 128699,
                                "chargebacks": 1,
                                "chargebacks_cents": 3139,
                                "chargeback_fees_cents": 1500,
                                "sale_fees_cents": 6090,
                                "refund_fees_cents": 0,
                                "account_fees_cents": 0,
                                "income_cents": 7590,
                                "reserve_held_cents": 13183,
                                "reserve_released_cents": 0
                            }
                        ],
                        "totals": {
                            "key": "2026-10-01",
                            "label": "Oct 2026",
                            "orders": 42,
                            "gross_cents": 131838,
                            "refunded_cents": 3139,
                            "net_volume_cents": 128699,
                            "chargebacks": 1,
                            "chargebacks_cents": 3139,
                            "chargeback_fees_cents": 1500,
                            "sale_fees_cents": 6090,
                            "refund_fees_cents": 0,
                            "account_fees_cents": 0,
                            "income_cents": 7590,
                            "reserve_held_cents": 13183,
                            "reserve_released_cents": 0
                        }
                    }
                ],
                "properties": {
                    "from": {
                        "type": "string",
                        "format": "date"
                    },
                    "to": {
                        "type": "string",
                        "format": "date"
                    },
                    "zone": {
                        "type": "string",
                        "description": "the business zone the periods are cut on (IANA)"
                    },
                    "business_day_label": {
                        "type": "string"
                    },
                    "group": {
                        "type": "string",
                        "x-enum-name": "FinanceGroup",
                        "enum": [
                            "day",
                            "week",
                            "month"
                        ]
                    },
                    "by": {
                        "type": "string",
                        "x-enum-name": "MerchantFinanceBy",
                        "enum": [
                            "period",
                            "store",
                            "card_brand"
                        ]
                    },
                    "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "The currency of every amount in this answer"
                    },
                    "currencies": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                        },
                        "description": "The currencies the range has figures in, the most used first, the home currency always; ask each with ?currency="
                    },
                    "rows": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ReportingMerchantFinanceRow"
                        }
                    },
                    "totals": {
                        "$ref": "#/components/schemas/ReportingMerchantFinanceRow"
                    }
                },
                "required": [
                    "from",
                    "to",
                    "zone",
                    "business_day_label",
                    "group",
                    "by",
                    "rows",
                    "totals"
                ]
            },
            "ReportingMerchantFinanceRow": {
                "type": "object",
                "description": "One row of the merchant's finance report: its own volume, fees, refunds, chargebacks and reserve; never the platform's cost or margin.",
                "examples": [
                    {
                        "key": "2026-10-01",
                        "label": "Oct 2026",
                        "orders": 42,
                        "gross_cents": 131838,
                        "refunded_cents": 3139,
                        "net_volume_cents": 128699,
                        "chargebacks": 1,
                        "chargebacks_cents": 3139,
                        "chargeback_fees_cents": 1500,
                        "sale_fees_cents": 6090,
                        "refund_fees_cents": 0,
                        "account_fees_cents": 0,
                        "income_cents": 7590,
                        "reserve_held_cents": 13183,
                        "reserve_released_cents": 0
                    }
                ],
                "properties": {
                    "key": {
                        "type": "string",
                        "description": "the period start (YYYY-MM-DD), the merchant or store id, the card brand or the fee rule; `unpriced` for orders paid before the fee rule travelled"
                    },
                    "label": {
                        "type": "string"
                    },
                    "orders": {
                        "type": "integer"
                    },
                    "gross_cents": {
                        "type": "integer"
                    },
                    "refunded_cents": {
                        "type": "integer"
                    },
                    "net_volume_cents": {
                        "type": "integer",
                        "description": "gross minus refunded"
                    },
                    "chargebacks": {
                        "type": "integer",
                        "description": "disputes opened in the period"
                    },
                    "chargebacks_cents": {
                        "type": "integer"
                    },
                    "chargeback_fees_cents": {
                        "type": "integer",
                        "description": "the chargeback fees charged to the merchants"
                    },
                    "sale_fees_cents": {
                        "type": "integer",
                        "description": "The platform's fee on the sales"
                    },
                    "refund_fees_cents": {
                        "type": "integer",
                        "description": "the fee kept or charged on refunds"
                    },
                    "account_fees_cents": {
                        "type": "integer",
                        "description": "The pricing fees without an order charged in the period: declined, risk-declined and voided authorizations, chargeback reversal fees, boarding, the monthly fee and minimum, PCI non-validation"
                    },
                    "income_cents": {
                        "type": "integer",
                        "description": "sale fees + refund fees + chargeback fees + account fees"
                    },
                    "reserve_held_cents": {
                        "type": "integer",
                        "description": "the reserve held at capture"
                    },
                    "reserve_released_cents": {
                        "type": "integer",
                        "description": "the reserve released in the period; 0 by card brand or fee rule (a release carries no card)"
                    }
                },
                "required": [
                    "key",
                    "label",
                    "orders",
                    "gross_cents",
                    "refunded_cents",
                    "net_volume_cents",
                    "chargebacks",
                    "chargebacks_cents",
                    "chargeback_fees_cents",
                    "sale_fees_cents",
                    "refund_fees_cents",
                    "account_fees_cents",
                    "income_cents",
                    "reserve_held_cents",
                    "reserve_released_cents"
                ]
            },
            "ReportingPayoutReconciliation": {
                "examples": [
                    {
                        "payout_id": "pay_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "payout_cents": 2900,
                        "rows_net_cents": 2900,
                        "transactions": [
                            {
                                "id": "bt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "category": "sale",
                                "gross_cents": 2900,
                                "tax_cents": 239,
                                "fee_cents": 145,
                                "reserve_cents": 0,
                                "net_cents": 2900,
                                "currency": "USD",
                                "occurred_at": "2026-10-21T14:05:00.000Z",
                                "available_on": "2026-10-21T14:05:00.000Z",
                                "available_at": "2026-10-21T14:05:00.000Z",
                                "source_type": "order",
                                "source_id": "text",
                                "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "entry_id": "led_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "payout_id": "pay_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "statement_id": "stm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                                "memo": "text"
                            }
                        ]
                    }
                ],
                "type": "object",
                "required": [
                    "payout_id",
                    "merchant_id",
                    "payout_cents",
                    "rows_net_cents",
                    "transactions"
                ],
                "properties": {
                    "payout_id": {
                        "type": "string"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "payout_cents": {
                        "type": "integer"
                    },
                    "rows_net_cents": {
                        "type": "integer",
                        "description": "sum of the rows' net; equals payout_cents"
                    },
                    "transactions": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ReportingBalanceTransactionRow"
                        }
                    }
                }
            },
            "RiskDispute": {
                "examples": [
                    {
                        "id": "dsp_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "statement_id": null,
                        "paid_out_at": null,
                        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
                        "source": "chargeback",
                        "reason_code": "13.1",
                        "reason_label": "Merchandise or services not received",
                        "amount_cents": 2900,
                        "fee_cents": 145,
                        "status": "open",
                        "outcome": "text",
                        "evidence_due_at": "2026-10-21T14:05:00.000Z",
                        "opened_at": "2026-10-21T14:05:00.000Z",
                        "closed_at": "2026-10-21T14:05:00.000Z",
                        "settled_at": "2026-10-21T14:05:00.000Z",
                        "version": 1,
                        "evidence": [
                            {
                                "type": "card",
                                "file_id": "text",
                                "file_name": "text",
                                "content_type": "card",
                                "size_bytes": 1,
                                "object_path": "text",
                                "note": "text",
                                "added_by": "text",
                                "created_at": "2026-10-21T14:05:00.000Z"
                            }
                        ]
                    }
                ],
                "type": "object",
                "required": [
                    "id",
                    "merchant_id",
                    "charge_id",
                    "source",
                    "amount_cents",
                    "fee_cents",
                    "status",
                    "opened_at",
                    "version",
                    "evidence"
                ],
                "properties": {
                    "assigned_to": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The staff member who took it (usr_); on the staff routes only"
                    },
                    "statement_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The statement that pays it (Ledger's stm_), null until one lists it"
                    },
                    "paid_out_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When that statement's payout was sent; null until then or after the bank returned it"
                    },
                    "id": {
                        "type": "string"
                    },
                    "merchant_id": {
                        "type": "string"
                    },
                    "charge_id": {
                        "type": "string"
                    },
                    "order_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "source": {
                        "type": "string",
                        "description": "Chargeback only (the RDR and Ethoca recorders were removed)",
                        "enum": [
                            "chargeback"
                        ]
                    },
                    "provider_case_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The processor's chargeback id (NMI's chargebacks[].id, or the case id staff typed); one dispute per id"
                    },
                    "reason_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reason_label": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "the card network's name for reason_code (\"Merchandise or services not received\" for 13.1); null for a code the platform has no name for"
                    },
                    "fraud": {
                        "type": "boolean",
                        "description": "A network fraud reason code, or staff override"
                    },
                    "currency": {
                        "type": "string",
                        "pattern": "^[A-Z]{3}$",
                        "description": "The currency of the amounts, the disputed charge's"
                    },
                    "amount_cents": {
                        "type": "integer"
                    },
                    "fee_cents": {
                        "type": "integer",
                        "description": "the merchant's chargeback fee"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "open",
                            "evidence_submitted",
                            "won",
                            "lost",
                            "accepted",
                            "expired"
                        ]
                    },
                    "outcome": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "evidence_due_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "the network window: evidence must reach the processor by then"
                    },
                    "merchant_evidence_due_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "The merchant's deadline, 3 business days (Mon–Fri in the tenant's business zone) after the dispute opened; null on older disputes that have none"
                    },
                    "over_disputed": {
                        "type": "boolean",
                        "description": "The open and lost disputes of the charge add up to more than the charge amount (staff check it against Netevia)"
                    },
                    "opened_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "closed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "settled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the processor took the chargeback out of trust (Ledger posted its gross settlement)"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "evidence": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "string"
                                },
                                "file_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "the stored file (fil_), downloadable by staff at /staff/disputes/{dispute}/evidence/{file_id}; null for older evidence recorded as a path"
                                },
                                "file_name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "content_type": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "size_bytes": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "object_path": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "only on older evidence recorded as a path"
                                },
                                "note": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "added_by": {
                                    "type": "string"
                                },
                                "created_at": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    }
                }
            },
            "Timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "ISO-8601 UTC with milliseconds and a Z (2026-10-09T12:00:00.000Z)."
            }
        },
        "parameters": {
            "from": {
                "name": "from",
                "in": "query",
                "description": "First day of the date filter (YYYY-MM-DD, inclusive), in the viewer's time zone (see X-Timezone); an ISO-8601 date-time is taken as an exact instant. The column filtered is the operation's `x-kit-date`; a list without one answers 422. Ignored when `range` is given.",
                "schema": {
                    "type": "string"
                }
            },
            "page": {
                "name": "page",
                "in": "query",
                "description": "1-based page number. Lists with `x-kit-cursor: true` number pages only for their first 10 000 rows (422 page_out_of_range past that; follow the cursor).",
                "schema": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 1
                }
            },
            "perPage": {
                "name": "per_page",
                "in": "query",
                "description": "Rows per page, 1 to 100 (default 50; the views offer 25, 50 and 100).",
                "schema": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 50
                }
            },
            "range": {
                "name": "range",
                "in": "query",
                "description": "A rolling date-range preset, resolved to days in the viewer's time zone at request time (wins over from/to).",
                "schema": {
                    "$ref": "#/components/schemas/RangePreset"
                }
            },
            "sort": {
                "name": "sort",
                "in": "query",
                "description": "Up to three comma-separated sort keys, each prefixed with `-` for descending (`-created_at,name`). The keys a list accepts are its operation's `x-kit-sorts`; any other key is 422 invalid_sort (the error carries `allowed`), more than three is 422 too_many_sorts. Rows with no value sort last; the list's id breaks ties. Default: the operation's `x-kit-default-sort`.",
                "schema": {
                    "type": "string",
                    "pattern": "^-?[a-z][a-z0-9_.]*(,-?[a-z][a-z0-9_.]*){0,2}$"
                }
            },
            "timezone": {
                "name": "X-Timezone",
                "in": "header",
                "description": "IANA zone the date filters are read in (America/New_York). Absent or unknown: the token's `tz` claim (the merchant's business zone on merchant and merchant_api tokens, the person's own zone on staff tokens), else UTC. The dashboard sends the merchant's zone, the staff apps the staff member's.",
                "schema": {
                    "type": "string"
                }
            },
            "to": {
                "name": "to",
                "in": "query",
                "description": "Last day of the date filter (YYYY-MM-DD, inclusive) in the viewer's time zone, or an exact ISO-8601 instant.",
                "schema": {
                    "type": "string"
                }
            }
        },
        "headers": {
            "Link": {
                "description": "RFC 8288 links built from the request's own query: rel=\"first\", rel=\"prev\", rel=\"next\" and rel=\"last\" with `page`; on cursor lists rel=\"next\" carries `cursor` once numbered pages end (or when the request used a cursor). rel=\"last\" is omitted when the total is capped.",
                "schema": {
                    "type": "string"
                }
            },
            "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                    "type": "integer"
                }
            },
            "X-Total-Count": {
                "description": "Rows matching the filters across all pages (was the page size before). On lists with `x-kit-cursor: true` the count stops at 10 000 and X-Total-Capped is sent.",
                "schema": {
                    "type": "integer"
                }
            }
        },
        "responses": {
            "Conflict": {
                "description": "The version does not match or the idempotency key was reused with another body (key version_conflict, idempotency_conflict).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "Error": {
                "description": "The standard error body.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "Forbidden": {
                "description": "The token lacks the permission or scope (key permission_denied with `permission`, scope_denied).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "NotFound": {
                "description": "Nothing the caller may see at that id (key not_found).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "Unauthorized": {
                "description": "No token, or an invalid, expired or wrong-audience token (key unauthenticated, token_invalid, token_expired, wrong_audience, wrong_env).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "Validation": {
                "description": "One error per field (key validation).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "apiKey": {
                "type": "http",
                "scheme": "bearer",
                "description": "Your API key (`mor_live_…` or `mor_test_…`) as the bearer token. A test key works on the sandbox base URL only, a live key on the live one."
            }
        }
    }
}
