Skip to content

发起门店主体匹配

发起门店主体匹配。该接口允许服务商批量查询门店主体是否已在微信支付开通相关支付产品,匹配结果可用于后续企业支付业务的开展。企业可通过此接口确认合作门店的支付能力,提前了解是否可以使用企业支付功能进行消费。

请求参数类型描述
jsonobject声明请求的JSON数据结构
sp_mchidstring服务商商户号
out_batch_idstring商户主体匹配批次单号
match_detailsobject[]主体匹配明细列表
organization_codestring门店统一社会信用代码
store_namestring门店名称
product_typestring需要查询的支付产品
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_mchidstring服务商商户号
out_batch_idstring商户主体匹配批次单号
batch_idstring微信支付主体匹配批次单号
timestring批次创建时间
statestring批次状态
ACCEPTED | IN_PROGRESS | COMPLETED | CLOSED 枚举值之一

参阅 官方文档

Published on the GitHub by TheNorthMemory