跳至正文內容
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
}