POST SharePay/ShareToReceiver
执行分账,分账请求按照传入的分账接收方账号和资金进行分账,对同一笔订单最多能发起50次分账请求,每次请求最多分给50个接收方 此接口采用异步处理模式,最终的分账结果可以通过查询分账接口获取
请求信息
请求URI参数
无
请求数据参数
分账信息
ShareToReceiverInfo名称 | 说明 | 类型 | 扩展说明 |
---|---|---|---|
store_no |
门店编码. |
字符串 |
必填 字符长度: 必须在 1 和 32 之间 |
order_no |
商户分账单号,同一商户内唯一 |
字符串 |
必填 字符长度: 必须在 1 和 32 之间 |
transaction_no |
要分账的交易流水号 |
字符串 |
必填 |
finished |
是否设置分账完结,如果为true,该笔订单剩余未分账的金额会解冻回分账方商户;如果为false,该笔订单剩余未分账的金额不会解冻回分账方商户,可以对该笔订单再次进行分账。 |
布尔 |
无 |
share_details |
分账明细 |
Collection of ShareToReceiverItemInfo |
无 |
请求数据格式
application/json, text/json
例子:
{ "store_no": "sample string 1", "order_no": "sample string 2", "transaction_no": "sample string 3", "finished": true, "share_details": [ { "account_type": 1, "account": "sample string 1", "amount": 2, "description": "sample string 3" }, { "account_type": 1, "account": "sample string 1", "amount": 2, "description": "sample string 3" } ] }
响应数据
资源说明
分账成功结果
ResultInfoOfShareResultInfo名称 | 说明 | 类型 | 扩展说明 |
---|---|---|---|
code | ResultCode |
无 |
|
msg | 字符串 |
无 |
|
data | ShareResultInfo |
无 |
响应数据格式
application/json, text/json
例子:
{ "code": "SUCCESS", "msg": "sample string 1", "data": { "store_no": "sample string 1", "order_no": "sample string 2", "share_no": "sample string 3", "transaction_no": "sample string 4", "finished": true, "state": "sample string 6", "error": "sample string 7", "share_details": [ { "account_type": 1, "account": "sample string 1", "amount": 2, "description": "sample string 3", "result": "sample string 4", "finish_time": "sample string 5", "fail_reason": "sample string 6" }, { "account_type": 1, "account": "sample string 1", "amount": 2, "description": "sample string 3", "result": "sample string 4", "finish_time": "sample string 5", "fail_reason": "sample string 6" } ] } }