代扣协议ID查询签约
查询签约关系接口提供单笔签约关系查询, 查询方式:使用微信返回的委托代扣协议contract_id进行查询。
请求参数 | 类型 | 描述 |
---|---|---|
base_uri | string | 声明接入点https://apihk.mch.weixin.qq.com/ (香港接入) |
contract_id | string | 委托代扣协议ID |
query | object | 声明请求的查询参数 |
appid | string | 机构APPID |
sub_mchid | string | 子商户号 |
sp_appid | string | 机构appid |
sp_mchid | string | 机构商户号 |
sub_appid | string | 子商户应用ID |
plan_id | integer | 模板ID |
php
$instance->v3->global->papay->contracts->_contract_id_->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'query' => [
'appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'sp_appid' => 'wx8888888888888888',
'sp_mchid' => '3200000001',
'sub_appid' => 'wxcbda96de0b165484',
'plan_id' => 123,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/papay/contracts/{contract_id}')->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'query' => [
'appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'sp_appid' => 'wx8888888888888888',
'sp_mchid' => '3200000001',
'sub_appid' => 'wxcbda96de0b165484',
'plan_id' => 123,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/papay/contracts/{contract_id}']->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'query' => [
'appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'sp_appid' => 'wx8888888888888888',
'sp_mchid' => '3200000001',
'sub_appid' => 'wxcbda96de0b165484',
'plan_id' => 123,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->papay->contracts->_contract_id_->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'query' => [
'appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'sp_appid' => 'wx8888888888888888',
'sp_mchid' => '3200000001',
'sub_appid' => 'wxcbda96de0b165484',
'plan_id' => 123,
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/papay/contracts/{contract_id}')->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'query' => [
'appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'sp_appid' => 'wx8888888888888888',
'sp_mchid' => '3200000001',
'sub_appid' => 'wxcbda96de0b165484',
'plan_id' => 123,
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/papay/contracts/{contract_id}']->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'query' => [
'appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'sp_appid' => 'wx8888888888888888',
'sp_mchid' => '3200000001',
'sub_appid' => 'wxcbda96de0b165484',
'plan_id' => 123,
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
mchid | string | 商户号 |
appid | string | 机构APPID |
sp_mchid | string | 机构商户号 |
sub_mchid | string | 子商户号 |
sp_appid | string | 机构appid |
sub_appid | string | 子商户应用ID |
contract_id | string | 委托代扣协议ID |
plan_id | integer | 模板ID |
out_contract_code | string | 商户侧签约协议号 |
user_display_name | string | 用户账户展示名称 |
state | string | 协议状态 |
signed_time | string | 协议签署时间 |
terminated_time | string | 协议签署时间 |
termination_mode | string | 协议解约方式 |
termination_note | string | 解约备注 |
openid | string | 商户appid下的用户标识 |
参阅 官方文档