跳至正文内容
Back to API Reference
POST/api/v1/payouts

智能代付下发接口 (POST /v1/payouts)

ENDPOINT OVERVIEW

POST /api/v1/payouts 强制校验唯一 merchant_ref_id 以杜绝超时重试引发的重复出款,全天候托管队列执行,并支持随时通过 GET /api/v1/payouts/{id} 查询单笔状态。

Protocol Rules

  • 每笔出款必须传入唯一的 merchant_ref_id,网络超时重试时务必沿用原单号。
  • 泰铢标准单笔代付区间为 100 – 45,000 THB,1.0% 费率仅对成功到账订单计收。
  • 随时通过 GET /api/v1/payouts/{id} 查询单笔代付执行进度。

Request Examples

curl -X POST https://api.example.com/api/v1/payouts \
  -H "Content-Type: application/json" \
  -H "X-API-Key: <your-api-key>" \
  -H "X-Timestamp: <unix-timestamp>" \
  -H "X-Signature: <hmac-sha256-of-path>" \
  -d '{
    "merchant_ref_id": "unique-payout-ref-2025009",
    "currency_code": "THB",
    "request_amount": 5000,
    "customer_id": "0198cbc6-fd02-7459-a671-78c306d0a1ad",
    "customer_account_id": "0198cbc7-35ec-7c8c-8994-d3ac3e7f5255"
  }'

Sample JSON Response

{
  "id": "0198cc12-84a1-7e10-b311-91d42a7701c2",
  "merchant_ref_id": "unique-payout-ref-2025009",
  "status": "processing",
  "currency_code": "THB",
  "request_amount": 5000,
  "fee_amount": 50
}