Skip to content

预约还款

商户在发起还款前,需要调用该接口进行预约还款

请求参数类型描述
jsonobject声明请求的JSON数据结构
contract_idstring还款协议ID
appidstring商户AppID
openidstring用户标识
schedule_itemsobject[]预约还款项列表
out_record_idstring商户侧预约还款单号
sub_mchidstring子商户号
sub_appidstring子商户AppID
repayment_amountstring应还款金额
min_repayment_amountstring最低还款金额
repayment_datestring还款日期
descriptionstring产品描述
attachstring商户数据包
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_recordsobject[]预约还款记录列表
out_record_idstring商户侧预约还款单号
appidstring商户AppID
sub_appidstring子商户AppID
contract_idstring还款协议ID
repayment_amountstring应还款金额
min_repayment_amountstring最低还款金额
repayment_datestring还款日期
descriptionstring产品描述
attachstring商户数据包
openidstring用户标识

参阅 官方文档

Published on the GitHub by TheNorthMemory