跳到正文

API

本页内容

获取

按 ID 获取一笔转出,查看其当前状态和交易引用,并配合签名 webhook 完成对账。

GET/v1/withdrawals/:withdrawal_id

API 密钥: Payout

返回转出的当前状态。付款达到 completed 后出现已确认的 tx_hashexplorer_url

响应 (200 OK)

{
  "withdrawal_id": "wdr_2M8K6Q4P9X1Z7A3B",
  "external_order_id": "payout-001",
  "status": "completed",
  "is_final": true,
  "is_test": false,
  "amount": "100.00",
  "fee": "1.00",
  "currency": "USDT",
  "network": "TRC20",
  "destination_address": "TN3W4H6rK2ce4vX9YnFQHwKENnHjoxb3m9",
  "tx_hash": "9f3b8c2a1d0e4f6789abc123def4567890abc123def4567890abc123def45678",
  "explorer_url": "https://tronscan.org/#/transaction/9f3b8c2a1d0e4f6789abc123def4567890abc123def4567890abc123def45678",
  "created_at": 1739289600,
  "completed_at": 1739289932
}

转出状态

状态 说明 终态
created 转出已创建,等待签名
signed 交易已签名并广播到区块链
cancelling 管理员在 pending_review 期间发起取消;等待链上确认哪笔交易落地
completed 交易已在链上确认,付款已送达。链上语义为最终(is_final: true),但深度重组可能把它退回 signed——见下方流转
failed 广播前签名失败,或运营方放弃了卡住的付款,或取消交易在链上确认。资金已退回余额
cancelled 商户在仍为 created 状态时取消
pending_review 交易已签名但 TTL 到期后仍未在链上找到。需要人工处理

状态流转

  • created -> signed——交易已签名并广播
  • created -> cancelled——商户取消(取消的唯一合法流转)
  • created -> failed——签名失败
  • created -> completed——商户通过 POST /v1/sandbox/withdrawals/{id}/simulate-completion 模拟完成(仅沙箱——不签名、不上链)
  • signed -> completed——交易在链上确认
  • signed -> pending_review——已签名交易在 TTL 后未在链上找到(或被回滚);被回滚的交易保持 signed,直到 TTL 将其升级
  • pending_review -> cancelling——管理员发起取消
  • pending_review -> completed——原交易在链上找到并确认(由扫描器驱动,非管理员操作)
  • pending_review -> failed——管理员放弃卡住的付款
  • cancelling -> completed——原交易先确认,付款照常完成
  • cancelling -> failed——取消交易在链上确认;资金退回余额
  • completed -> signed——少见:链重组置换掉了已确认的付款交易,付款退回 signed,等该交易(或其替代交易)被打包后再次完成

错误

完整目录见 错误码。每个错误响应中的 type URI 直接链接到对应条目。