概述
本套 API 供 ISV 客户 完成 Onboarding 后调用,代其终端客户完成转账、收款、Payout、银行账户管理等日常交易操作。 ISV 调用时传入walletId,OristaPay 会按 ISV ↔ 商户的归属关系自动完成鉴权。交易接口字段零变更。
鉴权与签名
所有接口均需携带签名请求头,详见 认证与签名。接口索引
| # | 接口 | REST 路径 |
|---|---|---|
| 1 | 静态收款地址查询 | POST /api/v1/wallet/static-address/query |
| 2 | 查询支持币种 | POST /api/v1/wallet/supported/currencies |
| 3 | Request Payment 订单申报 | POST /api/v1/payment/order/declare |
| 4 | 订单材料补充 | POST /api/v1/payment/order/add/materials |
| 5 | 划拨 | POST /api/v1/payment/internal-transfer |
| 6 | 订单详情 | POST /api/v1/payment/order/detail |
| 7 | 订单列表 | POST /api/v1/payment/order/list |
| 8 | 对账单下载 | POST /api/v1/payment/reconciliation |
| 9 | 添加收款账号 | POST /api/v1/wallet/bank_account/add |
| 10 | 更新收款账号 | POST /api/v1/wallet/bank_account/update |
| 11 | 删除收款账号 | POST /api/v1/wallet/bank_account/del |
| 12 | 查询收款账号 | POST /api/v1/wallet/bank_account/get |
| 13 | Payout 询价 | POST /api/v1/payout/quote |
| 14 | Payout 下单 | POST /api/v1/payout/book |
| 15 | Payout 订单查询 | POST /api/v1/payout/enquiry |
| 16 | Payout 重新结算 | POST /api/v1/payout/reSettle |
| 17 | 订单结果通知 | Webhook |
| 18 | 添加收款账号结果通知 | Webhook |
| 19 | Payout 结果通知 | Webhook |
| 20 | Payout 退款结果通知 | Webhook |
| 21 | Payout 重新结算结果通知 | Webhook |
收付款与转账
1. 静态收款地址查询
查询指定钱包的 Request Payment 静态收款地址。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
network | string | 否 | 区块链网络:ETH / TRX / SOL / POLY |
currency | string | 否 | 币种:USDT / USDC |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | Array<StaticAddressData> | 静态地址列表 |
StaticAddressData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
walletId | int64 | 钱包 ID |
network | string | 区块链网络,如 ETH / TRX |
currency | string | 币种,如 USDT / USDC |
address | string | 静态收款地址 |
qrCodeBase64 | string | 该地址的二维码图片,Base64 编码,含 data:image/png;base64, 前缀,可直接放入 <img src> |
2. 查询支持币种
按walletId + type 查询该钱包在指定业务类型下支持的币种、可用网络、单笔金额范围与币种精度。调用方可用该接口在创建入金 / 出金订单前做前置校验,避免提交未开通或超出限额的币种组合。
请求参数
| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
type | string | 是 | 业务类型 / 限额类型:4 入金(deposit),3 提币(withdraw) |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | Array<SupportedCurrenciesQueryData> | 支持币种列表;code = 1 时返回 |
SupportedCurrenciesQueryData 字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | int32 | 业务类型 / 限额类型,与请求 type 对应 |
currency | string | 币种,如 USDT / USDC / USD |
minAmount | string | 单笔最小金额,字符串形式的十进制数 |
maxAmount | string | 单笔最大金额,字符串形式的十进制数 |
networks | Array<string> | 该币种支持的区块链网络列表,如 ETH / TRX / SOL |
precision | int32 | 金额精度,小数位数 |
3. Request Payment 订单申报
申报 Request Payment 入金订单。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 入金钱包 ID |
extOrderNo | string | 是 | 外部订单 ID,全局唯一 |
senderAddress | string | 是 | 付款方钱包地址 |
network | string | 是 | 网络:ETH / TRX |
currency | string | 是 | 币种:USDT / USDC |
amount | string | 是 | 申报金额,需与最终入金金额完全匹配 |
senderName | string | 是 | 付款方名称 |
countryRegion | string | 是 | 付款方国家/地区 ISO 3166 编码(如 HKG) |
contactAddress | string | 是 | 付款方联系住址 |
receiverName | string | 是 | 收款商户名称 |
message | string | 否 | 附言 |
materials | Array<Material> | 否 | 订单还原材料申报对象集合 |
Material 字段:
| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
productType | string | 是 | 商品类型 |
productName | string | 是 | 商品名称 |
productPrice | string | 是 | 商品价格 |
productCount | string | 是 | 商品数量 |
productUnit | string | 是 | 商品单位 |
logisticsTrackingName | string | 否 | 物流公司名称 |
logisticsTrackingNo | string | 否 | 物流单号 |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
4. Request Payment 订单材料补充
为已申报的订单补充商品/物流材料。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 入金钱包 ID |
orderNo | string | 是 | RD 订单号 |
materials | Array<Material> | 否 | 订单还原材料对象集合 |
Material 字段同「1. Request Payment 订单申报」。
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
5. 划拨
钱包内部托管资产 → 交易资产的划拨。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
internalTransferType | int32 | 是 | 划拨类型:1 托管资产 → 交易资产 |
network | string | 条件 | 来源资产网络:ETH / TRX / SOL / POLY,internalTransferType=1 必填 |
currency | string | 是 | 币种:USDT / USDC |
amount | string | 是 | 金额 |
extOrderNo | string | 是 | 外部订单 ID,全局唯一 |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | InternalTransferData | 划拨结果 |
InternalTransferData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
orderNo | string | 划拨订单号 |
6. 订单详情
按订单号或外部订单号查询钱包订单详情。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
orderNo | string | 条件 | RD 订单号 |
extOrderNo | string | 条件 | 外部订单号;orderNo / extOrderNo 二选一 |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | WalletOrderDetailData | 订单详情 |
WalletOrderDetailData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
orderNo | string | RD 订单号 |
extOrderNo | string | 外部订单号 |
orderType | int32 | 订单类型 |
orderStatus | string | 见附录【入金订单状态】 |
fromAddress | string | 发起方地址 |
fromWallet | string | 来源钱包 |
toAddress | string | 接收方地址 |
toWallet | string | 目标钱包 |
amount | string | 金额 |
network | string | 网络:ETH / TRX |
currency | string | 币种:USDT / USDC |
expireTime | int64 | 订单过期时间 |
createTime | int64 | 订单创建时间 |
7. 订单列表
按walletId 分页查询钱包订单列表,可通过订单状态、币种和创建时间范围进行筛选。返回的订单数据使用钱包订单统一结构,适合用于订单列表页、对账前置查询或按状态轮询订单进度。
请求参数
| 参数名 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID(必须归属当前 API Key 对应的企业,或其名下的 ISV 子企业) |
status | string | 否 | 订单状态;不传则查询全部状态 |
currency | string | 否 | 币种,如 USDT / USDC |
startTime | string | 否 | 查询开始时间,按订单创建时间过滤;格式为 ISO8601 with timezone,例如 2026-01-01T00:00:00Z |
endTime | string | 否 | 查询结束时间,按订单创建时间过滤;格式为 ISO8601 with timezone,例如 2026-01-01T00:00:00Z |
pageNumber | int32 | 是 | 页码,从 1 开始 |
pageSize | int32 | 是 | 每页数量,默认 20,最大支持 100,超过 100 按 100 处理 |
| 参数名 | 类型 | 说明 |
|---|---|---|
code | int32 | 业务码:1 成功,其它见错误码 |
message | string | 业务消息 |
data | Array<WalletOrderDetailData> | 订单列表;code = 1 时返回 |
page | Page | 分页信息 |
Page 字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
pageNumber | int32 | 当前页码 |
pageSize | int32 | 每页数量 |
totalPages | int32 | 总页数 |
totalRecords | int32 | 总记录数 |
WalletOrderDetailData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
orderNo | string | 订单号 |
extOrderNo | string | 外部订单号 |
orderType | int32 | 订单类型 |
orderStatus | string | 见附录【入金订单状态】 |
fromAddress | string | 发起方地址 |
fromWallet | string | 来源钱包 |
toAddress | string | 接收方地址 |
toWallet | string | 目标钱包 |
amount | string | 金额 |
network | string | 区块链网络:ETH / TRX |
currency | string | 币种:USDT / USDC |
expireTime | int64 | 订单过期时间 |
createTime | int64 | 订单创建时间 |
8. 对账单下载
每日上午 9 点可提供 D-1 日对账单下载(时区:香港 UTC+8)。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
billDate | string | 是 | 账单日期,格式:yyyyMMdd |
modeType | int32 | 是 | 授权模式:1 直连模式 / 2 授权模式(含子钱包) |
accountType | int32 | 是 | 账户类型:1 存管账户 / 2 交易账户 |
currencyType | int32 | 是 | 币种类型:1 ETH-USDT / 2 ETH-USDC / 3 TRX-USDT / 4 USDT / 5 USDC / 6 USD / 14 SOL-USDC / 15 SOL-USDT / 16 POLY-USDC / 17 POLY-USDT |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | WalletBillData | 对账单信息 |
WalletBillData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
fileName | string | 文件名称 |
fileUrl | string | 对账单 zip 包下载地址 |
银行账户管理
| Path | Request | Response |
|---|---|---|
/api/v1/wallet/bank_account/add | AddBankAccountRequest | BankAccountResponse |
/api/v1/wallet/bank_account/update | UpdateBankAccountRequest | BankAccountResponse |
/api/v1/wallet/bank_account/del | DelBankAccountRequest | DelBankAccountResponse |
/api/v1/wallet/bank_account/get | GetBankAccountRequest | GetBankAccountResponse |
以下接口共享BankAccountData与FileInfo定义。
BankAccountData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
settlementAccountUID | int64 | 结算账户标识 |
walletId | int64 | 钱包 ID |
alias | string | 别名 |
accountOwnership | int32 | 与钱包关系:1 own / 2 other / 3 Third party |
currency | string | 币种:USD |
accountType | int32 | 账户类型:1 RD Wallet / 2 Bank Account |
companyName | string | 公司名称 |
accountNumber | string | 账号(RD Wallet ID 或 Bank Number) |
bankId | string | 香港银行 ID,例如 003 |
beneficiaryAddress1 | string | 收款方地址 1(不允许中文) |
beneficiaryAddress2 | string | 收款方地址 2(不允许中文) |
beneficiaryAddress3 | string | 收款方地址 3:国家/地区 ISO 3166 编码 |
beneficiarySwiftCode | string | 银行 Swift Code |
intermediarySwiftCode | string | 中间银行 Swift Code |
companyCode | string | 企业编码 |
status | int32 | 状态:0 处理中 / 1 成功 / 2 失败 |
paymentFiles | Array<FileInfo> | 支付证明文件 |
remark | string | 备注 |
FileInfo 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
fileKey | string | 文件 ID(上传接口返回) |
fileName | string | 文件名称 |
fileUrl | string | 文件 URL(上传接口返回,URL 会定期更新) |
9. 添加收款账号
请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
alias | string | 是 | 别名 |
accountOwnership | int32 | 是 | 1 own / 2 other / 3 Third party |
currency | string | 是 | 币种:USD |
accountType | int32 | 是 | 1 RD Wallet / 2 Bank Account |
companyName | string | 是 | 公司名称(accountOwnership=2 时必须与 companyCode 对应公司一致) |
accountNumber | string | 是 | 账号 |
bankId | string | 是 | 香港银行 ID,例如 003 |
beneficiaryAddress1 | string | 条件 | accountType=2 必填 |
beneficiaryAddress2 | string | 条件 | accountType=2 必填 |
beneficiaryAddress3 | string | 条件 | accountType=2 必填,国家/地区 ISO 3166 |
beneficiarySwiftCode | string | 条件 | accountType=2 必填,必须是 HK 地区 |
intermediarySwiftCode | string | 否 | 中间银行 Swift Code,必须是 HK 地区 |
companyCode | string | 条件 | accountOwnership=2 必填 |
paymentFiles | Array<FileInfo> | 条件 | accountOwnership=3 必填 |
remark | string | 否 | 备注,accountOwnership=3 选填 |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | BankAccountData | 账户信息 |
10. 更新收款账号
仅可更新非关键字段;accountOwnership / currency / accountType / companyName / companyCode 不在更新范围内。
请求参数
| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
settlementAccountUID | int64 | 是 | 结算账户标识 |
alias | string | 否 | 别名 |
accountNumber | string | 否 | 账号 |
bankId | string | 否 | 香港银行 ID |
beneficiaryAddress1 | string | 否 | 收款方地址 1 |
beneficiaryAddress2 | string | 否 | 收款方地址 2 |
beneficiaryAddress3 | string | 否 | 收款方地址 3 |
beneficiarySwiftCode | string | 否 | Swift Code(HK 地区) |
intermediarySwiftCode | string | 否 | 中间银行 Swift Code(HK 地区) |
paymentFiles | Array<FileInfo> | 条件 | accountOwnership=3 必填 |
remark | string | 否 | 备注,accountOwnership=3 选填 |
data 为 BankAccountData。
请求示例
11. 删除收款账号
请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
settlementAccountUID | int64 | 是 | 结算账户标识 |
reason | string | 是 | 删除原因 |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
12. 查询收款账号
请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
settlementAccountUID | int64 | 否 | 结算账户标识(精确查询) |
companyCode | string | 否 | 企业编码(按企业过滤) |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | Array<BankAccountData> | 账户列表 |
兑换与出金
13. Payout 询价
获取指定币对价格及转账信息。fromAmount / toAmount 二选一。
请求参数
| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
fromCurrency | string | 是 | 卖出币种:USDT / USDC |
fromAmount | string | 否 | 卖出金额,2 位小数 |
toCurrency | string | 是 | 买入币种:USD |
toAmount | string | 否 | 买入金额,2 位小数 |
paymentWay | string | 是 | 支付方式:RDT / CHATS |
feeMode | int32 | 条件 | paymentWay=CHATS 必填。1 收付双方共同承担(SHAR);2 付款方承担所有(OUR) |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | PayoutQuoteData | 询价结果 |
PayoutQuoteData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
walletId | int64 | 钱包 ID |
fromCurrency | string | 卖出币种 |
fromAmount | string | 卖出金额 |
toCurrency | string | 买入币种 |
toAmount | string | 买入金额(已扣手续费) |
paymentWay | string | 支付方式 |
feeMode | int32 | 手续费扣费模式 |
quoteId | int64 | 询价 ID(下单时使用) |
price | string | 价格 |
priceExpireTime | string | 价格有效截止时间,毫秒时间戳 |
feeAmount | string | 手续费 |
feeCurrency | string | 手续费币种 |
14. Payout 下单
基于询价 ID 下单。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
quoteId | int64 | 是 | 询价 ID |
settlementAccountUID | int64 | 是 | 结算账户标识,通过查询收款账号接口取得 |
purpose | string | 是 | 付款目的,见附录【付款目的】 |
extOrderNo | string | 是 | 业务方订单号(数字、大小写字母、_、-、*,同商户号下唯一) |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | PayoutBookData | 下单结果 |
PayoutBookData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
walletId | int64 | 钱包 ID |
quoteId | int64 | 询价 ID |
settlementAccountUID | int64 | 结算账户标识 |
purpose | string | 付款目的 |
orderNo | string | 订单号 |
fromCurrency | string | 卖出币种 |
fromAmount | string | 卖出金额 |
toCurrency | string | 买入币种 |
toAmount | string | 买入金额 |
paymentWay | string | 支付方式 |
feeMode | int32 | 手续费扣费模式 |
feeAmount | string | 手续费 |
feeCurrency | string | 手续费币种 |
orderStatus | string | 见附录【Payout 订单状态】 |
createTime | int64 | 订单创建时间 |
extOrderNo | string | 业务方订单号 |
15. Payout 订单查询
按订单号或询价 ID 查询订单。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
orderNo | string | 否 | RD 订单号 |
quoteId | int64 | 否 | 询价 ID。orderNo / quoteId 至少二选一 |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | PayoutData | 订单详情 |
PayoutData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
walletId | int64 | 钱包 ID |
quoteId | int64 | 询价 ID |
orderNo | string | 订单号 |
fromCurrency | string | 卖出币种 |
fromAmount | string | 卖出金额 |
toCurrency | string | 买入币种 |
toAmount | string | 买入金额 |
tradeFromAmount | string | 实际成交卖出金额 |
tradeToAmount | string | 实际成交买入金额 |
price | string | 下单价格 |
tradePrice | string | 成交价格 |
orderStatus | string | 见附录【Payout 订单状态】 |
createTime | int64 | 订单创建时间 |
finishTime | int64 | 订单完成时间 |
errorMsg | string | 失败原因 |
settlementAccountUID | int64 | 结算账户标识 |
purpose | string | 付款目的 |
paymentWay | string | 支付方式 |
feeMode | int32 | 手续费扣费模式 |
feeAmount | string | 手续费 |
feeCurrency | string | 手续费币种 |
refundOrderNo | string | 失败时退款订单号 |
refundAmount | string | 失败时退款金额 |
refundCurrency | string | 失败时退款币种 |
extOrderNo | string | 业务方订单号 |
16. Payout 重新结算
针对结算失败或退款订单发起重新结算。 请求参数| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
walletId | int64 | 是 | 钱包 ID |
orderNo | string | 是 | 原 Payout 订单号 |
refundOrderNo | string | 是 | 退款订单号 |
settlementAccountUID | int64 | 是 | 结算账户标识 |
purpose | string | 是 | 付款目的 |
remark | string | 是 | 描述 |
paymentWay | string | 是 | 支付方式:RDT / CHATS |
feeMode | int32 | 条件 | paymentWay=CHATS 必填,含义同 Payout 询价接口 |
| 参数名 | 类型 | 描述 |
|---|---|---|
code | int32 | 业务码 |
message | string | 业务消息 |
data | PayoutReSettleData | 重新结算结果 |
PayoutReSettleData 字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
walletId | int64 | 钱包 ID |
orderNo | string | 原 Payout 订单号 |
refundOrderNo | string | 退款订单号 |
settlementAccountUID | int64 | 结算账户标识 |
purpose | string | 付款目的 |
remark | string | 描述 |
paymentWay | string | 支付方式 |
feeMode | int32 | 手续费扣费模式 |
amount | string | 重新结算金额 |
currency | string | 重新结算币种 |
feeAmount | string | 手续费 |
feeCurrency | string | 手续费币种 |
回调(Webhook)
请求规范
| 项目 | 值 |
|---|---|
| 方法 | POST |
| Content-Type | application/json; charset=utf-8 |
| 请求体 | JSON,结构由事件类型决定(如 WITHDRAWAL_SUCCESS / DEPOSIT_COMPLETED 等) |
| 超时 | 默认 8 秒;超时视为失败,可能触发业务层重试 |
| Header | 说明 |
|---|---|
X-Api-Key | 商户 api_key,标识本次回调的归属商户 |
X-Timestamp | UTC 毫秒时间戳字符串,回调发出时刻 |
X-Nonce | 本次回调唯一随机串(32 位 hex),用于商户侧去重 |
X-Signature | HMAC-SHA256 签名,算法见下方签名验证 |
Content-Type | 固定 application/json; charset=utf-8 |
签名验证
算法与入向接口完全一致(对称),共用同一把sign_secret:
PATH:回调 URL 的 path 部分,不含域名与 queryBODY:HTTP 请求体原始字节
验签步骤
- 取请求头:
X-Timestamp、X-Nonce、X-Signature、X-Api-Key - 校验时间戳窗口:
abs(now_ms − X-Timestamp) ≤ 5 × 60 × 1000,否则直接拒绝(401) - 读取请求体:在任何反序列化/解析之前拿到原始字节(见下方避坑提示)
- 重算签名:用
sign_secret和步骤 3 得到的 body,按上面的公式算出expected - 常量时间比对:用框架提供的
constant_time_compare/hmac.compare_digest比对expected与X-Signature,不要用==(防时序攻击) - 幂等去重:用
X-Nonce作为幂等键判重,已处理过则直接返回上次结果
避坑提示
- 必须是原始字节:任何中间件/框架如果在你拿到 body 之前做了反序列化、字符重编码、JSON 规范化(例如
JSON.stringify重排字段或美化空格),都会让签名失配。 - PATH 严格匹配:拼签名用的
PATH必须和网关发来的 URL path 完全一致——不能加尾斜杠、不能 urldecode、不能去掉前缀。 - 大小写敏感:
X-Signature是小写 hex;METHOD固定大写POST。 - 空 body 也要参与签名:若本次回调 body 为空,
SHA256_HEX("")=e3b0c442...b855,不能省略。
多语言参考实现
Python调试小技巧 验签失败时,把你算出的string_to_sign打印一次 —— 99% 的 bug 都出在这段字符串与网关侧拼的不一致(PATH、BODY 二次序列化、字符编码)。把你的字符串和对应的X-Request-Id发给技术支持,可以快速定位。
响应要求
- 商户端必须在 8 秒内完成响应。
- HTTP 状态码
2xx视为回调投递成功;非2xx、超时或响应体为业务错误均视为失败。 - 响应体建议遵循统一约定:
幂等与重放防护
- 幂等键:推荐以
X-Nonce作为幂等键持久化,重复收到同一 key 的回调立刻返回上次处理结果,不重复执行业务。 - 重放防护:校验
X-Timestamp与服务器时间差在 ±5 分钟以内,超窗直接拒绝。 - 签名强校验:任何签名验证失败,直接返回
4xx,不进入业务处理。
事件载荷
17. 订单结果通知
| 字段 | 类型 | 描述 |
|---|---|---|
orderNo | string | RD 订单号 |
currency | string | 币种:USDT / USDC |
network | string | 网络:ETH / TRX / SOL / POLY |
status | string | 订单状态,见附录【入金订单状态】 |
amount | string | 金额 |
fromAddress | string | 发起方地址 |
fromWallet | string | 来源钱包 |
toAddress | string | 接收方地址 |
toWallet | string | 目标钱包 |
txHash | string | 区块链交易哈希 |
orderType | int32 | 订单类型 |
extOrderNo | string | 外部订单号 |
18. 添加收款账号结果通知
| 字段 | 类型 | 描述 |
|---|---|---|
settlementAccountUID | int64 | 结算账户标识 |
walletId | int64 | 钱包 ID |
alias | string | 别名 |
accountOwnership | int32 | 1 own;2 other;3 Third party |
currency | string | 币种:USD |
accountType | int32 | 1 RD Wallet;2 Bank Account |
accountName | string | 账户名称 |
accountNumber | string | 账号 |
bankId | string | 香港银行 ID,例如 003 |
beneficiaryAddress1 | string | 收款方地址 1(不允许中文) |
beneficiaryAddress2 | string | 收款方地址 2(不允许中文) |
beneficiaryAddress3 | string | 收款方地址 3:国家/地区 ISO 3166 编码 |
beneficiarySwiftCode | string | 银行 Swift Code |
intermediarySwiftCode | string | 中间银行 Swift Code |
companyCode | string | 企业编码 |
status | int32 | 0 处理中;1 成功;2 失败 |
19. Payout 结果通知
| 字段名 | 类型 | 描述 |
|---|---|---|
walletId | int64 | 钱包 ID |
quoteId | int64 | 询价 ID |
orderNo | string | 订单号 |
fromCurrency | string | 卖出币种 |
fromAmount | string | 卖出金额 |
toCurrency | string | 买入币种 |
toAmount | string | 买入金额 |
tradeFromAmount | string | 实际成交卖出金额 |
tradeToAmount | string | 实际成交买入金额 |
price | string | 下单价格 |
tradePrice | string | 成交价格 |
orderStatus | string | 见附录【Payout 订单状态】 |
createTime | int64 | 订单创建时间 |
finishTime | int64 | 订单完成时间 |
errorMsg | string | 订单失败原因 |
settlementAccountUID | int64 | 结算账户标识 |
purpose | string | 见附录【付款目的】 |
paymentWay | string | 支付方式:RDT / CHATS |
feeMode | int32 | 手续费扣费模式,默认值:1。1 收付双方共同承担(SHAR);2 付款方承担所有手续费(OUR) |
feeAmount | string | 手续费 |
feeCurrency | string | 手续费币种 |
refundOrderNo | string | Payout 订单状态为 SETTLING_FAILED 时有值,用于重新发起结算 |
extOrderNo | string | 业务方订单号(只能是数字、大小写字母、_、-、*,且在同一个商户号下唯一) |
20. Payout 退款结果通知
| 字段名 | 类型 | 描述 |
|---|---|---|
walletId | int64 | 钱包 ID |
orderNo | string | Payout 订单号 |
refundOrderNo | string | 退款订单号 |
refundAmount | string | 实际退款金额 |
refundCurrency | string | 退款币种 |
refundReason | string | 退款原因,有则回传 |
refundTime | int64 | 退款时间 |
21. Payout 重新结算结果通知
| 字段名 | 类型 | 描述 |
|---|---|---|
walletId | int64 | 钱包 ID |
orderNo | string | Payout 订单号 |
refundOrderNo | string | 退款订单号 |
settlementAccountUID | int64 | 结算账户标识 |
purpose | string | 见附录【付款目的】 |
remark | string | 描述 |
paymentWay | string | 支付方式:RDT / CHATS |
feeMode | int32 | 手续费扣费模式,默认值:1。1 收付双方共同承担(SHAR);2 付款方承担所有手续费(OUR) |
amount | string | 结算金额 |
currency | string | 结算币种 |
feeAmount | string | 手续费 |
feeCurrency | string | 手续费币种 |
createTime | int64 | 订单创建时间 |
finishTime | int64 | 订单完成时间 |
orderStatus | string | 重新结算订单状态,见附录【Payout 订单状态】 |
附录
响应码
| code | 含义 |
|---|---|
1 | 成功 |
6001 | 通用业务失败(failed) |
6002 | 参数错误(parameter error) |
6003 | 订单不存在(order not exist) |
6004 | 订单重复(order duplicate) |
6005 | 没有权限(no permissions) |
6006 | 资产不存在(assets not exists) |
6101 | 钱包账号不存在(wallet account not exists) |
6102 | 钱包余额不足(wallet insufficient fund) |
6103 | 钱包账号无效(wallet status invalid) |
6104 | 收款钱包不可用(recipient wallet unavailable) |
6105 | 收款钱包不存在(recipient wallet not exists) |
6109 | 付款日限额不足(Daily payment limit exceeded) |
6110 | 收款月限额不足(Monthly collection limit exceeded) |
6301 | 通道不可用(provider unavailable) |
6302 | 币种对不可用(symbol unavailable) |
6303 | 通道拒绝(provider reject) |
6304 | 价格已过期(price expire time) |
6305 | 金额低于最低限额(amount lt min amount) |
6306 | 金额高于最高限额(amount gt max amount) |
6307 | 不在交易时间内(outside of hours) |
6401 | 地址已存在 |
6406 | 请求正在处理中(processing) |
6801 | 重复申请(duplicate request) |
6802 | 资料错误(profile error),返回 errors 列表 |
6803 | 钱包数量达到上限(reach the max limit) |
Payout 订单状态
| code | 中文 | 说明 |
|---|---|---|
SUBMITTED | 已提交 | 订单已提交 |
CONVERTING | 兑换中 | 订单兑换中 |
SETTLING | 结算中 | 兑换成功,进行结算 |
SETTLING_FAILED | 结算失败 | 兑换成功,结算失败 |
SETTLING_REFUND | 退款 | 结算成功后被退款 |
SUCCESSFUL | 交易成功 | 订单处理成功 |
FAILED | 交易失败 | 订单处理失败 |
入金订单状态
| code | 中文 | 说明 |
|---|---|---|
SUBMITTED | 已提交 | 订单已提交 |
VERIFYING | 订单验证 | 订单提交后进行安全验证(仅 Request Payment) |
AWAIT_FOR_RECEIVE | 等待收款 | 订单创建成功,等待收款(仅 Request Payment) |
PAYMENT_VERIFYING | 收款验证中 | 平台已收款,进行安全验证(仅 Request Payment) |
AWAIT_FOR_DECLARATION | 待补充材料 | 待补充贸易材料(仅 Request Payment) |
DECLARATION_REVIEW | 材料验证中 | 材料审核中 |
SUCCESS | 交易成功 | 订单成功 |
FAILED | 交易失败 | 订单失败 |
CLOSED | 交易关闭 | 订单到期后关闭 |
RETURNING | 退款中 | 退款中 |
RETURNED | 已退款 | 退款处理成功 |
IN_PROGRESS | 收款验证中 | 平台已收款,进行安全验证(仅 Deposit) |
订单类型
| code | 类型 |
|---|---|
1 | Deposit |
2 | Wallet Transfer |
3 | Internal Transfer |
4 | Request Payment |
5 | Withdraw |
字段说明:amount(金额)
字段类型恒为string,精度按币种类型区分:
- 数币(Digital Currency):最多保留 6 位小数,满足链上交易精度需求。
- 法币(Fiat Currency):最多保留 2 位小数,精确到「分」。
- 日元(JPY):无小数货币,必须为整数,不得包含小数部分。
付款目的(purpose)
| code | 含义 |
|---|---|
PMT001 | Invoice payments — 发票付款 |
PMT002 | Payment for services — 服务付款 |
PMT003 | Payment for software — 软件付款 |
PMT004 | Payment for imported goods — 进口货物付款 |
PMT005 | Travel services — 旅行服务 |
PMT006 | Transfer to own account — 转账到自己的账户 |
PMT007 | Repayment of loans — 贷款偿还 |
PMT009 | Payment of property rental — 物业租金 |
PMT010 | Information Service Charges — 信息服务费 |
PMT011 | Advertising & Public relations-related expenses — 广告和公共关系费用 |
PMT012 | Royalty / trademark / patent / copyright fees — 版权/商标/专利费用 |
PMT013 | Brokers / front-end / commitment / guarantee / custodian fees — 经济费、保管费、托管费 |
PMT014 | Advisors, technical assistance, academic knowledge — 顾问费、技术援助、知识费用 |
PMT015 | Representative office expenses — 办公室费用 |
PMT016 | Tax Payment — 税费 |
PMT017 | Transportation fees for goods — 货物运输费用 |
PMT018 | Construction costs / expenses — 建筑成本 |
PMT019 | Insurance Premium — 保险费 |
PMT020 | General Goods Trades - Offline trade — 一般商品贸易 |
PMT021 | Insurance Claims Payment — 保险赔付费用 |
PMT024 | Medical Treatment — 医疗 |
PMT025 | Donations — 捐赠 |
PMT026 | Mutual Fund Investment — 投资 |
PMT027 | Currency Exchange — 货币兑换 |
PMT028 | Advance Payments for Goods — 预付商品款项 |
PMT029 | Merchant Settlement — 商户结算 |
PMT030 | Repatriation Fund Settlement — 遣返/回国资金结算 |
国家地区编码
ISO 3166 三字母编码(如HKG / CHN / MAC / USA / BMU / WSM / SYC / CYM / VGB 等)。完整列表请向商务/技术支持索取,或参考 Confluence 外链:https://rdwallet.atlassian.net/wiki/external/NzNjMzU5MjZkNTE4NGZkZWI2NzhmYTdiM2IyYjZmNjM
行业编码
subIndustryCode 取值参见 Confluence 外链(可下载 Excel):https://rdwallet.atlassian.net/wiki/external/YjA0N2FiNjcwNjljNDI2MDk0MGE4OTRkZjYxZmEyMmY
档案错误描述(code = 6802)
下列消息均来自资料校验,按所属模块分组(实际消息为 英文,此处保留原文)。 [Business details]Industry cannot be empty!Added industries exceeded limit: 3Industry code cannot be empty!Industry code does not exist!Sales turnover of last year cannot be empty!Incorrect sales turnover of last year input!Year(s) in business cannot be empty!Incorrect year(s) in business input!Location(s) of business cannot be empty!Location(s) of business exceeded limit: 3Industry details cannot be empty!Industry details exceeded maximum length
We only support partnership business in Hong KongWe only support sole proprietorship business in Hong KongPlease enter the ciNumber.Please enter the brNumber.Operating place cannot be empty!Operating address cannot be empty!Operating address exceeded maximum lengthCompany registered place cannot be empty!Company registered place not supported:[区域名称]The operating place is not supported:[区域名称]Company registered address cannot be empty!Company registered address maximum lengthCompany registered address in English onlyWebsite exceeded maximum lengthIncorrect business type!Business registration certificate number exceeded max lengthBusiness registration certificate number cannot be emptyCertificate of incorporation number exceeded maximum lengthCertificate of incorporation number cannot be emptyName of business in English cannot be empty!Name of business in Chinese cannot be empty!Name of business in Chinese exceeded maximum lengthName of business in English exceeded maximum lengthNot allowed optionPlease upload a valid proof of Certificate of IncorporationPlease upload a valid proof of Memorandum and Articles of AssociationPlease upload a valid proof of Business RegistrationPlease upload a valid proof of Partnership AgreementPlease upload a valid proof of Certificate of IncumbencyPlease upload a valid proof of KYC FilesDuplicated documentPlease enter a valid business type.Company incorporation date cannot be emptyCompany incorporation date cannot be empty be greater than current date:[对应数值]Place of financial regulator cannot be empty!Incorrect place of financial regulator input!Name of regulator cannot be empty!Name of regulator exceeded maximum lengthType of license cannot be empty!Type of license exceeded maximum lengthIncorrect place of incorporation!Sorry, the country/region is not supported yet! ... :{placeOfIncorporation}Please upload a valid proof of License/Certificate of Financial InstitutionPlace of listing cannot be empty!Incorrect place of listing input!Name of exchange cannot be empty!Name of exchange exceeded maximum lengthStock code cannot be empty!Stock code exceeded maximum lengthPlace of government owner cannot be empty!Incorrect place of government owner input!
Email exceeded maximum lengthIncorrect email address formatAreaCode exceeded maximum lengthMobileNumber exceeded maximum lengthIncorrect country/region of key peopleIncorrect country/region and idType of key peopleIncorrect idTypeThe user's idv information is incompleteLast name in English exceeded maximum lengthLast name in English and first name in English cannot have only one valueFirst name in English exceeded maximum lengthName in Chinese exceeded maximum lengthidNumber exceeded maximum lengthIncorrect genderPlease upload a valid proof of key peoplePlease set a valid quorumId Number[{idNumber}] was duplicate!Signer must be equal or greater than quorumDirect number has to be between 1 to 99Partner number has to be between 2 to 6Please add at least one ownerPlease add at most one ownerOnly limited company can create directorOnly partnership can create partnerPlease select at least one role for user:IsOwner is only supported by sole proprietorship
Shareholder structure cannot be emptyIncorrect Level in sharesholder structure, only Zero to Ten LevelLast name in English exceeded maximum lengthFirst name in English exceeded maximum lengthName in Chinese exceeded maximum lengthShareholder (company) name in English exceeded maximum lengthShareholder (company) name in Chinese exceeded maximum lengthShareholder (company) RegulatorName exceeded maximum lengthShareholder (company) ExchangeName exceeded maximum lengthShareholder (company) Stock code exceeded maximum lengthIncorrect ownedSharesPercentShareholder type cannot be emptyPlease input correct shareholder type:{type}Shareholder (personal) name in English and Chinese cannot be empty at the same time!Shareholder (company) name cannot be emptyShareholder (company) business type cannot be emptyPlease input correct business type for the shareholder (company):{businessType}We only support sole proprietorship business in Hong KongWe only support partnership business in Hong KongShareholder (company) place of incorporate cannot be emptyIncorrect shareholder (company) place of incorporateWe only support company registered place for partnership and sole proprietorship in Hong Kong onlyLast name in English and first name in English cannot have only one valueParentId cannot be emptyListed/government owner/financial regulator not support partnership businessPlace of financial regulator cannot be empty!Place of financial regulator not supported!Name of regulator cannot be empty!Name of regulator exceeded maximum lengthType of license cannot be empty!Type of license exceeded maximum lengthListed/government owner not support sole proprietorship businessPlace of listing cannot be empty!Place of listing not supported!Name of exchange cannot be empty!Name of exchange exceeded maximum lengthStock code cannot be empty!Stock code exceeded maximum lengthPlace of government owner cannot be empty!Incorrect place of government owner input!Corresponding shareholder type for sameId[{id}] is differentCorresponding shareholder name for sameId[{id}] is differentIncorrect parentId in sharesholder structureAbnormal shareholder structureShareholder structure cannot exceed 10 layersShareholder structure is not necessary
Customer type error.

