← 首页

集成文档 · < 1 天 PoC

AgentPay Governance:支付意图授权 + 账本对账 + 审计。不托管资金。

1. 获取 API Key

  1. 打开 首页 点击「一键试用 Demo」
  2. 控制台 → 设置 复制 Demo API Key
  3. 或自助登录创建工作区

2. 授权支付意图

curl -X POST "$BASE/api/v1/intents" \
  -H "Authorization: Bearer apg_demo_key_agentpay_governance" \
  -H "Content-Type: application/json" \
  -d '{
    "amount_usd": 1.25,
    "endpoint": "api.openai.com",
    "asset": "USDC",
    "idempotency_key": "poc-001"
  }'

3. 查询预算 / 审计

curl "$BASE/api/v1/budget" \
  -H "Authorization: Bearer apg_demo_key_agentpay_governance"

curl "$BASE/api/v1/audit" \
  -H "Authorization: Bearer apg_demo_key_agentpay_governance"

4. MCP 工具描述

GET /api/v1/mcp/tools — 返回 request_payment_intent / get_budget_status / list_audit_events

OpenAPI:/api/openapi

5. 本地复现

cd web
npm install
npm run test
npm run dev
# 打开 http://localhost:3000