查询分账接收方添加结果
商户发起添加分账接收方请求后,可通过调用本API来查询分账接收方添加结果。只有当微信审核接收方材料通过,接收方关系状态扭转为EFFECTIVE后,才允许调用请求分账API接口来分给该接收方。
请求参数 | 类型 | 描述 |
---|---|---|
base_uri | string | 声明接入点https://apihk.mch.weixin.qq.com/ (香港接入) |
account | string | 接收方账号 |
query | object | 声明请求的查询参数 |
sub_mchid | string | 子商户号 |
transaction_id | string | 微信订单号 |
appid | string | 应用ID |
sub_appid | string | 子商户应用ID |
type | string | 分账接收方类型 |
php
$instance->v3->global->profitSharing->receivers->_account_->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'account' => '86693852',
'query' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/profit-sharing/receivers/{account}')->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'account' => '86693852',
'query' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/profit-sharing/receivers/{account}']->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'account' => '86693852',
'query' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->profitSharing->receivers->_account_->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'account' => '86693852',
'query' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/profit-sharing/receivers/{account}')->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'account' => '86693852',
'query' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/profit-sharing/receivers/{account}']->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'account' => '86693852',
'query' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sub_mchid | string | 子商户号 |
type | string | 分账接收方类型 |
account | string | 分账接收方账号 |
name | string | 分账接收方全称 |
relation_type | string | 与分账方的关系类型 |
custom_relation | string | 自定义的分账关系 |
scene | string | 分账场景详细描述 |
major_service | string | 接收方商户的主营业务范围 |
expected_ratio | integer | 分账接收方预计分账比例 |
file_id | string | 微信文件标识ID |
state | string | 接收方关系状态 |
fail_reason | string | 接收关系添加失败原因 |
参阅 官方文档