{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentaos-ai/json-schema/agentaos-ai-transaction-list-response-schema.json",
  "title": "TransactionListResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentaos-ai-transactions-api-openapi.yml#/components/schemas/TransactionListResponse",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Transaction"
      }
    },
    "total": {
      "type": "integer"
    },
    "hasMore": {
      "type": "boolean"
    }
  },
  "required": [
    "items",
    "total",
    "hasMore"
  ],
  "$defs": {
    "Transaction": {
      "type": "object",
      "additionalProperties": true,
      "description": "`status` is always `confirmed`. Where the sale's money stands is `mor_status`, with `disputed_at`, `charged_back_at` and `refunded_at` saying when. Any other field not listed here is internal: treat it as forward-compatible and safe to ignore.",
      "properties": {
        "mor_status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "held",
            "available",
            "paid_out",
            "refunded",
            "disputed",
            "charged_back",
            null
          ],
          "description": "Where the sale's money stands: `held` until the hold period ends, `available` when payable, `paid_out` once paid to you, `refunded` after a refund, `disputed` while a dispute is open, `charged_back` when a dispute was lost. A won dispute returns the sale to `refunded` if it was refunded, `paid_out` if it had been paid to you, and `available` otherwise. `null` for a sale that is not a card or bank-transfer sale. A lost dispute and a refund send no webhook; this field is where you see them."
        },
        "disputed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When a dispute was opened on this sale. It stays set after the dispute is won. Null if the sale was never disputed."
        },
        "dispute_won_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When a dispute on this sale was won, or a bank inquiry about it closed without a chargeback. Null otherwise."
        },
        "charged_back_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When a dispute on this sale was lost and the money reversed. Null otherwise."
        },
        "refunded_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the sale was refunded. Null otherwise."
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "direction": {
          "type": "string",
          "enum": [
            "inbound",
            "outbound"
          ]
        },
        "amount": {
          "type": "number",
          "description": "Presentment amount, currency units, in payment_token/settlement_token."
        },
        "payment_token": {
          "type": "string",
          "description": "What the buyer paid with, e.g. EURC, card."
        },
        "settlement_token": {
          "type": "string",
          "description": "What settled to your balance."
        },
        "status": {
          "type": "string",
          "const": "confirmed",
          "description": "Always confirmed on this endpoint."
        },
        "payment_method": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "card",
            "sepa",
            "bank_transfer",
            "bridge",
            "wallet",
            null
          ],
          "description": "How the buyer actually paid, independent of network."
        },
        "payer_type": {
          "type": "string",
          "enum": [
            "human",
            "agent"
          ]
        },
        "payer_address": {
          "type": [
            "string",
            "null"
          ],
          "description": "On-chain payer wallet. null for card/bank rails."
        },
        "tx_hash": {
          "type": [
            "string",
            "null"
          ],
          "description": "null for card/bank rails, use vendor_reference there instead."
        },
        "vendor_reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "Off-chain audit reference (card-processor payment reference, bank reference). Mutually exclusive with tx_hash."
        },
        "network": {
          "type": "string",
          "description": "`card` for a card payment, `bank_transfer` for a bank transfer, or a CAIP-2 network ID such as `eip155:8453` for a stablecoin payment."
        },
        "seller_of_record": {
          "type": "string",
          "enum": [
            "aristokrates_ou",
            "merchant"
          ],
          "description": "aristokrates_ou for a Merchant of Record card sale, merchant for everything else."
        },
        "invoice_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "The matching invoice, joined for convenience. null for outbound rows."
        },
        "payment_link_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "session_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "money": {
          "$ref": "#/$defs/TransactionMoney"
        }
      },
      "required": [
        "id",
        "direction",
        "amount",
        "payment_token",
        "settlement_token",
        "status",
        "payment_method",
        "payer_type",
        "payer_address",
        "tx_hash",
        "vendor_reference",
        "network",
        "seller_of_record",
        "invoice_id",
        "payment_link_id",
        "session_id",
        "description",
        "created_at",
        "money"
      ]
    },
    "TransactionMoney": {
      "type": "object",
      "description": "Render-ready breakdown, computed server-side so you never sum this yourself. All values integer minor units in money.currency.",
      "properties": {
        "currency": {
          "type": "string",
          "description": "ISO 4217, upper-case."
        },
        "grossMinor": {
          "type": "integer",
          "description": "Your ex-VAT sale base (feeMinor + netMinor). The buyer paid grossMinor + vatMinor."
        },
        "feeMinor": {
          "type": "integer",
          "description": "AgentaOS's commission alone, 0 when none. Never includes VAT."
        },
        "vatMinor": {
          "type": "integer",
          "description": "Destination VAT AgentaOS collected and remits as Merchant of Record. On top of grossMinor, never your revenue."
        },
        "netMinor": {
          "type": "integer",
          "description": "What actually reaches your balance (grossMinor - feeMinor)."
        }
      },
      "required": [
        "currency",
        "grossMinor",
        "feeMinor",
        "vatMinor",
        "netMinor"
      ]
    }
  }
}