Skip to content

APP预签约自动还款协议

APP预签约

请求参数类型描述
jsonobject声明请求的JSON数据结构
appidstring商户AppID
plan_idstring模板ID
out_contract_codestring服务商签约协议号
display_namestring用户展示名称
contract_notify_urlstring签约结果通知地址
repayment_dayinteger还款日
repayment_amount_limitstring还款金额上限
sub_merchant_codestring子商户号
sub_appidstring子商户AppID
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_merchant_code'      => 'example_sub_merchant_code',
    'sub_appid'              => 'example_sub_appid',
  ],
])
->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_merchant_code'      => 'example_sub_merchant_code',
    'sub_appid'              => 'example_sub_appid',
  ],
])
->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_merchant_code'      => 'example_sub_merchant_code',
    'sub_appid'              => 'example_sub_appid',
  ],
])
->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_merchant_code'      => 'example_sub_merchant_code',
    'sub_appid'              => 'example_sub_appid',
  ],
]);
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_merchant_code'      => 'example_sub_merchant_code',
    'sub_appid'              => 'example_sub_appid',
  ],
]);
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_merchant_code'      => 'example_sub_merchant_code',
    'sub_appid'              => 'example_sub_appid',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
presign_tokenstring预签约码
redirect_servicestring跳转到的签约服务提供方

参阅 官方文档

Published on the GitHub by TheNorthMemory