通过商户协议号查询委托代扣签约协议
普通服务商可通过本接口查询已经签订的委托代扣签约协议。
请求参数 | 类型 | 描述 |
---|---|---|
out_contract_code | string | 商户签约协议号 |
plan_id | number | 委托代扣模板ID |
query | object | 声明请求的查询参数 |
sub_mchid | string | 子商户号商户号 |
php
$instance->v3->papay->sign->partner->contracts->planId->_plan_id_->outContractCode->_out_contract_code_->getAsync([
'out_contract_code' => 'wxwtdk20200910100000',
'plan_id' => '12535',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/papay/sign/partner/contracts/plan-id/{plan_id}/out-contract-code/{out_contract_code}')->getAsync([
'out_contract_code' => 'wxwtdk20200910100000',
'plan_id' => '12535',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/papay/sign/partner/contracts/plan-id/{plan_id}/out-contract-code/{out_contract_code}']->getAsync([
'out_contract_code' => 'wxwtdk20200910100000',
'plan_id' => '12535',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->papay->sign->partner->contracts->planId->_plan_id_->outContractCode->_out_contract_code_->get([
'out_contract_code' => 'wxwtdk20200910100000',
'plan_id' => '12535',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/papay/sign/partner/contracts/plan-id/{plan_id}/out-contract-code/{out_contract_code}')->get([
'out_contract_code' => 'wxwtdk20200910100000',
'plan_id' => '12535',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/papay/sign/partner/contracts/plan-id/{plan_id}/out-contract-code/{out_contract_code}']->get([
'out_contract_code' => 'wxwtdk20200910100000',
'plan_id' => '12535',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
contract_id | string | 委托代扣协议ID |
sp_mchid | string | 普通服务商商户号 |
sp_appid | string | 普通服务商的AppID |
sub_mchid | string | 子商户号 |
sub_appid | string | 子商户的AppID |
plan_id | number | 委托代扣模板ID |
out_contract_code | string | 商户签约协议号 |
contract_display_account | string | 用户账户展示名称 |
contract_state | string | 委托代扣协议状态 |
contract_signed_time | string | 协议签署时间 |
contract_expired_time | string | 协议到期时间 |
sp_openid | string | 用户OpenID |
sub_openid | string | 子商户AppID对应的用户OpenID |
contract_terminate_info | object | 协议解约信息 |
contract_termination_mode | string | 协议解约方式 |
contract_terminated_time | string | 协议解约时间 |
contract_termination_remark | string | 解约备注 |
out_user_code | string | 商户侧用户标识 |
deduct_schedule | object | 预约扣费场景的预约信息 |
estimated_deduct_date | string | 预计扣费的日期 |
estimated_deduct_amount | object | 预计的扣费金额 |
total | number | 金额 |
currency | string | 货币类型 |
schedule_state | string | 扣费预约状态 |
scheduled_amount | object | 已预约的扣费金额信息 |
total | number | 金额 |
currency | string | 货币类型 |
deduct_amount | object | 实际扣费金额 |
total | number | 金额 |
currency | string | 货币类型 |
deduct_date | string | 实际扣费的日期 |
参阅 官方文档