Skip to main content

概述

本套 API 供 ISV 客户 完成 Onboarding 后调用,代其终端客户完成转账、收款、Payout、银行账户管理等日常交易操作。 ISV 调用时传入 walletId,OristaPay 会按 ISV ↔ 商户的归属关系自动完成鉴权。交易接口字段零变更

鉴权与签名

所有接口均需携带签名请求头,详见 认证与签名

接口索引

收付款与转账

1. 静态收款地址查询

查询指定钱包的 Request Payment 静态收款地址。 请求参数 响应参数 StaticAddressData 字段: 请求示例
响应示例

2. 查询支持币种

walletId + type 查询该钱包在指定业务类型下支持的币种、可用网络、单笔金额范围与币种精度。调用方可用该接口在创建入金 / 出金订单前做前置校验,避免提交未开通或超出限额的币种组合。 请求参数 响应参数 SupportedCurrenciesQueryData 字段: 请求示例
响应示例

3. Request Payment 订单申报

申报 Request Payment 入金订单。 请求参数 Material 字段: 响应参数 请求示例
响应示例

4. Request Payment 订单材料补充

为已申报的订单补充商品/物流材料。 请求参数 Material 字段同「1. Request Payment 订单申报」。 响应参数 请求示例
响应示例
响应示例

5. 订单详情

按订单号或外部订单号查询钱包订单详情。 请求参数 响应参数 WalletOrderDetailData 字段: 请求示例
响应示例

6. 订单列表

walletId 分页查询钱包订单列表,可通过订单状态、币种和创建时间范围进行筛选。返回的订单数据使用钱包订单统一结构,适合用于订单列表页、对账前置查询或按状态轮询订单进度。 请求参数 响应参数 Page 字段: WalletOrderDetailData 字段: 请求示例
响应示例

7. 对账单下载

每日上午 9 点可提供 D-1 日对账单下载(时区:香港 UTC+8)。 请求参数 响应参数 WalletBillData 字段: 请求示例
响应示例

银行账户管理

以下接口共享 BankAccountDataFileInfo 定义。
BankAccountData 字段: FileInfo 字段:

8. 添加收款账号

请求参数 响应参数 请求示例
响应示例

9. 更新收款账号

仅可更新非关键字段;accountOwnership / currency / accountType / companyName / companyCode 不在更新范围内。 请求参数 响应参数:与「9. 添加收款账号」相同,dataBankAccountData 请求示例
响应示例:结构与「9. 添加收款账号」响应示例一致。

10. 删除收款账号

请求参数 响应参数 请求示例
响应示例

11. 查询收款账号

请求参数 响应参数 请求示例
响应示例

兑换与出金

12. Payout 询价

获取指定币对价格及转账信息。fromAmount / toAmount 二选一。 请求参数 响应参数 PayoutQuoteData 字段: 请求示例
响应示例

13. Payout 下单

基于询价 ID 下单。 请求参数 响应参数 PayoutBookData 字段: 请求示例
响应示例

14. Payout 订单查询

按订单号或询价 ID 查询订单。 请求参数 响应参数 PayoutData 字段: 请求示例
响应示例

15. Payout 重新结算

针对结算失败或退款订单发起重新结算。 请求参数 响应参数 PayoutReSettleData 字段: 请求示例
响应示例

回调(Webhook)

请求规范

请求头

签名验证

算法与入向接口完全一致(对称),共用同一把 sign_secret
  • PATH:回调 URL 的 path 部分,不含域名与 query
  • BODY:HTTP 请求体原始字节

