添加分账方1 请求报文:
【请求地址】:https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver
【请求数据】:
<xml>
<appid>wx498edd4eb1bdd1d7</appid>
<mch_id>1622044259</mch_id>
<sub_appid>wx498edd4eb1bdd1d7</sub_appid>
<sub_mch_id>1630545415</sub_mch_id>
<nonce_str>1668584622256</nonce_str>
<sign>16A9BF068CDDACDEAA6627135B6AA5777947554F824A6E84A5E66B0F07E6AB43</sign>
<sign_type>HMAC-SHA256</sign_type>
<receiver>{"type":"MERCHANT_ID","account":"1627421982","name":"初美优选(上海)供应链管理有限公司","relationType":"PARTNER"}</receiver>
</xml>
【响应数据】:
<xml>
<return_code><![CDATA[SUCCESS]]></return_code>
<result_code><![CDATA[SUCCESS]]></result_code>
<mch_id><![CDATA[1622044259]]></mch_id>
<sub_mch_id><![CDATA[1630545415]]></sub_mch_id>
<appid><![CDATA[wx498edd4eb1bdd1d7]]></appid>
<sub_appid><![CDATA[wx498edd4eb1bdd1d7]]></sub_appid>
<receiver><![CDATA[{"type":"MERCHANT_ID","account":"1627421982"}]]></receiver>
<nonce_str><![CDATA[e06fe01d48291d68]]></nonce_str>
<sign><![CDATA[76A3FF526C414CF088071A673F0A8A2E0E073053D09A79731D058A5F2985288A]]></sign>
</xml>
添加分账方2 请求报文:
【请求地址】:https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver
【请求数据】:
<xml>
<appid>wx498edd4eb1bdd1d7</appid>
<mch_id>1622044259</mch_id>
<sub_appid>wx498edd4eb1bdd1d7</sub_appid>
<sub_mch_id>1630545415</sub_mch_id>
<nonce_str>1668584622837</nonce_str>
<sign>0F5A425CAE1BB018217E146F7072A6F7D35C02803EC4EAB09CBF8BFD7DCA5D39</sign>
<sign_type>HMAC-SHA256</sign_type>
<receiver>{"type":"MERCHANT_ID","account":"1631492067","name":"瑞安市悦美人鲜花工作室","relationType":"DISTRIBUTOR"}</receiver>
</xml>
【响应数据】:
<xml>
<return_code><![CDATA[SUCCESS]]></return_code>
<result_code><![CDATA[SUCCESS]]></result_code>
<mch_id><![CDATA[1622044259]]></mch_id>
<sub_mch_id><![CDATA[1630545415]]></sub_mch_id>
<appid><![CDATA[wx498edd4eb1bdd1d7]]></appid>
<sub_appid><![CDATA[wx498edd4eb1bdd1d7]]></sub_appid>
<receiver><![CDATA[{"type":"MERCHANT_ID","account":"1631492067"}]]></receiver>
<nonce_str><![CDATA[205a75a9c2060ea9]]></nonce_str>
<sign><![CDATA[22EB10EC5A3484AC25A9F95E4AE50366AF8356A66F660D515AFA5B70AF0DB310]]></sign>
</xml>
添加分账方3 请求报文:
【请求地址】:https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver
【请求数据】:
<xml>
<appid>wx498edd4eb1bdd1d7</appid>
<mch_id>1622044259</mch_id>
<sub_appid>wx498edd4eb1bdd1d7</sub_appid>
<sub_mch_id>1630545415</sub_mch_id>
<nonce_str>1668584623408</nonce_str>
<sign>3C88490006622DFEF561F744002D36E2533EC06C62DD024DCD2D83DB9F0A95BD</sign>
<sign_type>HMAC-SHA256</sign_type>
<receiver>{"type":"MERCHANT_ID","account":"1625086514","name":"初美(山东)软件技术有限公司","relationType":"PARTNER"}</receiver>
</xml>
【响应数据】:
<xml>
<return_code><![CDATA[SUCCESS]]></return_code>
<result_code><![CDATA[SUCCESS]]></result_code>
<mch_id><![CDATA[1622044259]]></mch_id>
<sub_mch_id><![CDATA[1630545415]]></sub_mch_id>
<appid><![CDATA[wx498edd4eb1bdd1d7]]></appid>
<sub_appid><![CDATA[wx498edd4eb1bdd1d7]]></sub_appid>
<receiver><![CDATA[{"type":"MERCHANT_ID","account":"1625086514"}]]></receiver>
<nonce_str><![CDATA[c292ea61ffb2eb79]]></nonce_str>
<sign><![CDATA[273EC7C8B593C7C8E7C498E634882A96AA210458FED4FD8F66C22F7BDF264CEC]]></sign>
</xml>
请求分账接口 请求报文:
【请求地址】:https://api.mch.weixin.qq.com/secapi/pay/profitsharing
【请求数据】:
<xml>
<appid>wx498edd4eb1bdd1d7</appid>
<mch_id>1622044259</mch_id>
<sub_appid>wx498edd4eb1bdd1d7</sub_appid>
<sub_mch_id>1630521693</sub_mch_id>
<nonce_str>1668584623805</nonce_str>
<sign>DC4664BF0A0D79D19BC57ACFD553A732E371FD8BC6EC2F45146CA8CF50832706</sign>
<sign_type>HMAC-SHA256</sign_type>
<transaction_id>4200001560202210214684283278</transaction_id>
<out_order_no>873448738571018327</out_order_no>
<receivers>
[
{
"type":"MERCHANT_ID",
"account":"1631492067",
"amount":1500,
"description":"服务店主"
},
{
"type":"MERCHANT_ID",
"account":"1625086514",
"amount":47,
"description":"合作伙伴"
},
{
"type":"MERCHANT_ID",
"account":"1627421982",
"amount":24,
"description":"合作伙伴"
}
]
</receivers>
</xml>
【响应数据】:
<xml>
<return_code><![CDATA[SUCCESS]]></return_code>
<result_code><![CDATA[FAIL]]></result_code>
<err_code><![CDATA[PARAM_ERROR]]></err_code>
<err_code_des><![CDATA[分账接收方关系不存在,请检查参数中每个接收方的关系。]]></err_code_des>
<mch_id><![CDATA[1622044259]]></mch_id>
<sub_mch_id><![CDATA[1630521693]]></sub_mch_id>
<appid><![CDATA[wx498edd4eb1bdd1d7]]></appid>
<sub_appid><![CDATA[wx498edd4eb1bdd1d7]]></sub_appid>
<nonce_str><![CDATA[4f4ec3f207d7fb26]]></nonce_str>
<sign><![CDATA[AE7DB0DAE4AC1F8548B0A211C8DB6CA370FC113644CB15BDE595FA62DF305466]]></sign>
</xml>
各位前辈帮忙看下,已经仔细看过文档了,实在找不到原因!!!