Skip to content

商户协议号查询签约

查询签约关系接口提供单笔签约关系查询, 查询方式:plan_id + out_contract_no模式:传入模板ID和委托代扣协议号进行查询。

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
out_contract_codestring签约协议号
queryobject声明请求的查询参数
appidstring机构APPID
sub_mchidstring子商户号
sp_appidstring机构appid
sp_mchidstring机构商户号
sub_appidstring子商户应用ID
php
$instance->v3->global->papay->contracts->outContractCode->_out_contract_code_->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_contract_code' => '100005698',
  'query' => [
    'appid' => 'wxd678efh567hg6787',
    'sub_mchid' => '1230000109',
    'sp_appid' => 'wx8888888888888888',
    'sp_mchid' => '3200000001',
    'sub_appid' => 'wxcbda96de0b165484',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/papay/contracts/out-contract-code/{out_contract_code}')->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_contract_code' => '100005698',
  'query' => [
    'appid' => 'wxd678efh567hg6787',
    'sub_mchid' => '1230000109',
    'sp_appid' => 'wx8888888888888888',
    'sp_mchid' => '3200000001',
    'sub_appid' => 'wxcbda96de0b165484',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/papay/contracts/out-contract-code/{out_contract_code}']->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_contract_code' => '100005698',
  'query' => [
    'appid' => 'wxd678efh567hg6787',
    'sub_mchid' => '1230000109',
    'sp_appid' => 'wx8888888888888888',
    'sp_mchid' => '3200000001',
    'sub_appid' => 'wxcbda96de0b165484',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->papay->contracts->outContractCode->_out_contract_code_->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_contract_code' => '100005698',
  'query' => [
    'appid' => 'wxd678efh567hg6787',
    'sub_mchid' => '1230000109',
    'sp_appid' => 'wx8888888888888888',
    'sp_mchid' => '3200000001',
    'sub_appid' => 'wxcbda96de0b165484',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/papay/contracts/out-contract-code/{out_contract_code}')->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_contract_code' => '100005698',
  'query' => [
    'appid' => 'wxd678efh567hg6787',
    'sub_mchid' => '1230000109',
    'sp_appid' => 'wx8888888888888888',
    'sp_mchid' => '3200000001',
    'sub_appid' => 'wxcbda96de0b165484',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/papay/contracts/out-contract-code/{out_contract_code}']->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_contract_code' => '100005698',
  'query' => [
    'appid' => 'wxd678efh567hg6787',
    'sub_mchid' => '1230000109',
    'sp_appid' => 'wx8888888888888888',
    'sp_mchid' => '3200000001',
    'sub_appid' => 'wxcbda96de0b165484',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring商户号
appidstring机构APPID
sp_mchidstring机构商户号
sub_mchidstring子商户号
sp_appidstring机构appid
sub_appidstring子商户应用ID
contract_idstring委托代扣协议ID
plan_idinteger模板ID
out_contract_codestring商户侧签约协议号
user_display_namestring用户账户展示名称
statestring协议状态
signed_timestring协议签署时间
terminated_timestring协议签署时间
termination_modestring协议解约方式
termination_notestring解约备注
openidstring商户appid下的用户标识

参阅 官方文档

Published on the GitHub by TheNorthMemory