APP预签约自动还款协议
APP预签约
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| appid | string | 商户AppID |
| plan_id | string | 模板ID |
| out_contract_code | string | 服务商签约协议号 |
| display_name | string | 用户展示名称 |
| contract_notify_url | string | 签约结果通知地址 |
| repayment_day | integer | 还款日 |
| repayment_amount_limit | string | 还款金额上限 |
| sub_mchid | string | 子商户号 |
| sub_appid | string | 子商户AppID |
| real_identity | object | 用户实名信息 |
| identity_type | string | 实名验证类型REAL_IDENTITY_TYPE_INVALID | REAL_IDENTITY_TYPE_ID_CARD 枚举值之一 |
| identity_id | string | 自然人证件号码 |
| real_name | string | 自然人姓名 |
| trade_info | object | 交易信息 |
| out_trade_no | string | 商户侧交易单号 |
| deduct_amount | integer | 还款金额 |
| description | string | 产品描述 |
| attach | string | 商户数据包 |
| notify_url | string | 商户回调地址 |
| headers | object | 声明请求的头参数 |
| Wechatpay-Serial | string | 微信支付公钥ID/平台证书序列号 |
php
$instance->v3->creditRepayment->partner->contracts->appPresign->postAsync([
'json' => [
'appid' => 'wxd678efh567hg6787',
'plan_id' => '123',
'out_contract_code' => '100001256',
'display_name' => '*明',
'contract_notify_url' => 'https://pay.weixin.qq.com',
'repayment_day' => 1,
'repayment_amount_limit' => '10000',
'sub_mchid' => '1000000109',
'sub_appid' => 'example_sub_appid',
'real_identity' => [
'identity_type' => 'REAL_IDENTITY_TYPE_INVALID',
'identity_id' => '1axtI9EZUr0343c89xQznxau+cRWPKP4YhVAoj==',
'real_name' => 'OEimkKuua8igpd+0YDgqF2Z61leeGD7x87j3Ph==',
],
'trade_info' => [
'out_trade_no' => '1217752501201407033233368018',
'deduct_amount' => 10000,
'description' => '信贷还款',
'attach' => '备注信息',
'notify_url' => 'https://www.test.com',
],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/credit-repayment/partner/contracts/app-presign')->postAsync([
'json' => [
'appid' => 'wxd678efh567hg6787',
'plan_id' => '123',
'out_contract_code' => '100001256',
'display_name' => '*明',
'contract_notify_url' => 'https://pay.weixin.qq.com',
'repayment_day' => 1,
'repayment_amount_limit' => '10000',
'sub_mchid' => '1000000109',
'sub_appid' => 'example_sub_appid',
'real_identity' => [
'identity_type' => 'REAL_IDENTITY_TYPE_INVALID',
'identity_id' => '1axtI9EZUr0343c89xQznxau+cRWPKP4YhVAoj==',
'real_name' => 'OEimkKuua8igpd+0YDgqF2Z61leeGD7x87j3Ph==',
],
'trade_info' => [
'out_trade_no' => '1217752501201407033233368018',
'deduct_amount' => 10000,
'description' => '信贷还款',
'attach' => '备注信息',
'notify_url' => 'https://www.test.com',
],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/credit-repayment/partner/contracts/app-presign']->postAsync([
'json' => [
'appid' => 'wxd678efh567hg6787',
'plan_id' => '123',
'out_contract_code' => '100001256',
'display_name' => '*明',
'contract_notify_url' => 'https://pay.weixin.qq.com',
'repayment_day' => 1,
'repayment_amount_limit' => '10000',
'sub_mchid' => '1000000109',
'sub_appid' => 'example_sub_appid',
'real_identity' => [
'identity_type' => 'REAL_IDENTITY_TYPE_INVALID',
'identity_id' => '1axtI9EZUr0343c89xQznxau+cRWPKP4YhVAoj==',
'real_name' => 'OEimkKuua8igpd+0YDgqF2Z61leeGD7x87j3Ph==',
],
'trade_info' => [
'out_trade_no' => '1217752501201407033233368018',
'deduct_amount' => 10000,
'description' => '信贷还款',
'attach' => '备注信息',
'notify_url' => 'https://www.test.com',
],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->creditRepayment->partner->contracts->appPresign->post([
'json' => [
'appid' => 'wxd678efh567hg6787',
'plan_id' => '123',
'out_contract_code' => '100001256',
'display_name' => '*明',
'contract_notify_url' => 'https://pay.weixin.qq.com',
'repayment_day' => 1,
'repayment_amount_limit' => '10000',
'sub_mchid' => '1000000109',
'sub_appid' => 'example_sub_appid',
'real_identity' => [
'identity_type' => 'REAL_IDENTITY_TYPE_INVALID',
'identity_id' => '1axtI9EZUr0343c89xQznxau+cRWPKP4YhVAoj==',
'real_name' => 'OEimkKuua8igpd+0YDgqF2Z61leeGD7x87j3Ph==',
],
'trade_info' => [
'out_trade_no' => '1217752501201407033233368018',
'deduct_amount' => 10000,
'description' => '信贷还款',
'attach' => '备注信息',
'notify_url' => 'https://www.test.com',
],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/credit-repayment/partner/contracts/app-presign')->post([
'json' => [
'appid' => 'wxd678efh567hg6787',
'plan_id' => '123',
'out_contract_code' => '100001256',
'display_name' => '*明',
'contract_notify_url' => 'https://pay.weixin.qq.com',
'repayment_day' => 1,
'repayment_amount_limit' => '10000',
'sub_mchid' => '1000000109',
'sub_appid' => 'example_sub_appid',
'real_identity' => [
'identity_type' => 'REAL_IDENTITY_TYPE_INVALID',
'identity_id' => '1axtI9EZUr0343c89xQznxau+cRWPKP4YhVAoj==',
'real_name' => 'OEimkKuua8igpd+0YDgqF2Z61leeGD7x87j3Ph==',
],
'trade_info' => [
'out_trade_no' => '1217752501201407033233368018',
'deduct_amount' => 10000,
'description' => '信贷还款',
'attach' => '备注信息',
'notify_url' => 'https://www.test.com',
],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/credit-repayment/partner/contracts/app-presign']->post([
'json' => [
'appid' => 'wxd678efh567hg6787',
'plan_id' => '123',
'out_contract_code' => '100001256',
'display_name' => '*明',
'contract_notify_url' => 'https://pay.weixin.qq.com',
'repayment_day' => 1,
'repayment_amount_limit' => '10000',
'sub_mchid' => '1000000109',
'sub_appid' => 'example_sub_appid',
'real_identity' => [
'identity_type' => 'REAL_IDENTITY_TYPE_INVALID',
'identity_id' => '1axtI9EZUr0343c89xQznxau+cRWPKP4YhVAoj==',
'real_name' => 'OEimkKuua8igpd+0YDgqF2Z61leeGD7x87j3Ph==',
],
'trade_info' => [
'out_trade_no' => '1217752501201407033233368018',
'deduct_amount' => 10000,
'description' => '信贷还款',
'attach' => '备注信息',
'notify_url' => 'https://www.test.com',
],
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| presign_token | string | 预签约码 |
| redirect_service | string | 跳转到的签约服务提供方 |
参阅 官方文档