添加分账接收方
服务商可通过此接口添加分账接收方,建立分账接收方列表。连锁加盟模式下,服务商添加的分账接收方统一在品牌主商户号维度进行管理。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
brand_mchid | string | 品牌主商户号 |
appid | string | 公众账号ID |
sub_appid | string | 子商户公众账号ID |
type | string | 分账接收方类型 |
account | string | 分账接收方账号 |
name | string | 接收方名称 |
relation_type | string | 与品牌主商户的的关系类型 |
php
$instance->v3->brand->profitsharing->receivers->add->postAsync([
'json' => [
'brand_mchid' => '1900000108',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
'account' => '1900000109',
'name' => '张三网络公司',
'relation_type' => 'SUPPLIER',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/brand/profitsharing/receivers/add')->postAsync([
'json' => [
'brand_mchid' => '1900000108',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
'account' => '1900000109',
'name' => '张三网络公司',
'relation_type' => 'SUPPLIER',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/brand/profitsharing/receivers/add']->postAsync([
'json' => [
'brand_mchid' => '1900000108',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
'account' => '1900000109',
'name' => '张三网络公司',
'relation_type' => 'SUPPLIER',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->brand->profitsharing->receivers->add->post([
'json' => [
'brand_mchid' => '1900000108',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
'account' => '1900000109',
'name' => '张三网络公司',
'relation_type' => 'SUPPLIER',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/brand/profitsharing/receivers/add')->post([
'json' => [
'brand_mchid' => '1900000108',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
'account' => '1900000109',
'name' => '张三网络公司',
'relation_type' => 'SUPPLIER',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/brand/profitsharing/receivers/add']->post([
'json' => [
'brand_mchid' => '1900000108',
'appid' => 'wx8888888888888888',
'sub_appid' => 'wx8888888888888889',
'type' => 'MERCHANT_ID',
'account' => '1900000109',
'name' => '张三网络公司',
'relation_type' => 'SUPPLIER',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
brand_mchid | string | 品牌主商户号 |
type | string | 分账接收方类型 |
account | string | 分账接收方账号 |
参阅 官方文档