验签步骤

  1. 取请求头X-TimestampX-NonceX-SignatureX-Api-Key
  2. 校验时间戳窗口abs(now_ms − X-Timestamp) ≤ 5 × 60 × 1000,否则直接拒绝(401
  3. 读取请求体:在任何反序列化/解析之前拿到原始字节(见下方避坑提示)
  4. 重算签名:用 sign_secret 和步骤 3 得到的 body,按上面的公式算出 expected
  5. 常量时间比对:用框架提供的 constant_time_compare / hmac.compare_digest 比对 expectedX-Signature不要用 ==(防时序攻击)
  6. 幂等去重:用 X-Nonce 作为幂等键判重,已处理过则直接返回上次结果

避坑提示

  • 必须是原始字节:任何中间件/框架如果在你拿到 body 之前做了反序列化、字符重编码、JSON 规范化(例如 JSON.stringify 重排字段或美化空格),都会让签名失配。
  • PATH 严格匹配:拼签名用的 PATH 必须和网关发来的 URL path 完全一致——不能加尾斜杠、不能 urldecode、不能去掉前缀。
  • 大小写敏感X-Signature 是小写 hex;METHOD 固定大写 POST
  • 空 body 也要参与签名:若本次回调 body 为空,SHA256_HEX("") = e3b0c442...b855,不能省略。

多语言参考实现

Python
Node.js
Java
Go
调试小技巧 验签失败时,把你算出的 string_to_sign 打印一次 —— 99% 的 bug 都出在这段字符串与网关侧拼的不一致(PATH、BODY 二次序列化、字符编码)。把你的字符串和对应的 X-Request-Id 发给技术支持,可以快速定位。

响应要求

  • 商户端必须在 8 秒内完成响应。
  • HTTP 状态码 2xx 视为回调投递成功;非 2xx、超时或响应体为业务错误均视为失败。
  • 响应体建议遵循统一约定:
成功:
失败:

幂等与重放防护

  • 幂等键:推荐以 X-Nonce 作为幂等键持久化,重复收到同一 key 的回调立刻返回上次处理结果,不重复执行业务。
  • 重放防护:校验 X-Timestamp 与服务器时间差在 ±5 分钟以内,超窗直接拒绝。
  • 签名强校验:任何签名验证失败,直接返回 4xx,不进入业务处理。

事件载荷

16. 订单结果通知

示例

17. 添加收款账号结果通知

示例

18. Payout 结果通知

示例

19. Payout 退款结果通知

示例

20. Payout 重新结算结果通知

示例

附录

响应码

Payout 订单状态

入金订单状态

订单类型

字段说明:amount(金额)

字段类型恒为 string,精度按币种类型区分:
  • 数币(Digital Currency):最多保留 6 位小数,满足链上交易精度需求。
  • 法币(Fiat Currency):最多保留 2 位小数,精确到「分」。
  • 日元(JPY):无小数货币,必须为整数,不得包含小数部分。
请按币种严格控制金额格式,避免精度误差或接口处理异常。

付款目的(purpose)

国家地区编码

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: 3
  • Industry 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: 3
  • Industry details cannot be empty!
  • Industry details exceeded maximum length
[Entity details]
  • We only support partnership business in Hong Kong
  • We only support sole proprietorship business in Hong Kong
  • Please enter the ciNumber.
  • Please enter the brNumber.
  • Operating place cannot be empty!
  • Operating address cannot be empty!
  • Operating address exceeded maximum length
  • Company 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 length
  • Company registered address in English only
  • Website exceeded maximum length
  • Incorrect business type!
  • Business registration certificate number exceeded max length
  • Business registration certificate number cannot be empty
  • Certificate of incorporation number exceeded maximum length
  • Certificate of incorporation number cannot be empty
  • Name of business in English cannot be empty!
  • Name of business in Chinese cannot be empty!
  • Name of business in Chinese exceeded maximum length
  • Name of business in English exceeded maximum length
  • Not allowed option
  • Please upload a valid proof of Certificate of Incorporation
  • Please upload a valid proof of Memorandum and Articles of Association
  • Please upload a valid proof of Business Registration
  • Please upload a valid proof of Partnership Agreement
  • Please upload a valid proof of Certificate of Incumbency
  • Please upload a valid proof of KYC Files
  • Duplicated document
  • Please enter a valid business type.
  • Company incorporation date cannot be empty
  • Company 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 length
  • Type of license cannot be empty!
  • Type of license exceeded maximum length
  • Incorrect place of incorporation!
  • Sorry, the country/region is not supported yet! ... :{placeOfIncorporation}
  • Please upload a valid proof of License/Certificate of Financial Institution
  • Place of listing cannot be empty!
  • Incorrect place of listing input!
  • Name of exchange cannot be empty!
  • Name of exchange exceeded maximum length
  • Stock code cannot be empty!
  • Stock code exceeded maximum length
  • Place of government owner cannot be empty!
  • Incorrect place of government owner input!
[Key people]
  • Email exceeded maximum length
  • Incorrect email address format
  • AreaCode exceeded maximum length
  • MobileNumber exceeded maximum length
  • Incorrect country/region of key people
  • Incorrect country/region and idType of key people
  • Incorrect idType
  • The user's idv information is incomplete
  • Last name in English exceeded maximum length
  • Last name in English and first name in English cannot have only one value
  • First name in English exceeded maximum length
  • Name in Chinese exceeded maximum length
  • idNumber exceeded maximum length
  • Incorrect gender
  • Please upload a valid proof of key people
  • Please set a valid quorum
  • Id Number[{idNumber}] was duplicate!
  • Signer must be equal or greater than quorum
  • Direct number has to be between 1 to 99
  • Partner number has to be between 2 to 6
  • Please add at least one owner
  • Please add at most one owner
  • Only limited company can create director
  • Only partnership can create partner
  • Please select at least one role for user:
  • IsOwner is only supported by sole proprietorship
[Shareholder]
  • Shareholder structure cannot be empty
  • Incorrect Level in sharesholder structure, only Zero to Ten Level
  • Last name in English exceeded maximum length
  • First name in English exceeded maximum length
  • Name in Chinese exceeded maximum length
  • Shareholder (company) name in English exceeded maximum length
  • Shareholder (company) name in Chinese exceeded maximum length
  • Shareholder (company) RegulatorName exceeded maximum length
  • Shareholder (company) ExchangeName exceeded maximum length
  • Shareholder (company) Stock code exceeded maximum length
  • Incorrect ownedSharesPercent
  • Shareholder type cannot be empty
  • Please input correct shareholder type:{type}
  • Shareholder (personal) name in English and Chinese cannot be empty at the same time!
  • Shareholder (company) name cannot be empty
  • Shareholder (company) business type cannot be empty
  • Please input correct business type for the shareholder (company):{businessType}
  • We only support sole proprietorship business in Hong Kong
  • We only support partnership business in Hong Kong
  • Shareholder (company) place of incorporate cannot be empty
  • Incorrect shareholder (company) place of incorporate
  • We only support company registered place for partnership and sole proprietorship in Hong Kong only
  • Last name in English and first name in English cannot have only one value
  • ParentId cannot be empty
  • Listed/government owner/financial regulator not support partnership business
  • Place of financial regulator cannot be empty!
  • Place of financial regulator not supported!
  • Name of regulator cannot be empty!
  • Name of regulator exceeded maximum length
  • Type of license cannot be empty!
  • Type of license exceeded maximum length
  • Listed/government owner not support sole proprietorship business
  • Place of listing cannot be empty!
  • Place of listing not supported!
  • Name of exchange cannot be empty!
  • Name of exchange exceeded maximum length
  • Stock code cannot be empty!
  • Stock code exceeded maximum length
  • Place of government owner cannot be empty!
  • Incorrect place of government owner input!
  • Corresponding shareholder type for sameId[{id}] is different
  • Corresponding shareholder name for sameId[{id}] is different
  • Incorrect parentId in sharesholder structure
  • Abnormal shareholder structure
  • Shareholder structure cannot exceed 10 layers
  • Shareholder structure is not necessary
[Others]
  • Customer type error.