{
  "name": "PayStage",
  "description": "A read-only payment-safety layer for AI agents: local-policy preflight that returns pay, review or do_not_pay with the rule that fired.",
  "description_zh": "面向 AI 智能体的只读 x402 支付安全层：按本地策略在签名前预检，返回 pay、review 或 do_not_pay，并给出触发的那条规则。只读、不持私钥、不签名、不移动资金。",
  "keywords_zh": [
    "x402",
    "支付安全",
    "支付前校验",
    "智能体支付",
    "agent 支付拦截",
    "盗币地址检查",
    "钱包授权检查",
    "消费限额",
    "MCP 工具",
    "USDC"
  ],
  "version": "0.8.19",
  "license": "MIT",
  "related": [
    {
      "name": "VouchGuard",
      "homepage": "https://vouchguard.app",
      "llms_txt": "https://vouchguard.app/llms.txt",
      "role": "reference instance"
    }
  ],
  "homepage": "https://paystage.xyz",
  "repository": "https://github.com/base-buzz/paystage",
  "socials": [
    {
      "label": "X",
      "handle": "@paystage_xyz",
      "url": "https://x.com/paystage_xyz"
    },
    {
      "label": "GitHub",
      "handle": "base-buzz/paystage",
      "url": "https://github.com/base-buzz/paystage"
    }
  ],
  "holds_keys": false,
  "signs_transactions": false,
  "telemetry": false,
  "shell": false,
  "eval": false,
  "runtime_dependencies": [
    "@modelcontextprotocol/server",
    "@paystage/auth-watch",
    "@paystage/policy",
    "@paystage/preflight",
    "@paystage/trade-preflight",
    "@paystage/velocity",
    "zod"
  ],
  "runtime_dependencies_statement": "7 direct, 2 not ours",
  "environment_variables": [
    "PAYSTAGE_POLICY_PATH",
    "PAYSTAGE_RPC_URL"
  ],
  "packages": [
    "@paystage/mcp",
    "@paystage/policy",
    "@paystage/preflight",
    "@paystage/auth-watch",
    "@paystage/trade-preflight",
    "@paystage/velocity",
    "@paystage/x402-guard",
    "@paystage/x402-guarded-client",
    "@paystage/x-evm",
    "@paystage/skill",
    "@paystage/ai-sdk",
    "@paystage/n8n",
    "@paystage/eliza-plugin",
    "@paystage/receipt-verify",
    "@paystage/channel",
    "@paystage/mandate"
  ],
  "package_versions": {
    "@paystage/mcp": "0.8.19",
    "@paystage/policy": "0.4.1",
    "@paystage/preflight": "0.6.1",
    "@paystage/auth-watch": "0.2.2",
    "@paystage/trade-preflight": "0.2.1",
    "@paystage/velocity": "0.2.4",
    "@paystage/x402-guard": "0.5.1",
    "@paystage/x402-guarded-client": "0.1.0",
    "@paystage/x-evm": "0.1.4",
    "@paystage/skill": "0.1.1",
    "@paystage/ai-sdk": "0.1.5",
    "@paystage/n8n": "0.1.0",
    "@paystage/eliza-plugin": "0.1.0",
    "@paystage/receipt-verify": "0.1.1",
    "@paystage/channel": "0.1.0",
    "@paystage/mandate": "0.1.0"
  },
  "tools": [
    {
      "name": "evaluate_mcp_payment",
      "package": "@paystage/mcp",
      "summary": "Evaluates a proposed x402 payment against a local policy file before it is signed",
      "decisions": [
        "pay",
        "review",
        "do_not_pay"
      ],
      "input": "payment requirements (scheme, network, asset, amount, payTo) + policy_path",
      "output": "decision, reasons[], matched rule, evaluated amount",
      "network": "none"
    },
    {
      "name": "list_outstanding_auths",
      "package": "@paystage/auth-watch",
      "summary": "Lists outstanding ERC-20, Permit2 and EIP-3009 authorisations for an owner",
      "decisions": [],
      "input": "owner address, token/asset scope, optional rpc_url",
      "output": "authorisations[] with allowance, nonce and expiry",
      "network": "JSON-RPC eth_call (PAYSTAGE_RPC_URL or Base/Sepolia public RPC)"
    },
    {
      "name": "evaluate_outstanding_auths",
      "package": "@paystage/auth-watch",
      "summary": "Flags outstanding authorisations that need attention before the next payment",
      "decisions": [
        "ok",
        "attention",
        "revoke_recommended"
      ],
      "input": "owner address, optional rpc_url",
      "output": "findings[] with severity and the allowance that caused it",
      "network": "JSON-RPC eth_call (PAYSTAGE_RPC_URL or Base/Sepolia public RPC)"
    },
    {
      "name": "evaluate_hip3_trade",
      "package": "@paystage/trade-preflight",
      "summary": "Evaluates a proposed HIP-3 / trade.xyz order against a local TradePolicy; places no orders",
      "decisions": [
        "allow",
        "review",
        "do_not_trade"
      ],
      "input": "order (market, side, size, leverage) + TradePolicy, optional market snapshot",
      "output": "decision, reasons[]",
      "network": "read-only POST to https://api.hyperliquid.xyz/info only when no snapshot is supplied"
    },
    {
      "name": "evaluate_velocity",
      "package": "@paystage/velocity",
      "summary": "Rolling rate and spend checks: bursts, spikes and unusual cadence",
      "decisions": [
        "pay",
        "review",
        "do_not_pay"
      ],
      "input": "proposed payment + spend history (window, count, total)",
      "output": "decision, reasons[], window totals",
      "network": "none"
    },
    {
      "name": "verify_receipt",
      "package": "@paystage/mcp",
      "summary": "Verifies a signed evaluation receipt offline against the published key",
      "decisions": [],
      "input": "receipt JSON (or path), optional key id",
      "output": "valid / invalid / unsigned / unverifiable, with the reason",
      "network": "none — signature check happens locally"
    },
    {
      "name": "decode_payment_required",
      "package": "@paystage/mcp",
      "summary": "Decodes a 402 Payment-Required header into its terms, without evaluating them",
      "decisions": [],
      "input": "the raw 402 header, base64 or JSON",
      "output": "scheme, network, asset, amount, payTo, timeout",
      "network": "none"
    },
    {
      "name": "validate_policy",
      "package": "@paystage/mcp",
      "summary": "Checks a policy document on its own, before it is used to judge a payment",
      "decisions": [],
      "input": "policy JSON (or path)",
      "output": "valid, or the field and the reason it is wrong",
      "network": "none"
    },
    {
      "name": "evaluate_batch",
      "package": "@paystage/mcp",
      "summary": "Evaluates several proposed payments in one call, each with its own verdict",
      "decisions": [
        "pay",
        "review",
        "do_not_pay"
      ],
      "input": "payments[] + policy (or policy_path)",
      "output": "per-payment decision and reasons[], plus a summary",
      "network": "none"
    },
    {
      "name": "request_testnet_funds",
      "package": "@paystage/mcp",
      "summary": "Requests testnet USDC for an address so an agent can try the paid path",
      "decisions": [],
      "input": "address on Base Sepolia, optional amount",
      "output": "drip confirmed or the reason it was refused, with the reset time",
      "network": "Base Sepolia (eip155:84532)"
    }
  ],
  "networks": {
    "mainnet": "eip155:8453",
    "sepolia": "eip155:84532"
  },
  "hosted_api": {
    "mainnet": "https://api.paystage.xyz",
    "sepolia": "https://sepolia.api.paystage.xyz",
    "price_usdc_per_call": "0.002",
    "paid_only_alias": "/v1/paid/evaluate_mcp_payment"
  },
  "reliability": {
    "slo_doc": "https://github.com/base-buzz/paystage/blob/main/apps/hosted/SLO.md",
    "timing_header": "Server-Timing: app;dur=<ms> on every response",
    "measure": "node apps/hosted/scripts/latency.mjs --n 50",
    "fail_closed": true,
    "idempotent": [
      "POST /v1/evaluate_mcp_payment",
      "POST /v1/evaluate_outstanding_auths"
    ],
    "measured_2026_11_09": {
      "unpaid_402_server_ms": {
        "p50": 0,
        "p95": 0
      },
      "unpaid_402_wall_ms": {
        "p50": 18,
        "p95": 101
      },
      "paid_evaluation": "not measured — needs a funded wallet"
    }
  },
  "receipts": {
    "endpoint": "POST /v1/evaluate_mcp_payment returns a `receipt` field",
    "key_endpoint": "https://api.paystage.xyz/v1/public/receipt-key.json",
    "format_version": 1,
    "alg": "ECDSA-P256-SHA256",
    "binding": "request_sha256 + policy_sha256 over canonical JSON; verdict included",
    "signing": "optional — check the key endpoint; receipts say signed:false when unsigned",
    "docs": "https://github.com/base-buzz/paystage/blob/main/apps/hosted/RECEIPTS.md"
  },
  "access": [
    {
      "kind": "filesystem.read",
      "detail": "one policy JSON file (policy_path / PAYSTAGE_POLICY_PATH)"
    },
    {
      "kind": "network",
      "detail": "JSON-RPC reads to Base or a configured RPC; read-only Hyperliquid info query"
    },
    {
      "kind": "stdio",
      "detail": "MCP JSON-RPC over stdin/stdout with the launching agent"
    },
    {
      "kind": "filesystem.write",
      "detail": "none"
    },
    {
      "kind": "secrets",
      "detail": "none read by PayStage; no key custody"
    }
  ],
  "verify": [
    "npx -y -p @paystage/mcp paystage-mcp",
    "npm audit signatures",
    "node apps/hosted/scripts/conformance.mjs",
    "npx -y -p @paystage/mcp paystage-verify <receipt.json>",
    "https://github.com/base-buzz/paystage/blob/main/SECURITY.md"
  ],
  "machine_surfaces": {
    "llms": "/llms.txt",
    "llms_full": "/llms-full.txt",
    "manifest": "/.well-known/paystage.json",
    "mcp_registry": "io.github.base-buzz/x402-payment-safety",
    "chatgpt_mcp": "https://api.paystage.xyz/mcp/chatgpt — curated read-only payment tools (gate, decode, verify) on the free tier; the ten-tool /mcp keeps the testnet writer and trade preflight",
    "cadence": "/v1/public/cadence.json",
    "openapi": "/openapi.json",
    "health": "/health",
    "status": "/v1/public/status",
    "chain": "/v1/public/chain.json",
    "guard_verdict": "POST /v1/guard-verdict — turn a preflight verdict into a receipt-shaped response",
    "evidence_bundle": "GET /runs/:id — the events.jsonl, proof, receipt and summary.md for one decision",
    "payee_categories": "GET /wallets/:address — stored observations about one payee with source and read date; no score or combined verdict",
    "mandate": "GET /v1/mandate/:serial — status, scope, principal and seller verdict for one Vouch mandate serial; unknown serials answer 200 with status unknown"
  },
  "not_advice": true
}