{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendmux-ai/json-schema/sendmux-ai-transaction-cursor-list-response-schema.json",
  "title": "TransactionCursorListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendmux-ai-billing-api-openapi.yml#/components/schemas/TransactionCursorListResponse",
  "allOf": [
    {
      "$ref": "#/$defs/SuccessEnvelope"
    },
    {
      "properties": {
        "data": {
          "items": {
            "$ref": "#/$defs/Transaction"
          },
          "type": "array"
        },
        "meta": {
          "$ref": "#/$defs/ResponseMeta"
        },
        "pagination": {
          "$ref": "#/$defs/CursorPagination"
        }
      },
      "required": [
        "data",
        "pagination"
      ],
      "type": "object"
    }
  ],
  "unevaluatedProperties": false,
  "$defs": {
    "CursorPagination": {
      "additionalProperties": false,
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "required": [
        "has_more"
      ],
      "type": "object"
    },
    "ResponseMeta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "SuccessEnvelope": {
      "properties": {
        "meta": {
          "additionalProperties": {},
          "properties": {},
          "type": "object"
        },
        "ok": {
          "enum": [
            true
          ],
          "type": "boolean"
        }
      },
      "required": [
        "ok",
        "meta"
      ],
      "type": "object"
    },
    "Transaction": {
      "additionalProperties": false,
      "properties": {
        "amount": {
          "description": "DECIMAL(19,6) amount",
          "type": "string"
        },
        "balance_after": {
          "type": [
            "string",
            "null"
          ]
        },
        "balance_before": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "description": "ISO 8601 timestamp",
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "id": {
          "description": "Transaction public ID",
          "type": "string"
        },
        "quantity": {
          "description": "Item count (for USAGE transactions)",
          "type": [
            "number",
            "null"
          ]
        },
        "type": {
          "enum": [
            "PURCHASE",
            "USAGE",
            "AUTO_TOPUP",
            "REFUND",
            "ADJUSTMENT"
          ],
          "type": "string"
        }
      },
      "required": [
        "id",
        "amount",
        "type",
        "description",
        "quantity",
        "balance_before",
        "balance_after",
        "created_at"
      ],
      "type": "object"
    }
  }
}