发起门店主体匹配
发起门店主体匹配。该接口允许服务商批量查询门店主体是否已在微信支付开通相关支付产品,匹配结果可用于后续企业支付业务的开展。企业可通过此接口确认合作门店的支付能力,提前了解是否可以使用企业支付功能进行消费。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
sp_mchid | string | 服务商商户号 |
out_batch_id | string | 商户主体匹配批次单号 |
match_details | object[] | 主体匹配明细列表 |
organization_code | string | 门店统一社会信用代码 |
store_name | string | 门店名称 |
product_type | string | 需要查询的支付产品CODE_PAY | NONE 枚举值之一 |
php
$instance->v3->webizpay->stores->entityMatches->postAsync([
'json' => [
'sp_mchid' => '12341234',
'out_batch_id' => 'batch12345678',
'match_details' => [[
'organization_code' => '91110000710926094P',
'store_name' => '微信小店',
'product_type' => 'CODE_PAY',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/webizpay/stores/entity-matches')->postAsync([
'json' => [
'sp_mchid' => '12341234',
'out_batch_id' => 'batch12345678',
'match_details' => [[
'organization_code' => '91110000710926094P',
'store_name' => '微信小店',
'product_type' => 'CODE_PAY',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/webizpay/stores/entity-matches']->postAsync([
'json' => [
'sp_mchid' => '12341234',
'out_batch_id' => 'batch12345678',
'match_details' => [[
'organization_code' => '91110000710926094P',
'store_name' => '微信小店',
'product_type' => 'CODE_PAY',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->webizpay->stores->entityMatches->post([
'json' => [
'sp_mchid' => '12341234',
'out_batch_id' => 'batch12345678',
'match_details' => [[
'organization_code' => '91110000710926094P',
'store_name' => '微信小店',
'product_type' => 'CODE_PAY',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/webizpay/stores/entity-matches')->post([
'json' => [
'sp_mchid' => '12341234',
'out_batch_id' => 'batch12345678',
'match_details' => [[
'organization_code' => '91110000710926094P',
'store_name' => '微信小店',
'product_type' => 'CODE_PAY',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/webizpay/stores/entity-matches']->post([
'json' => [
'sp_mchid' => '12341234',
'out_batch_id' => 'batch12345678',
'match_details' => [[
'organization_code' => '91110000710926094P',
'store_name' => '微信小店',
'product_type' => 'CODE_PAY',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sp_mchid | string | 服务商商户号 |
out_batch_id | string | 商户主体匹配批次单号 |
batch_id | string | 微信支付主体匹配批次单号 |
time | string | 批次创建时间 |
state | string | 批次状态ACCEPTED | IN_PROGRESS | COMPLETED | CLOSED 枚举值之一 |
参阅 官方文档