{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentpmt-com/json-schema/agentpmt-com-purchase-request-schema.json",
  "title": "PurchaseRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentpmt-com-external-agents-api-openapi.yml#/components/schemas/PurchaseRequest",
  "properties": {
    "wallet_address": {
      "type": "string",
      "title": "Wallet Address",
      "description": "Wallet receiving credits (credit account id)"
    },
    "credits": {
      "type": "integer",
      "title": "Credits",
      "description": "Credits to purchase (500-credit multiples)"
    },
    "payment_method": {
      "type": "string",
      "pattern": "^x402$",
      "title": "Payment Method"
    },
    "payer_wallet_address": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Payer Wallet Address",
      "description": "Optional on-chain payer wallet (may differ from wallet_address for sponsored purchases)"
    },
    "request_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Request Id",
      "description": "Idempotency key"
    },
    "transaction_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Transaction Hash",
      "description": "On-chain payment transaction hash for idempotency and auditing"
    },
    "email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "chain_id": {
      "type": "integer",
      "title": "Chain Id",
      "description": "Chain id of the on-chain payment. Supported ids: 8453 (Base), 42161 (Arbitrum), 10 (Optimism), 137 (Polygon), 43114 (Avalanche), 84532 (Base Sepolia testnet). Must match the active network mode."
    },
    "token": {
      "type": "string",
      "title": "Token",
      "description": "Token symbol of the on-chain payment. Supported: 'USDC' or 'EURC'."
    }
  },
  "type": "object",
  "required": [
    "wallet_address",
    "credits",
    "payment_method",
    "chain_id",
    "token"
  ]
}