扫码支付收银台模式(wechat_native)
POST
/cashier产品展示
时序图
sequenceDiagram
Consumer->>Merchant: 点击支付
Merchant->>UseePay Server: 请求/cashier接口
UseePay Server-)Merchant: response[redirectUrl(收银台地址)]
Merchant->>Consumer: 展示收银台页面
Consumer->> Wechat Server: 手机扫码支付
Wechat Server-->> UseePay Server: 异步通知支付结果
UseePay 收银台->> UseePay Server: 查询支付结果
UseePay Server-)UseePay 收银台: 返回查询结果
UseePay 收银台-) Merchant:展示支付结果,并且通知/cashier的redirectUrl页面
UseePay Server-->> Merchant: 异步通知支付结果
请求参数对象说明
payerInfo
参数 | 类型 | 说明 | 是否必填 |
---|---|---|---|
paymentMethod | string | 固定值 wechat_native | Y |
authorizationMethod | string | 固定值 cvv | Y |
billingAddress | string(string) | 账单地址 | N |
orderInfo
参数 | 类型 | 说明 | 是否必填 |
---|---|---|---|
subject | String(128) | 订单标题,可以是商品名称。这个最终会提现在微信支付账单中 | Y |
goodsInfo | string(json array) | 商品详细新下 | N |
shippingAddress | string(json) | 账单地址 | N |
userInfo
请求参数
Body 参数application/x-www-form-urlencoded
appId
string
网站域名(128)
示例值:
www.pay.com
autoRedirect
string
可选
是否302跳转,默认 true true/ false
示例值:
false
echoParam
string
可选
回声参数,Response 中将会原样返回 (max=256)
示例值:
echoParam
gatewaySource
string
可选
数据来源 1. useepay 2. shoplazza 3. shopline 如有新增,请联系UseePay
示例值:
useepay
merchantNo
string
必需
商户号(max=16)
示例值:
500000000007245
notifyUrl
string
可选
异步通知地址(max=512)
示例值:
https://gatewaytest.useepay.com/notifyV2u0
orderInfo
string
订单详情:
示例值:
{"shippingAddress":{"email":"amber.lei@useepay.com","phoneNo":"123","firstName":"amber","lastName":"lei","street":"118 trenton drive","postalCode":"37830","city":"city","state":"Tennessee","country":"US"},"subject":"订单标题","goodsInfo":[{"id":"商品编号","name":"商品名称","body":"商品描述","category":"商品类目","categoryTree":"商品类目树,不同级别类目使用”|”分割","brand":"商品品牌","quantity":1,"price":1234,"url":"商品url","sku":"商品sku","image":"商品图片url"}]}
payerInfo
string
付款人信息
示例值:
{"paymentMethod":"wechat_native","authorizationMethod":"cvv","firstName":"amber","lastName":"lei","billingAddress":{"houseNo":"102","email":"amber.lei@useepay.com","phoneNo":"1235854433","firstName":"amber","lastName":"lei","stlogreet":"7148 Pacific Blvd, Huntington Park, CA","postalCode":"90225","city":"Huntington Park","state":"CA","country":"MX","street":"street"}}
redirectUrl
string
同步通知地址
示例值:
http://192.168.1.56:8003/redirectV2u0
sign
string
必需
签名值: 验证请求是否被串改
示例值:
505f3091cb56e5569b9c74e2767000cc
signType
string
必需
签名类型: MD5/RSA
示例值:
MD5
terminalType
string
必需
终端类型: WEB / H5
示例值:
WEB
transactionExpirationTime
string
必需
过期时间: 单位分钟 1-120
示例值:
120
transactionId
string
可选
商户订单号: max(64)
示例值:
202305260151415
transactionType
string
必需
交易类型: 固定值 pay
示例值:
pay
userInfo
string
必需
用户信息:字符串类型的JSON格式
示例值:
{"ip":"127.0.0.1","email":"amber.lei@useepay.com"}
version
string
版本 固定1.0
示例值:
1.0
示例代码
返回响应
成功(200)
签名失败(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
amount
string
订单金额
必须大于0. 参考金额和货币单位
redirectUrl
string
收银台地址
异步通知地址 resultCode = pending 出现
sign
string
签名
签名值
errorCode
string
错误码
transactionId
string
商户订单号
商户订单号: max(64)
errorMsg
string
错误码消息描述
用于展示给消费者具体的错误信息
transactionType
string
交易类型
固定值 pay
reference
string
交易流水号
UseePay返回的交易流水号
echoParam
string
回声参数
同Request参数原样返回 (max=256)
signType
string
签名类型
currency
string
币种
币种: 3 位 ISO 金额和货币单位
merchantNo
string
商户号
商户号(max=16)
version
string
版本
版本 固定1.0
示例
成功示例
{
"amount": "100",
"redirectUrl": "https://checkout1.dev.useepay.com/v2?accessToken=eAF1Vl9vG0UQ_y5XtU-Jc3v2nf9IVUncmIYmqYMTWlpXaL27tpfc7R67e3YuIRK89I_UqkVQhFQhVX0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OCFYD0EGsPbqXAgCSEM_ACAPPhByD4q8KAVrx8QElR7Lq54uFoLPJ_6rI-Car-GvN5sD0KognwLq9LH8eDClU5nlRCm9WWWbtDzm7urG5VWumuGPqrS6_F1v0_i_cuXzq0fxByG_3kU1KDuXh155zp8ALMuUey8e03oUKxDhNW0F7jNs95abVzGsA53DrbfY-7Zsp04BQtmHBlxYsECcttXOC4U7wQ3ANk1c9Ij14UTrIGpFSfGSNHmBwzgCR2PAVBcDNoyDC00YH76IFR8hEkKQk7SHMinEawYhRMRA6gq8KsBOqtxvIbVJX-GnLmoTRZEazy05LCwsRZ2CTlcZJooHucUsITIdBLyja4CvRf2N2HaD2VIZ-O8sG3CxZJTye5sSZlTs1C_a0c2hSALRpnslJsZEovssqljGZKR1Hq-ynqam5NjG6zM2zmpU7EtDXQHZujiDWhdGxbFIdDV0sIHVNWqc9msxdtsfElqw2gbp_aubNtZMbfKG7My8jKZivSVPkwnym2oedPm0ysbgTZRmdgx6NVqWR4q3ZQEF_2Agbc1G7ed_Iyucwy3cdHvf401VPdKAOkSKvlBowb_QFYKsw-8xDovMPs_3Le39rbcTIaiOWRk32kYlTD42xDHIYMzF4lsUDh8gfHCpSV_ScM105MHpdmYtoWQ-zCjGsCKuBHhmDdsRrqBWNn3-313ud-r-csIMbpcD_p4GVdRz6tWygGMSef4H2YRR08%3D",
"resultCode": "pending",
"sign": "4656fc2285b5bda56d99e21f87c5cd83",
"errorCode": "3200",
"transactionId": "202305260119196",
"errorMsg": "Transaction is pending",
"transactionType": "pay",
"reference": "1012305261321015501",
"echoParam": "echoParam",
"reserved": "",
"signType": "MD5",
"currency": "USD",
"merchantNo": "500000000007245"
}
最后修改时间: 6 个月前