{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flint-network/json-schema/flint-network-x402-scan-request-schema.json",
  "title": "X402ScanRequest",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flint-network-openapi.json#/components/schemas/X402ScanRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "nonce",
    "timestamp",
    "transaction"
  ],
  "properties": {
    "nonce": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "passport_id": {
      "type": "string",
      "description": "Optional FLINT Agent Passport. Authority credit requires server verification and a match to the verified x402 payer wallet."
    },
    "merchant_reference": {
      "type": "string"
    },
    "transaction": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "chain",
        "amount_display",
        "counterparty_address"
      ],
      "properties": {
        "action": {
          "type": "string",
          "maxLength": 128
        },
        "reference": {
          "type": "string"
        },
        "chain": {
          "type": "string",
          "pattern": "^[-a-z0-9]{3,8}:[-_A-Za-z0-9]{1,32}$"
        },
        "token": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "symbol": {
              "type": "string"
            },
            "issuer": {
              "type": "string"
            },
            "contract": {
              "type": "string"
            }
          }
        },
        "amount_display": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,18})?$"
        },
        "counterparty_address": {
          "type": "string"
        },
        "direction": {
          "type": "string"
        }
      }
    },
    "agent_claim": {
      "$ref": "#/$defs/X402ScanAgentClaim"
    }
  },
  "$defs": {
    "X402ScanAgentClaim": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "agent_id": {
          "type": "string",
          "maxLength": 256
        },
        "agent_runtime_hint": {
          "type": "string",
          "maxLength": 256
        },
        "wallet_type": {
          "type": "string",
          "maxLength": 256
        }
      }
    }
  }
}