保险商户小程序预签约
商户可调用本接口预先指定签约及交易信息(交易信息可选填),生成预签约会话及对应的预签约ID,再携带预签约ID(pre_entrustweb_id)参数,通过小程序跳转参数调用navigateToMiniProgram跳转至微信支付的页面。 官方文档
js
wxpay.v3.papay.insuranceSign.contracts.preEntrustSign.miniProgram.post({
appid,
openid,
plan_id,
out_contract_code,
insured_display_name,
contract_notify_url,
policy_start_date,
policy_end_date,
policy_periods,
amount,
out_trade_no,
description,
transaction_notify_url,
out_user_code,
goods_tag,
attach,
can_auto_insure,
can_auto_reinsure,
real_identity,
}, { headers, })
.then(
({
data: {
pre_entrustweb_id,
redirect_appid,
redirect_path,
},
}) => ({
pre_entrustweb_id,
redirect_appid,
redirect_path,
})
)