{
  "openapi": "3.1.0",
  "info": {
    "title": "Partner API",
    "version": "1.0.0",
    "description": "Resell data eSIMs and +372 numbers under your own brand. Prepaid EUR balance, idempotent writes, signed webhooks. Full guide: /docs"
  },
  "servers": [{ "url": "https://api.simsup.net" }],
  "security": [{ "bearer": [] }],
  "tags": [
    { "name": "Catalog" }, { "name": "Balance" }, { "name": "Deposits" }, { "name": "Orders" },
    { "name": "eSIMs" }, { "name": "Lines" }, { "name": "Events" }, { "name": "Statements" }
  ],
  "paths": {
    "/v1/catalog": {
      "get": {
        "tags": ["Catalog"], "operationId": "listCatalog", "summary": "List what you can buy, at your price",
        "parameters": [
          { "name": "country", "in": "query", "schema": { "type": "string", "pattern": "^[A-Za-z]{2}$" }, "description": "ISO 3166-1 alpha-2; returns SKUs covering it" },
          { "name": "type", "in": "query", "schema": { "type": "string", "enum": ["data", "number"] } }
        ],
        "responses": { "200": { "description": "SKUs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SKUList" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/catalog/{sku}": {
      "get": {
        "tags": ["Catalog"], "operationId": "getSKU", "summary": "Get one SKU",
        "parameters": [{ "name": "sku", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "SKU", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SKU" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/balance": {
      "get": {
        "tags": ["Balance"], "operationId": "getBalance", "summary": "Your balance and today's spend",
        "responses": { "200": { "description": "Balance", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Balance" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/deposits": {
      "post": {
        "tags": ["Deposits"], "operationId": "createDeposit", "summary": "Add funds (BTC or XMR)",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DepositRequest" } } } },
        "responses": {
          "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Deposit" } } } },
          "200": { "$ref": "#/components/responses/ReplayDeposit" },
          "default": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/v1/deposits/{id}": {
      "get": {
        "tags": ["Deposits"], "operationId": "getDeposit", "summary": "Get a deposit",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "responses": { "200": { "description": "Deposit", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Deposit" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/orders": {
      "post": {
        "tags": ["Orders"], "operationId": "createOrder", "summary": "Buy a SKU",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderRequest" } } } },
        "responses": {
          "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } } },
          "200": { "$ref": "#/components/responses/ReplayOrder" },
          "default": { "$ref": "#/components/responses/Error" }
        }
      },
      "get": {
        "tags": ["Orders"], "operationId": "listOrders", "summary": "List orders, newest first",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/After" }, { "name": "status", "in": "query", "schema": { "$ref": "#/components/schemas/OrderStatus" } }],
        "responses": { "200": { "description": "Orders", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderList" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/orders/{id}": {
      "get": {
        "tags": ["Orders"], "operationId": "getOrder", "summary": "Get an order and what it delivered",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "responses": { "200": { "description": "Order", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/esims": {
      "get": {
        "tags": ["eSIMs"], "operationId": "listESIMs", "summary": "List data eSIMs, newest first",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/After" }, { "name": "status", "in": "query", "schema": { "type": "string", "enum": ["provisioning", "ready", "cancelled", "failed"] } }],
        "responses": { "200": { "description": "eSIMs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ESIMList" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/esims/{id}": {
      "get": {
        "tags": ["eSIMs"], "operationId": "getESIM", "summary": "Get an eSIM with live usage",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "responses": { "200": { "description": "eSIM", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ESIM" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/esims/{id}/qr.png": {
      "get": {
        "tags": ["eSIMs"], "operationId": "getESIMQR", "summary": "Unbranded QR of the activation code",
        "parameters": [{ "$ref": "#/components/parameters/ID" }, { "$ref": "#/components/parameters/QRSize" }],
        "responses": { "200": { "description": "PNG", "content": { "image/png": {} } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/esims/{id}/topups": {
      "get": {
        "tags": ["eSIMs"], "operationId": "listTopups", "summary": "Ways to add data to this eSIM",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "responses": { "200": { "description": "Top-up options", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopupList" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      },
      "post": {
        "tags": ["eSIMs"], "operationId": "createTopup", "summary": "Buy and apply a top-up",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopupRequest" } } } },
        "responses": {
          "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } } },
          "200": { "$ref": "#/components/responses/ReplayOrder" },
          "default": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/v1/esims/{id}/cancel": {
      "post": {
        "tags": ["eSIMs"], "operationId": "cancelESIM", "summary": "Cancel an uninstalled eSIM for a refund (within 14 days of purchase)",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "responses": { "200": { "description": "Cancelled eSIM", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ESIM" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/lines": {
      "get": {
        "tags": ["Lines"], "operationId": "listLines", "summary": "List numbers, newest first",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/After" }],
        "responses": { "200": { "description": "Lines", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LineList" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/lines/{id}": {
      "get": {
        "tags": ["Lines"], "operationId": "getLine", "summary": "Get a number",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "responses": { "200": { "description": "Line", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Line" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/lines/{id}/qr.png": {
      "get": {
        "tags": ["Lines"], "operationId": "getLineQR", "summary": "Unbranded QR of the line's activation code",
        "parameters": [{ "$ref": "#/components/parameters/ID" }, { "$ref": "#/components/parameters/QRSize" }],
        "responses": { "200": { "description": "PNG", "content": { "image/png": {} } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/lines/{id}/credit": {
      "post": {
        "tags": ["Lines"], "operationId": "creditLine", "summary": "Add calling/SMS/data balance to a line",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditRequest" } } } },
        "responses": {
          "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } } },
          "200": { "$ref": "#/components/responses/ReplayOrder" },
          "default": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/v1/lines/{id}/renew": {
      "post": {
        "tags": ["Lines"], "operationId": "renewLine", "summary": "Add a year to a line",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeyOnlyRequest" } } } },
        "responses": {
          "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } } },
          "200": { "$ref": "#/components/responses/ReplayOrder" },
          "default": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/v1/lines/{id}/restore": {
      "post": {
        "tags": ["Lines"], "operationId": "restoreLine", "summary": "Buy back a reclaimed line",
        "parameters": [{ "$ref": "#/components/parameters/ID" }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeyOnlyRequest" } } } },
        "responses": {
          "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } } },
          "200": { "$ref": "#/components/responses/ReplayOrder" },
          "default": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/v1/events": {
      "get": {
        "tags": ["Events"], "operationId": "listEvents", "summary": "Events oldest first, after a cursor",
        "parameters": [{ "name": "after", "in": "query", "schema": { "type": "string", "example": "evt_120" } }, { "$ref": "#/components/parameters/Limit" }],
        "responses": { "200": { "description": "Events", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventList" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/webhook": {
      "get": {
        "tags": ["Events"], "operationId": "getWebhook", "summary": "Your webhook URL",
        "responses": { "200": { "description": "Endpoint", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      },
      "put": {
        "tags": ["Events"], "operationId": "putWebhook", "summary": "Set the webhook URL and rotate its signing secret",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["url"], "properties": { "url": { "type": "string", "description": "https URL on port 443, shared by live and test events; empty string turns webhooks off" } } } } } },
        "responses": { "200": { "description": "Endpoint with the new secret (shown once)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } }, "default": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/v1/statements/{month}": {
      "get": {
        "tags": ["Statements"], "operationId": "getStatement", "summary": "Monthly ledger",
        "parameters": [
          { "name": "month", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^\\d{4}-\\d{2}$", "example": "2026-11" } },
          { "name": "format", "in": "query", "schema": { "type": "string", "enum": ["json", "csv"] } }
        ],
        "responses": {
          "200": { "description": "Statement", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Statement" } }, "text/csv": {} } },
          "default": { "$ref": "#/components/responses/Error" }
        }
      }
    }
  },
  "components": {
    "securitySchemes": { "bearer": { "type": "http", "scheme": "bearer", "description": "sk_live_... or sk_test_..." } },
    "parameters": {
      "ID": { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } },
      "Limit": { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } },
      "After": { "name": "after", "in": "query", "description": "next_cursor from the previous page", "schema": { "type": "string" } },
      "QRSize": { "name": "size", "in": "query", "schema": { "type": "integer", "minimum": 128, "maximum": 1024, "default": 512 } }
    },
    "responses": {
      "Error": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "ReplayOrder": { "description": "Idempotent replay of an earlier request (header Idempotent-Replayed: true)", "headers": { "Idempotent-Replayed": { "schema": { "type": "string", "enum": ["true"] } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Order" } } } },
      "ReplayDeposit": { "description": "Idempotent replay", "headers": { "Idempotent-Replayed": { "schema": { "type": "string", "enum": ["true"] } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Deposit" } } } }
    },
    "schemas": {
      "IdempotencyKey": { "type": "string", "minLength": 16, "maxLength": 128, "description": "Unique per logical request, e.g. a UUID. Reusing it returns the original result." },
      "Error": {
        "type": "object", "required": ["error"],
        "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": {
          "code": { "type": "string", "enum": ["unauthorized", "forbidden", "partner_suspended", "not_found", "invalid_request", "idempotency_mismatch", "insufficient_balance", "daily_spend_cap_reached", "daily_line_cap_reached", "sku_unavailable", "out_of_stock", "not_cancellable", "not_renewable", "not_restorable", "amount_not_allowed", "topup_unavailable", "rate_limited", "internal_error"] },
          "message": { "type": "string" }, "request_id": { "type": "string" } } } }
      },
      "SKU": {
        "type": "object",
        "properties": {
          "object": { "const": "sku" }, "id": { "type": "string", "example": "fr-5gb-30d-a1b2c3" },
          "type": { "type": "string", "enum": ["data", "number"] }, "name": { "type": "string" },
          "location": { "type": "string" }, "countries": { "type": "array", "items": { "type": "string" } },
          "data_bytes": { "type": "integer" }, "days": { "type": "integer" },
          "daily": { "type": "boolean", "description": "Sold by the day: orders carry days and price_cents is per day" },
          "fup_policy": { "type": "string" }, "topup": { "type": "boolean" },
          "price_cents": { "type": "integer", "description": "Your price" }, "retail_cents": { "type": "integer", "description": "Our retail, for reference" },
          "currency": { "const": "EUR" }
        }
      },
      "SKUList": { "type": "object", "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/SKU" } }, "has_more": { "type": "boolean" } } },
      "Balance": {
        "type": "object",
        "properties": {
          "object": { "const": "balance" }, "balance_cents": { "type": "integer" }, "spent_today_cents": { "type": "integer" },
          "daily_spend_cap_cents": { "type": "integer" }, "available_today_cents": { "type": "integer" },
          "low_balance_threshold_cents": { "type": "integer" }, "currency": { "const": "EUR" }, "livemode": { "type": "boolean" }
        }
      },
      "DepositRequest": {
        "type": "object", "additionalProperties": false, "required": ["amount_cents", "idempotency_key"],
        "properties": { "amount_cents": { "type": "integer", "minimum": 10000, "maximum": 1000000 }, "idempotency_key": { "$ref": "#/components/schemas/IdempotencyKey" } }
      },
      "Deposit": {
        "type": "object",
        "properties": {
          "object": { "const": "deposit" }, "id": { "type": "string", "example": "dep_..." },
          "status": { "type": "string", "enum": ["pending", "settled", "expired"] }, "amount_cents": { "type": "integer" },
          "currency": { "const": "EUR" },
          "payment_methods": { "type": "array", "description": "Present while a live deposit is pending: send amount of coin to address", "items": { "type": "object", "properties": {
            "coin": { "type": "string", "enum": ["BTC", "XMR"] }, "address": { "type": "string" },
            "amount": { "type": "string", "description": "Decimal, in the coin's own unit" },
            "due": { "type": "string", "description": "Still owed; below amount after an underpayment" },
            "uri": { "type": "string", "example": "monero:8A...?tx_amount=1.25" } } } },
          "expires_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" },
          "settled_at": { "type": "string", "format": "date-time" }, "livemode": { "type": "boolean" }
        }
      },
      "OrderRequest": {
        "type": "object", "additionalProperties": false, "required": ["sku", "idempotency_key"],
        "properties": {
          "sku": { "type": "string" }, "days": { "type": "integer", "minimum": 1, "maximum": 365, "description": "Required for daily SKUs, forbidden otherwise" },
          "reference": { "type": "string", "maxLength": 100, "description": "Your own order id, echoed back and in events" },
          "idempotency_key": { "$ref": "#/components/schemas/IdempotencyKey" }
        }
      },
      "OrderStatus": { "type": "string", "enum": ["placing", "provisioning", "ready", "failed", "needs_review", "cancelled"] },
      "Order": {
        "type": "object",
        "properties": {
          "object": { "const": "order" }, "id": { "type": "string", "example": "po_..." },
          "kind": { "type": "string", "enum": ["data", "data_topup", "number", "number_renewal", "number_credit", "number_restore"] },
          "status": { "$ref": "#/components/schemas/OrderStatus" }, "status_detail": { "type": "string" },
          "sku": { "type": "string" }, "days": { "type": "integer" }, "price_cents": { "type": "integer" },
          "amount_cents": { "type": "integer", "description": "Face value of a line credit" },
          "currency": { "const": "EUR" }, "reference": { "type": "string" },
          "esim_id": { "type": "string" }, "line_id": { "type": "string" },
          "created_at": { "type": "string", "format": "date-time" }, "ready_at": { "type": "string", "format": "date-time" },
          "livemode": { "type": "boolean" },
          "esim": { "$ref": "#/components/schemas/ESIM" }, "line": { "$ref": "#/components/schemas/Line" }
        }
      },
      "OrderList": { "type": "object", "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Order" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": "string" } } },
      "ESIM": {
        "type": "object",
        "properties": {
          "object": { "const": "esim" }, "id": { "type": "string", "example": "esim_..." }, "order_id": { "type": "string" },
          "sku": { "type": "string" }, "status": { "type": "string", "enum": ["provisioning", "ready", "cancelled", "failed"] },
          "iccid": { "type": "string" }, "activation_code": { "type": "string", "example": "LPA:1$smdp.example$ABC123" },
          "smdp_address": { "type": "string" }, "matching_id": { "type": "string" }, "qr_code_url": { "type": "string" },
          "installed": { "type": "boolean" }, "data_total_bytes": { "type": "integer" }, "data_used_bytes": { "type": "integer" },
          "data_remaining_bytes": { "type": "integer" }, "activated_at": { "type": "string", "format": "date-time" },
          "expires_at": { "type": "string", "format": "date-time" }, "cancelled_at": { "type": "string", "format": "date-time" },
          "created_at": { "type": "string", "format": "date-time" }, "livemode": { "type": "boolean" }
        }
      },
      "ESIMList": { "type": "object", "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/ESIM" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": "string" } } },
      "TopupOption": {
        "type": "object",
        "properties": {
          "object": { "const": "topup_option" }, "id": { "type": "string", "example": "tu_9f2c1a..." },
          "name": { "type": "string" }, "data_bytes": { "type": "integer" }, "days": { "type": "integer" },
          "daily": { "type": "boolean", "description": "Extends the plan by days; price_cents is per day" },
          "price_cents": { "type": "integer" }, "retail_cents": { "type": "integer" }, "currency": { "const": "EUR" }
        }
      },
      "TopupList": { "type": "object", "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/TopupOption" } }, "has_more": { "type": "boolean" } } },
      "TopupRequest": {
        "type": "object", "additionalProperties": false, "required": ["option", "idempotency_key"],
        "properties": { "option": { "type": "string" }, "days": { "type": "integer", "minimum": 1, "maximum": 365 }, "idempotency_key": { "$ref": "#/components/schemas/IdempotencyKey" } }
      },
      "Line": {
        "type": "object",
        "properties": {
          "object": { "const": "line" }, "id": { "type": "string", "example": "line_..." }, "order_id": { "type": "string" },
          "msisdn": { "type": "string", "example": "+37255512345" },
          "state": { "type": "string", "enum": ["active", "expiring_soon", "grace", "lapsed", "reclaimed", "released"] },
          "iccid": { "type": "string" }, "activation_code": { "type": "string" }, "smdp_address": { "type": "string" },
          "matching_id": { "type": "string" }, "qr_code_url": { "type": "string" }, "balance_cents": { "type": "integer" },
          "currency": { "const": "EUR" }, "valid_until": { "type": "string", "format": "date-time" },
          "grace_until": { "type": "string", "format": "date-time" }, "restore_until": { "type": "string", "format": "date-time" },
          "assigned_at": { "type": "string", "format": "date-time" }, "released_at": { "type": "string", "format": "date-time" },
          "livemode": { "type": "boolean" }
        }
      },
      "LineList": { "type": "object", "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Line" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": "string" } } },
      "CreditRequest": {
        "type": "object", "additionalProperties": false, "required": ["amount_cents", "idempotency_key"],
        "properties": { "amount_cents": { "type": "integer", "minimum": 100, "maximum": 20000, "description": "Face value that lands on the line" }, "idempotency_key": { "$ref": "#/components/schemas/IdempotencyKey" } }
      },
      "KeyOnlyRequest": {
        "type": "object", "additionalProperties": false, "required": ["idempotency_key"],
        "properties": { "idempotency_key": { "$ref": "#/components/schemas/IdempotencyKey" } }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "evt_120" },
          "type": { "type": "string", "enum": ["order.ready", "order.failed", "topup.applied", "topup.failed", "esim.cancelled", "balance.low", "deposit.settled", "deposit.expired", "line.expiring", "line.lapsed", "line.reclaimed", "line.restored", "line.released", "line.replaced", "line.renewed", "line.credited"] },
          "created_at": { "type": "string", "format": "date-time" }, "livemode": { "type": "boolean" },
          "data": { "type": "object", "description": "Ids and status of the affected resource; fetch it for full state" }
        }
      },
      "EventList": { "type": "object", "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Event" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": "string" } } },
      "WebhookEndpoint": {
        "type": "object",
        "properties": { "object": { "const": "webhook_endpoint" }, "url": { "type": "string" }, "secret": { "type": "string", "description": "Only in the PUT response" }, "events": { "type": "array", "items": { "type": "string" } } }
      },
      "Statement": {
        "type": "object",
        "properties": {
          "object": { "const": "statement" }, "month": { "type": "string" }, "currency": { "const": "EUR" },
          "opening_cents": { "type": "integer" }, "closing_cents": { "type": "integer" }, "deposits_cents": { "type": "integer" },
          "spent_cents": { "type": "integer" }, "credited_cents": { "type": "integer" }, "adjusted_cents": { "type": "integer" },
          "entries": { "type": "array", "items": { "type": "object", "properties": {
            "id": { "type": "integer" }, "at": { "type": "string", "format": "date-time" },
            "kind": { "type": "string", "enum": ["deposit", "order_debit", "order_refund", "failure_credit", "adjustment"] },
            "amount_cents": { "type": "integer" }, "balance_after_cents": { "type": "integer" },
            "ref_type": { "type": "string" }, "ref_id": { "type": "string" }, "note": { "type": "string" } } } },
          "livemode": { "type": "boolean" }
        }
      }
    }
  }
}
