发起银联交易
此接口用于商户发起银联交易请求。
请求地址
沙盒环境: http://sandboxwww.666otc.com/api/pay/h5_payment
生产环境: http://www.666otc.com/api/pay/h5_payment
请求方式
POST
请求参数
名称
是否必填
长度
类型
说明
名称
是否必填
长度
类型
说明
appid
是
64
String
appid
description
是
128
String
描述
price
是
16
Float
金额,单位:U,允许小数点后两位
notify_url
是
256
String
回调地址
return_url
是
256
String
支付后跳转地址
order_id
是
64
String
商户平台订单Id
sign
是
64
String
加密结果值
(以curl命令请求生产环境接口为例)示例如下:
curl --location --request POST 'http://127.0.0.1:8000/api/pay/h5_payment' \
--header 'Content-Type: application/json' \
--data-raw '{
"appid": "AfPVZ8qJCpiN5ZqW",
"description": "测试",
"price": 10.04,
"notify_url": "https://www.google.com",
"return_url": "https://www.google.com",
"order_id": "475453750199183313",
"sign": "303921475453756BA8367AA3390AA4D77014CF64"
}'
响应参数
名称
子项
是否
必填
长度
类型
说明
示例值
status
是
--
Integer
请参考本页"应答结果编码"部分
0
data
是
--
Object
接口返回值json串,具体见业务响应参数
pay_url
是
--
String
银联收银台地址
order_id
是
--
String
商户订单号
order_no
是
--
String
平台订单号
成功应答示例如下:
{
"status": 1,
"data": {
"pay_url": "https://pay.mobilebank.co.nz/api/v1.0/web_gateway/partners/D04NOU/orders/P4T5160781880752PS717/pay?redirect=http://www.666otc.com/home/pay/pay_success?order_no=P4T5160781880752PS717&time=1652707819079&nonce_str=t4x6wje267ovx5557efxm7cgokspjm&sign=793ad07cfade5366855b970d663957225e4004b4c3b90466ce0d4d22bf0b036d",
"order_no": "P4T5160781880752PS717",
"order_id": "475453750199183313"
}
}
失败应答示例如下:
{
"err":"签名错误",
"status":0
}
应答结果编码
开发者在调用开放平台接口的时候,相关错误码请参考如下:
错误码
说明
1
平台处理成功
0
平台处理失败
Last updated
Was this helpful?