Skip to content

商户通过商户协议号查询协议

通过商户协议号查询协议。 直连商户、普通服务商、从业机构服务商、电商收付通服务商均可以通过该接口发起签约协议的查询。 前置条件:商户已经成功获取过免密支付的签约协议。

请求参数类型描述
out_contract_codestring商户签约协议号
service_idnumber免密支付服务ID
php
$instance->v3->passwordExemptContract->contracts->serviceId->_service_id_->outContractCode->_out_contract_code_->getAsync([
  'out_contract_code' => 'wxwtdk20200910100000',
  'service_id' => '12535',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/password-exempt-contract/contracts/service-id/{service_id}/out-contract-code/{out_contract_code}')->getAsync([
  'out_contract_code' => 'wxwtdk20200910100000',
  'service_id' => '12535',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/password-exempt-contract/contracts/service-id/{service_id}/out-contract-code/{out_contract_code}']->getAsync([
  'out_contract_code' => 'wxwtdk20200910100000',
  'service_id' => '12535',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->passwordExemptContract->contracts->serviceId->_service_id_->outContractCode->_out_contract_code_->get([
  'out_contract_code' => 'wxwtdk20200910100000',
  'service_id' => '12535',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/password-exempt-contract/contracts/service-id/{service_id}/out-contract-code/{out_contract_code}')->get([
  'out_contract_code' => 'wxwtdk20200910100000',
  'service_id' => '12535',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/password-exempt-contract/contracts/service-id/{service_id}/out-contract-code/{out_contract_code}']->get([
  'out_contract_code' => 'wxwtdk20200910100000',
  'service_id' => '12535',
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring商户号
contract_idstring免密支付协议ID
appidstring商户AppID
openidstring用户标识
sub_appidstring子商户AppID
sub_openidstring用户标识
service_idnumber免密支付服务ID
out_contract_codestring商户签约协议号
contract_display_accountstring用户账户展示名称
contract_statestring委托代扣协议状态
contract_signed_timestring协议签署时间
contract_terminate_infoobject协议解约信息
contract_termination_modestring协议解约方式
contract_terminated_timestring协议解约时间
contract_termination_remarkstring解约备注

参阅 官方文档

Published on the GitHub by TheNorthMemory