{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rumoro-dev/json-schema/rumoro-dev-invoice-list-schema.json",
  "title": "InvoiceList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rumoro-dev-billing-api-openapi.yml#/components/schemas/InvoiceList",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Pass it to GET /v1/billing/invoices/{id}/url for the receipt."
          },
          "createdAt": {
            "type": "string",
            "description": "Order date and time (ISO 8601)."
          },
          "status": {
            "type": "string",
            "description": "Polar's status for the order, such as paid or refunded."
          },
          "paid": {
            "type": "boolean",
            "description": "True if the order is paid."
          },
          "totalAmount": {
            "type": "integer",
            "description": "The amount charged including tax, in the smallest unit of `currency`."
          },
          "currency": {
            "type": "string",
            "description": "The order's currency as an ISO 4217 code, such as usd."
          },
          "billingReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Polar's reason for the order, such as purchase or subscription_cycle. Null when Polar gives none."
          }
        },
        "required": [
          "id",
          "createdAt",
          "status",
          "paid",
          "totalAmount",
          "currency",
          "billingReason"
        ]
      },
      "description": "Most recent paid orders first. None until the first top-up."
    }
  },
  "required": [
    "data"
  ]
}