跳转式GooglePay收银台
POST
/cashier::: caution
若使用Useepay的GooglePay直接跳转收银台,需要先向UseePay工作人员联系开通GooglePay支付方式,才可进行以下对接
:::
流程说明
sequenceDiagram
Customer->>Merchant: 点击支付
Merchant->>UseePay Server: 调用/cashier接口
UseePay Server->>Merchant: Response[redirectUrl(收银台)]
Merchant->>Customer: 展示redirectUrl(收银台)页面
Customer->>UseePay收银台: 输入CardNo,CVV等信息点击支付按钮
UseePay收银台 ->> UseePay Server: 确认支付
UseePay Server->>UseePay收银台: 展示支付结果
UseePay收银台->>Merchant: 展示支付结果,并同步通知/cashier接口传输redirectUrl页面
UseePay Server-->>Merchant: 异步通知notifyUrl接口
请求参数对象说明
payerInfo
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
paymentMethod | Y | string | 目前固定为 googlepay |
authorizationMethod | Y | string | cvv (普通交易) |
billingAddress | Y | Json String | 账单地址 |
firstName | N | String(56) | 持卡人名(如果为空,则UseePay会用账单/收货地址姓名填充) |
lastName | N | String(56) | 持卡人名(如果为空,则UseePay会用账单/收货地址姓名填充) |
threeDS2RequestData | N | 3ds请求参数 |
billingAddress 账单地址信息
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
Y | string | 收货邮箱 | |
firstName | Y | string | 收货人名 |
lastName | Y | string | 收货人姓 |
phoneNo | N | string | 收货手机号 |
street | Y | string | 收货街道地址 |
houseNo | N | string | 收货街道地址和门牌号当street存在时可以不填 |
postalCode | Y | string | 邮编,如果该国家或地区由邮编必须传,否则可以不传 |
city | Y | string | 城市 |
state | Y | string | 省/州/地区, 需满足 ISO 3166-2 |
country | Y | string | 国家,ISO 两位大写英文国家代码, 需满足 ISO 3166-1 |
orderInfo 订单信息
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
subject | Y | string | 订单标题 |
goodsInfo | Y | array | 商品信息, 请参考 goodsInfo |
shippingAddress | Y | object | 收货地址, 请参考 shippingAddress |
goodsInfo 商品信息
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
id | Y | string | sku id |
name | Y | string | 商品名 |
body | Y | string | 商品描述 |
quantity | Y | number | 商品数量 |
price | Y | string | 商品价格,必须大于0,单位为对应货币的最小 货币单位参考货币单位一节 |
url | N | string | 商品链接 |
image | N | string | 商品图片 |
[
{
"id": "商品编号",
"name": "商品名称",
"body": "商品描述",
"category": "商品类目",
"categoryTree": "商品类目树,不同级别类目使用”|”分割",
"brand": "商品品牌",
"quantity": 1,
"price": 1234,
"url": "商品url",
"sku": "商品sku",
"image": "商品图片url"
}
]
shippingAddress 收货地址
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
Y | string | 收货邮箱 | |
phoneNo | N | string | 收货手机号 |
firstName | Y | string | 收货人名 |
lastName | Y | string | 收货人姓 |
street | Y | string | 收货街道地址 |
houseNo | N | string | 收货街道地址和门牌号当street存在时可以不填 |
postalCode | Y | string | 邮编,如果该国家或地区由邮编必须传,否则可以不传 |
city | N | string | 城市 |
state | Y | string | 省/州/地区, 需满足 ISO 3166-2 |
country | Y | string | 国家,ISO 两位大写英文国家代码, 需满足 ISO 3166-1 |
{
"email": "haile1y@useepay.com",
"phoneNo": "123123",
"firstName": "Victor",
"lastName": "Yang",
"street": "Heathcoat House, 20 Savile Row",
"postalCode": "W1S 3PR",
"city": "London",
"state": "LND",
"country": "GB"
}
userInfo
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
userId | N | string | max=128 用户id |
ip | Y | string | max=128 IPv4或IPv6 |
Y | string | max=128用户邮箱 | |
phoneNo | N | string | max=32 用户手机号 |
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/x-www-form-urlencoded
Body 参数application/x-www-form-urlencoded
appId
string
必需
提交审核的网站, 需与商户后台网站审核值一致 (128)
示例值:
www.pay.com
autoRedirect
string
可选
是否302跳转 true/ false 默认 true
示例值:
false
country
string
可选
示例值:
JP
echoParam
string
可选
maxlength:256 回声参数,Response 中将会原样返回
示例值:
echoParam
merchantNo
string
商户号 (16)
示例值:
500000000007362
notifyUrl
string
可选
maxlength:512 异步通知地址 推荐传输
示例值:
http://gatewaytest.useepay.com/notifyV2u0
orderInfo
string
必需
订单信息。请参考文档上方的对象参数说嘛
示例值:
{"subject":"order title","goodsInfo":[{"id":"商品编号","name":"商品名称","body":"商品描述","category":"商品类目","categoryTree":"商品类目树,不同级别类目使用”|”分割","brand":"商品品牌","quantity":1,"price":1234,"url":"商品url","sku":"商品sku","image":"商品图片url"}],"shippingAddress":{"email":"haile1y@useepay.com","phoneNo":"123123","firstName":"Victor","lastName":"Yang","street":"Heathcoat House, 20 Savile Row","postalCode":"W1S 3PR","city":"London","state":"LND","country":"GB"}}
payerInfo
string
必需
付款方信息,请参考 参数说明
示例值:
{"authorizationMethod":"cvv","threeDS2RequestData":{"deviceChannel":"browser","acceptHeader":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","colorDepth":24,"javaEnabled":"false","language":"zh-HK","screenHeight":1080,"screenWidth":1920,"timeZoneOffset":-480,"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36","threeDSMethodCallbackUrl":"http://star-saas.mynatapp.cc:80/api/UseePayReturn?tradeNo=166614926624432064&type=1"},"billingAddress":{"houseNo":"El Gallo Giro(https://gallogiro.com/)","email":"hai1ley@useepay.com","phoneNo":"1235854433","firstName":"amber","lastName":"Yang","stlogreet":"7148 Pacific Blvd, Huntington Park, CA","postalCode":"90225","city":"Huntington Park","state":"CA","country":"MX","street":"street"}}
redirectUrl
string
必需
maxlength=512重定向请求的跳转地址
示例值:
http://192.168.1.56:8005/redirectV2u0
signType
string
必需
maxlength:4 签名类型(MD5/RSA)
示例值:
MD5
terminalType
string
必需
终端类型 WEB/H5
示例值:
WEB
transactionExpirationTime
string
必需
maxlength:6 交易过期时间(单位为分钟)
示例值:
1880
transactionId
string
必需
商户订单号 (max 64)
示例值:
6b4f4765-ceb6-4b34-af47-2e02eb706c6a
transactionType
string
必需
传 pay / authorization
pay: 支付 authorization:预授权
示例值:
pay
userInfo
string
必需
消费者信息,请参考 参数说明
示例值:
{"userId":"victor1","ip":"103.25.65.178","email":"dynam1ic_3d@useepay.com"}
version
string
必需
maxlength=5 目前固定为 1.0
示例值:
1.0
gatewaySource
string
可选
建站平台,如果是自建站则不需要传输
示例值:
SHOPIFY、SHOPLINE、SHOPYY、SHOPBASE、funpinpin等
示例代码
返回响应
成功(autoRedirect=false)(200)
成功(autoRedirect=true)(302)
成功(autoRedirect=false)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
amount
string
金额
redirectUrl
string
收银台地址
当resultCode=received时存在
resultCode
string
业务返回码
判断交易是否成功 received 表示收银台请求被成功接受,可以返回redirectUrl给消费者
sign
string
签名
验证签名
errorCode
string
错误返回码
用于展示给消费者具体的错误信息,可参考错误码页面
transactionId
string
商户订单号
errorMsg
string
错误返回信息
token
string
token
当resultCode=received时存在
transactionType
string
交易类型
pay/authorization
reference
string
业务流水号
UseePay的业务流水号
echoParam
string
可选
signType
string
签名类型
currency
string
币种
merchantNo
string
商户号
示例
{
"amount": "1234",
"redirectUrl": "https://checkout1.uat.useepay.com/v2?accessToken=eAFlVVtvG0UU_ivR9AVQ7OzsJb48kTgNjZQEIyetqqYP493JepTdnWV2Nq5lIsFL20iJUgRFSBVS1ZciIVXACwgK_S-ojssTf4FzZnedbesoludcv3PmO2emRPEsjzTpTsmhUJneZTEnXXJT-FoqskwitpDdZkkIEp-pYG-S8ox07xCWphFP2YTcXSYh03zMJgOZKx9j7A-uX--v3QaXPONqTx7xZCs5lOA2NUF24SdxbQs-H5kP_ioTDPwRN0CORcaqpBjBuFDLdimlnuO0PNqmLdrpuJ0OmMVc-SOW6K0A7DyMV3xazqoNasVDkWmu9gGPMTk2ZVpWi5xAAVBHzBO9w_VIBlhegbMqdko0lA2BF0WjU1I07C2ZVAEkMLVOyVBEkUjCDZ75SqTY1S4J86ImJUog4_G4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sMbyAY1l2o1ZKroIKeuurnJGWdtqHLLhsEEpDxps6FqNIeUdywoct80pOfkflOHNfA%3D%3D",
"resultCode": "received",
"sign": "9080da2b45be15a7d5535e4afd15be3c",
"errorCode": "0000",
"transactionId": "202305250117001",
"errorMsg": "Approved or completed successfully",
"token": "mop:mapi:redis:66ea1a80-fabb-11ed-ab40-b1e900d348e1",
"transactionType": "pay",
"reference": "1012305251317688918",
"echoParam": "echoParam",
"reserved": "reserved",
"signType": "MD5",
"currency": "USD",
"merchantNo": "500000000007362"
}
最后修改时间: 1 年前