Skip to content

JSAPI下单并授权

商户系统先通过预签约生成token或者用户免密签约后,再调用该接口在微信支付服务后台生成预支付交易单,返回正确的预支付交易会话标识后再按JSAPI方式调起支付。 官方文档

js
wxpay
.
v3
.
pay
.
transactions
.
jsapiWithContract
.
post
({
appid
,
mchid
,
description
,
out_trade_no
,
time_expire
,
attach
,
notify_url
,
goods_tag
,
support_fapiao
,
amount
,
payer
,
detail
,
scene_info
,
settle_info
,
contract_info
,
}) .
then
(
({
data
: {
prepay_id
,
}, }) => ({
prepay_id
,
}) )

Released under the MIT License. (SITEMAP)