分账明细说明
一、规则
分账明细需注意满足以下规则:
交易请求中,分账账目信息需完整合规。
商户在支付请求中调用分账功能时,必须在字段desc中提供分账的费用明细,说明费用的来源,并符合信息回传标准。否则,交易将不被处理。
退款时,同账号退款金额不超过收款金额。
在退款请求中调用分账退款功能时,每个账户的退款额不得超过该笔订单中该账户的收款金额,必须满足原路原退原则。否则,退款将不被处理。
二、字段说明
支付接口
参数名:split_fund_info(支付接口)
格式:JSONArray,至多10个条目
子参数列表:
参数 | 描述 |
transIn String(16) | 该笔分账的收款支付宝账户。 规则:必须是国内的支付宝账户 样例:2088621914312260 |
amount Number(8,2) | 该笔分账的分账金额。 规则:总分账金额小于等于订单总金额。若currency为KRW或者JPY,则amount必须为整数。 样例:6.66 |
currency String(3) | 该笔分账的币种。 规则: 支付请求中,有currency、total_fee、rmb_fee三个参数。 若total_fee非空,则该currency与支付请求中的currency保持一致。 若rmb_fee非空,则该currency填CNY。 样例:USD |
desc String | 该笔分账的类目描述及其金额。格式:类目A=金额A|类目B=金额B 规则:
样例:transportation insurance=1.11|operation tax=3.33|delivery fee=2.22</p> |
样例:
场景 | 例子 |
纯国际订单 | split_fund_info=[{"transIn":"2088621914312260","amount":"6.66","currency":"USD","desc":"transportation insurance=1.11|operation tax=3.33|delivery fee=2.22"}] |
国内国际混合订单 | split_fund_info=[{"transIn":"2088621914312260","amount":"126.66","currency":"USD","desc":"delivery fee=2.22|domestic order amount=120|transportation insurance=1.11|operation tax=3.33"}] |
多个分账账户 | split_fund_info=[{"transIn":"2088621914312260","amount":"2.22","currency":"USD","desc":"delivery fee=2.22"},{"transIn":"2088621914312258","amount":"120","currency":"USD","desc":"domestic order amount=120"}] |
退款接口
参数:split_fund_info(退款接口)
格式:JSONArray,至多10个条目
子参数说明:
参数 | 描述 |
transOut String(16) | 该笔分账退款的扣款支付宝账户。 规则:必须是国内的支付宝账户 样例:2088621914312260 |
amount Number(8,2) | 该笔分账退款的退款金额。 规则:
样例:6.66</p> |
currency String(3) | 该笔分账退款的币种。 规则: 退款请求中,有currency、return_amount、return_rmb_amount三个参数。 若return_amount非空,则该currency与退款请求中的currency保持一致。 若return_rmb_amount非空,则该currency填CNY。 样例:USD |
desc String | 该笔分账退款的描述。 样例:delivery fee refund |
三、完整请求示例
1. 支付请求
https://intlmapi.alipay.com/gateway.do?service=create_forex_trade&partner=2088021017666931&_input_charset=UTF-8&sign_type=MD5¬ify_url=https%3A%2F%2Fwww.aliexpress.com%2Fnotify&return_url=https%3A%2F%2Fwww.aliexpress.com¤cy=USD&product_code=NEW_OVERSEAS_SELLER&subject=APPLE%20iPhone%208%20Plus...%20and%20APPLE%20Macbook%20Pro...&out_trade_no=T2019030407262312&total_fee=2098&secondary_merchant_id=K781125&secondary_merchant_name=Global%20Top%20Brands%20Store&secondary_merchant_industry=5965&refer_url=https%3A%2F%2Fwww.aliexpress.com&split_fund_info=%5B%7B%22transIn%22%3A%222088621914312260%22%2C%22amount%22%3A%22708%22%2C%22currency%22%3A%22USD%22%2C%22desc%22%3A%22delivery%20fee%3D20%7Cdomestic%20order%20amount%3D688%22%7D%5D&trade_information=%7B%22business_type%22%3A%224%22%2C%22goods_info%22%3A%22APPLE%20iPhone%208%20Plus%203GB%2064GB%5E1%7CAPPLE%20Macbook%20Pro%2013%20inch%20i5%208G%20256G%20with%20TouchBar%5E1%22%2C%22total_quantity%22%3A%222%22%7D&sign=12cf92fb41329214d64a36af99fce525
以下内容中,账户2088021017666931简称账户A,账户2088621914312260简称账户B。
- 上述请求中,参数total_fee=2098,currency=USD,则分账参数split_fund_info中,仅允许currency为USD,且总金额不超过2098。
- 上述请求中,split_fund_info中账户B的分账金额为708USD。则对于这笔交易,账户A入账1390USD,账户B入账708USD等值人民币。
2. 退款请求
https://intlmapi.alipay.com/gateway.do?service=forex_refund&partner=2088021017666931&_input_charset=UTF-8&sign_type=MD5¬ify_url=https%3A%2F%2Fwww.aliexpress.com%2Fnotify¤cy=USD&product_code=NEW_OVERSEAS_SELLER&out_return_no=R2019030407262312&out_trade_no=T2019030407262312&return_amount=20&gmt_return=2019-03-05%2012%3A12%3A12&reason=delivery%20fee%20refund&split_fund_info=%5B%7B%22transOut%22%3A%222088621914312260%22%2C%22amount%22%3A%2220%22%2C%22currency%22%3A%22USD%22%2C%22desc%22%3A%22delivery%20fee%20refund%22%7D%5D&sign=b306a8217b694dbf7f2746a7a495d3bf
以下内容中,账户2088021017666931简称账户A,2088621914312260简称账户B。上述退款请求中,其原支付请求中,账户A入账1390USD,账户B入账708USD等值人民币。
- 退款请求中,参数partner=账户A,因此该退款请求中,必须满足以下条件:
return_amount - split_fund_info中的总金额 <= 1390USD
- 在参数split_fund_info中,仅允许出现transOut=账户B,且满足以下条件:
split_fund_info中的总金额 <= 708USD