平台收付通,请求分账问题,receivers需要 JSON 数组对象
Q1: 接口返回receivers字段格式不正确,这边检查参数没发现问题[该商户已先调用添加分账接收方接口成功]
URL:https://pay.weixin.qq.com/docs/partner/apis/ecommerce-profit-sharing/orders/create-order.html MESSAGE: 无法将 JSON 输入源“/body/receivers”映射到多重字段“分账接收方列表”中,此字段需要 JSON 数组对象" Array
(
[sub_mchid] => 子商户号
[transaction_id] => 4200002369202409180917349250
[out_order_no] => 2024091851101544
[receivers] => [{"type":"MERCHANT_ID","receiver_account":"子商户号","amount":1,"description":"分账描述"}]
[finish] => 1
)
Client error: `POST https://api.mch.weixin.qq.com/v3/ecommerce/profitsharing/orders` resulted in a `400 Bad Request` response:
{"code":"PARAM_ERROR","detail":{"location":"body","value":"[{\"type\":\"MERCHANT_ID\",\"receiver_account\":\"子商户号\ (truncated...)
{"code":"PARAM_ERROR","detail":{"location":"body","value":"[{\"type\":\"MERCHANT_ID\",\"receiver_account\":\"子商户号\",\"amount\":1,\"description\":\"666\"}]"},"message":"无法将 JSON 输入源“/body/receivers”映射到多重字段“分账接收方列表”中,此字段需要 JSON 数组对象"}