跳转到主要内容

概述

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

鉴权与签名

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

收付款与转账

1. 静态收款地址查询

查询指定钱包的 Request Payment 静态收款地址。 请求路径 POST /api/v1/wallet/static-address/query 请求参数 响应参数 StaticAddressData 字段: 请求示例
响应示例

2. 查询支持币种

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

3. Request Payment 订单申报

申报 Request Payment 入金订单。 请求路径 POST /api/v1/payment/order/declare 请求参数 Material 字段: 响应参数 请求示例
响应示例

4. Request Payment 订单材料补充

为已申报的订单补充商品/物流材料。 请求路径 POST /api/v1/payment/order/add/materials 请求参数 Material 字段同「3. Request Payment 订单申报」。 响应参数 请求示例
响应示例
响应示例

5. 订单详情

按订单号或外部订单号查询钱包订单详情。 请求路径 POST /api/v1/payment/order/detail 请求参数 响应参数 WalletOrderDetailData 字段: 请求示例
响应示例

6. 订单列表

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

7. 对账单下载

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

银行账户管理

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

8. 添加收款账号

请求路径 POST /api/v1/wallet/bank_account/add 请求参数 响应参数 请求示例
响应示例

9. 更新收款账号

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

10. 删除收款账号

请求路径 POST /api/v1/wallet/bank_account/del 请求参数 响应参数 请求示例
响应示例

11. 查询收款账号

请求路径 POST /api/v1/wallet/bank_account/get 请求参数 响应参数 请求示例
响应示例

兑换与出金

12. Payout 询价

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

13. Payout 下单

基于询价 ID 下单。 请求路径 POST /api/v1/payout/book 请求参数 响应参数 PayoutBookData 字段: 请求示例
响应示例

14. Payout 订单查询

按订单号或询价 ID 查询订单。 请求路径 POST /api/v1/payout/enquiry 请求参数 响应参数 PayoutData 字段: 请求示例
响应示例

15. Payout 重新结算

针对结算失败或退款订单发起重新结算。 请求路径 POST /api/v1/payout/reSettle 请求参数 响应参数 PayoutReSettleData 字段: 请求示例
响应示例

回调(Webhook)

新接入请使用签名协议 v2(Ed25519)。协议 v1(HMAC-SHA256)计划于 **2027-01-31 24:00(UTC+8)**停止支持。协议及示例见 callback 验签。

请求规范

请求头

签名验证

签名协议 v2(Ed25519) 使用平台 JWKS 验签,详见 callback 验签。不要使用客户请求公钥,也不要回退 HMAC。
在截止前,明确配置为 v1 的客户使用共享 sign_secret 和旧版拼接规则:
  • PATH:现有 JSON 发送端使用的旧版 URL 解码后的 callback path,不含域名与 query;不是 v2 的原始 path/query 规则
  • BODY:HTTP 请求体原始字节

验签步骤

  1. 取请求头:X-Timestamp、X-Nonce、X-Signature、X-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 比对 expected 与 X-Signature,不要用 ==(防时序攻击)
  6. 防重放:验签成功后原子占用客户/nonce;另用稳定业务事件标识做业务幂等,不能把 nonce 当作事件标识。

避坑提示

  • 必须是原始字节:任何中间件/框架如果在你拿到 body 之前做了反序列化、字符重编码、JSON 规范化(例如 JSON.stringify 重排字段或美化空格),都会让签名失配。
  • PATH 严格匹配:按上方 v1 规则取值,保留前缀和尾斜杠,不要改用 v2 的原始 path/query。
  • 大小写敏感:X-Signature 是小写 hex;METHOD 固定大写 POST。
  • 空 body 也要参与签名:若本次回调 body 为空,SHA256_HEX("") = e3b0c442...b855,不能省略。

多语言参考实现

Python
Node.js
Java
Go
调试提示 核对 path、body 原始字节和编码时,只记录脱敏元数据、长度及请求关联 ID,不导出客户正文、私钥或共享凭证。

响应要求

  • 商户端应在对应环境与平台约定的超时时限内及时完成应答。
  • 仅 HTTP 状态码 2xx 表示投递成功,不看正文的业务 code。429、5xx 和网络失败会重试,其他 4xx 不会自动重试。
  • 响应体建议遵循统一约定:
成功接收:
临时处理失败,需要平台重试:
签名无效时返回 HTTP 401,不进入业务处理;该状态不会自动触发重试。不要仅用 HTTP 200 的响应正文表示接收失败。

幂等与重放防护

  • 业务幂等:使用稳定事件键(如业务支持的“事件类型 + 订单号 + 状态/版本”)。V2 重试会更换 nonce;仅按订单号去重可能合并不同事件。
  • 防重放:验签成功后,在共享存储中原子占用 (client_id, nonce),至少保留11分钟;它不能替代业务幂等。
  • 重放防护:校验 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.