{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/relayzero-ai/json-schema/relayzero-ai-rail-receipt-schema.json",
  "title": "RailReceipt",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/relayzero-ai-openapi.json#/components/schemas/RailReceipt",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "rail": {
      "type": "string",
      "enum": [
        "x402",
        "mpp",
        "link",
        "ap2"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "challenge_created",
        "authorized",
        "settled",
        "rejected",
        "refunded"
      ]
    },
    "route_method": {
      "type": [
        "string",
        "null"
      ]
    },
    "route_path": {
      "type": [
        "string",
        "null"
      ]
    },
    "amount_usdc": {
      "type": "number"
    },
    "currency": {
      "type": "string"
    },
    "payer_wallet": {
      "type": [
        "string",
        "null"
      ]
    },
    "payer_agent_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "payment_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "legacy_receipt_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "challenge_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "authorization_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "tx_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "proof_hash": {
      "type": "string"
    },
    "proof_redacted": {
      "type": "object"
    },
    "metadata": {
      "type": "object"
    },
    "request_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "settled_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}