Skip to content

示例与 OpenAPI ​

客户端示例 ​

使用方式和环境变量见快速开始。

sh
python3 request.py GET /v1/merchant
node request.mjs GET /v1/account/balance
python3 request.py POST /v1/payment-orders order.json
node request.mjs GET '/v1/payment-orders?third_order_no=ORDER202610220001'
python3 request.py POST /v1/refund-orders refund.json
node request.mjs GET '/v1/refund-orders?third_refund_no=REFUND202610220001'

创建订单的 order.json:

json
{
  "third_order_no": "ORDER202610220001",
  "payment_amount": "10.00",
  "expires_at": "2026-10-22T00:20:00Z",
  "custom_params": "customer=example",
  "callback_url": "https://merchant.example.com/notify/payment"
}

申请退款的 refund.json:

json
{
  "third_order_no": "ORDER202610220001",
  "third_refund_no": "REFUND202610220001",
  "refund_amount": "3.33",
  "callback_url": "https://merchant.example.com/notify/refund"
}

申请出款的 payout.json:

json
{
  "third_order_no": "PAYOUT202610220001",
  "user_id": "1234567891",
  "payout_amount": "100.00",
  "custom_params": "customer=example",
  "callback_url": "https://merchant.example.com/notify/payout"
}
sh
node request.mjs POST /v1/payout-orders payout.json
node request.mjs GET '/v1/payout-orders?third_order_no=PAYOUT202610220001'

通知解密示例 ​

下载 Node.js 解密示例,使用方法见结果通知。

OpenAPI ​

下载 OpenAPI 3.0 文档。包含全部接口、参数、响应结构和错误码。