预约还款
商户在发起还款前,需要调用该接口进行预约还款
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| contract_id | string | 还款协议ID |
| appid | string | 商户AppID |
| openid | string | 用户标识 |
| schedule_items | object[] | 预约还款项列表 |
| out_record_id | string | 商户侧预约还款单号 |
| sub_mchid | string | 子商户号 |
| sub_appid | string | 子商户AppID |
| repayment_amount | string | 应还款金额 |
| min_repayment_amount | string | 最低还款金额 |
| repayment_date | string | 还款日期 |
| description | string | 产品描述 |
| attach | string | 商户数据包 |
php
$instance->v3->creditRepayment->partner->scheduleRecords->batchCreate->postAsync([
'json' => [
'contract_id' => '20251105000000123456789',
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'schedule_items' => [[
'out_record_id' => '1234567abcde',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxcbda96de0b165489',
'repayment_amount' => '10000',
'min_repayment_amount' => '2000',
'repayment_date' => '2025-11-18',
'description' => '信贷还款',
'attach' => '备注信息',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/credit-repayment/partner/schedule-records/batch-create')->postAsync([
'json' => [
'contract_id' => '20251105000000123456789',
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'schedule_items' => [[
'out_record_id' => '1234567abcde',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxcbda96de0b165489',
'repayment_amount' => '10000',
'min_repayment_amount' => '2000',
'repayment_date' => '2025-11-18',
'description' => '信贷还款',
'attach' => '备注信息',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/credit-repayment/partner/schedule-records/batch-create']->postAsync([
'json' => [
'contract_id' => '20251105000000123456789',
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'schedule_items' => [[
'out_record_id' => '1234567abcde',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxcbda96de0b165489',
'repayment_amount' => '10000',
'min_repayment_amount' => '2000',
'repayment_date' => '2025-11-18',
'description' => '信贷还款',
'attach' => '备注信息',
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->creditRepayment->partner->scheduleRecords->batchCreate->post([
'json' => [
'contract_id' => '20251105000000123456789',
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'schedule_items' => [[
'out_record_id' => '1234567abcde',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxcbda96de0b165489',
'repayment_amount' => '10000',
'min_repayment_amount' => '2000',
'repayment_date' => '2025-11-18',
'description' => '信贷还款',
'attach' => '备注信息',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/credit-repayment/partner/schedule-records/batch-create')->post([
'json' => [
'contract_id' => '20251105000000123456789',
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'schedule_items' => [[
'out_record_id' => '1234567abcde',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxcbda96de0b165489',
'repayment_amount' => '10000',
'min_repayment_amount' => '2000',
'repayment_date' => '2025-11-18',
'description' => '信贷还款',
'attach' => '备注信息',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/credit-repayment/partner/schedule-records/batch-create']->post([
'json' => [
'contract_id' => '20251105000000123456789',
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'schedule_items' => [[
'out_record_id' => '1234567abcde',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxcbda96de0b165489',
'repayment_amount' => '10000',
'min_repayment_amount' => '2000',
'repayment_date' => '2025-11-18',
'description' => '信贷还款',
'attach' => '备注信息',
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| schedule_records | object[] | 预约还款记录列表 |
| out_record_id | string | 商户侧预约还款单号 |
| appid | string | 商户AppID |
| sub_appid | string | 子商户AppID |
| contract_id | string | 还款协议ID |
| repayment_amount | string | 应还款金额 |
| min_repayment_amount | string | 最低还款金额 |
| repayment_date | string | 还款日期 |
| description | string | 产品描述 |
| attach | string | 商户数据包 |
| openid | string | 用户标识 |
参阅 官方文档