API 与集成

JSON API,路径前缀为 /api/v1/…。当前路由见您部署环境中的 OpenAPI。示例中请将 YOUR_HOST 替换为您的主机。

文档

约定

主要分组

集成支持

关于访问与场景的问题:帮助support@evopay.biz。已登录客户端可通过 POST /api/v1/helpdesk/tickets 创建工单。

示例

json · 请求体
{
  "email": "user@example.com",
  "password": "YourStrongPassw0rd!",
  "display_name": "Demo User"
}
bash · 注册
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/register" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "YourStrongPassw0rd!",
    "display_name": "Demo User"
  }'
bash · 登录
curl -sS -X POST "https://YOUR_HOST/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  -c cookies.txt \
  -d '{
    "email": "user@example.com",
    "password": "YourStrongPassw0rd!"
  }'
bash · 个人资料与钱包
curl -sS "https://YOUR_HOST/api/v1/me" -b cookies.txt

curl -sS "https://YOUR_HOST/api/v1/wallet/balances" -b cookies.txt

curl -sS "https://YOUR_HOST/api/v1/wallet/activity?limit=20" -b cookies.txt
bash · 创建托管
curl -sS -X POST "https://YOUR_HOST/api/v1/escrow" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
    "title": "设备交付",
    "description": "按规格的服务器设备",
    "amount": "8000.00",
    "currency": "USD"
  }'

然后替换 ESCROW_ID

bash · 托管生命周期
curl -sS "https://YOUR_HOST/api/v1/escrow/contracts/ESCROW_ID" -b cookies.txt

curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/fund" \
  -H "Content-Type: application/json" -b cookies.txt -d '{}'

curl -sS -X POST "https://YOUR_HOST/api/v1/escrow/ESCROW_ID/release" \
  -H "Content-Type: application/json" -b cookies.txt -d '{}'
bash · 状态
curl -sS "https://YOUR_HOST/api/v1/status"
curl -sS "https://YOUR_HOST/readiness"