{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/payments-ai/json-schema/payments-ai-public-api-transaction-list-response-schema.json",
  "title": "PublicApiTransactionListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/payments-ai-transactions-api-openapi.yml#/components/schemas/PublicApiTransactionListResponse",
  "type": "object",
  "required": [
    "data",
    "meta"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicApiTransactionListItem"
      }
    },
    "meta": {
      "$ref": "#/$defs/PaginationMeta"
    }
  },
  "$defs": {
    "PaginationMeta": {
      "type": "object",
      "required": [
        "totalRecords",
        "totalPages",
        "currentPage",
        "limit"
      ],
      "properties": {
        "totalRecords": {
          "type": "integer",
          "format": "int32"
        },
        "totalPages": {
          "type": "integer",
          "format": "int32"
        },
        "currentPage": {
          "type": "integer",
          "format": "int32"
        },
        "limit": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "PublicApiTransactionListItem": {
      "type": "object",
      "required": [
        "id",
        "transactionId",
        "date",
        "amountGross",
        "currencyGross",
        "amountIsProvisional",
        "orderId"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Canonical merchant-facing transaction id (internal UUID v7)."
        },
        "transactionId": {
          "type": "string",
          "description": "Deprecated Whop payment id (`pay_…`). Removed on 2027-01-15.",
          "deprecated": true
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "method": {
          "$ref": "#/$defs/PublicApiTransactionMethod"
        },
        "amountGross": {
          "$ref": "#/$defs/SharedTypes.MoneyAmountValue"
        },
        "currencyGross": {
          "$ref": "#/$defs/SharedTypes.CurrencyCode"
        },
        "amountIsProvisional": {
          "type": "boolean",
          "description": "True while `amountGross` is provisional: the payment provider sent a refund event before the payment's success event, without the sale total or currency, so the amount is a lower bound or the currency a placeholder. Becomes `false` when the payment succeeds and its final amount replaces the provisional one."
        },
        "amountNet": {
          "$ref": "#/$defs/SharedTypes.MoneyAmountValue"
        },
        "currencyNet": {
          "$ref": "#/$defs/SharedTypes.CurrencyCode"
        },
        "status": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "errorReason": {
          "type": "string"
        },
        "orderId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Order this payment paid for; `null` when the payment is not tied to an order."
        }
      }
    },
    "PublicApiTransactionMethod": {
      "type": "object",
      "properties": {
        "scheme": {
          "type": "string"
        },
        "lastFour": {
          "type": "string"
        }
      }
    },
    "SharedTypes.CurrencyCode": {
      "type": "string",
      "pattern": "^[a-z]{3}$",
      "description": "ISO 4217 currency code. Always lowercase (e.g. 'usd', 'eur')."
    },
    "SharedTypes.MoneyAmountValue": {
      "type": "number",
      "format": "decimal",
      "description": "Decimal money amount for financial values."
    }
  }
}