支付授权
DeBox 提供了基于 vBOX 的支付授权接口,为 vBOX 提供更广阔的应用场景。
GEThttps://app.debox.pro/oauth/authorize
⼀次性 token 请求接⼝,该接口用来生成积分支付的订单号和 token,和下面的/payment/transfer 接口联合使用完成积分支付功能。
https://app.debox.pro/oauth/authorize?
app_id=ohpdAP9W55gyXeJ0&scope=payment&grant_type=onetime_token&amount=0.01&
payer_user_id=ii0k2v5n&receiver_user_id=rqg6g4j1&pay_type=send&pay_info=test&
redirect_uri=https://docs.debox.pro/demo/a.html
https://app.debox.pro/oauth/authorize?
app_id=ohpdAP9W55gyXeJ0&scope=payment&grant_type=onetime_token&amount=0.01&
payer_user_id=ii0k2v5n&receiver_user_id=rqg6g4j1&pay_type=send&pay_info=test&
redirect_uri=https://docs.debox.pro/demo/a.html
Parameters
Query
redirect_uri
: String
授权成功跳转链接,需要用encodeURIComponent编码,必须是白名单下的地址,请先配置App Domain
app_id
: String
应用唯一标识,在DeBox开放平台申请
scope
: String
授权范围(payment)
grant_type
: String
授权类型(onetime_token)
amount
: Number
金额,最多两位小数
payer_user_id
: String
付款方user_id,必须为授权用户的user_id
receiver_user_id
: String
收款方user_id,必须为商家的user_id
pay_type
: String
必须为send,代表授权用户是付款方
pay_info
: String
转账信息,用于提示支付的场景