konbini 收银台模式
POST
/cashier功能说明
时序图
sequenceDiagram
Customer->>Merchant: 点击支付
Merchant->>UseePay Server: 调用/cashier接口
UseePay Server->>Merchant: Response[redirectUrl(收银台)]
Merchant->>Customer: 展示收银台页面
Customer->>UseePay收银台: 使用konbin进行支付
UseePay收银台 ->> UseePay Server: 请求支付
UseePay Server->>UseePay收银台: 展示支付结果
UseePay收银台->>Merchant: 展示支付结果,并同步通知/cashier接口传输redirectUrl页面
UseePay Server-->>Merchant: 异步通知notifyUrl接口
请求对象参数说明
PayerInfo 请求参数说明
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
paymentMethod | Y | String | 目前固定为 konbini |
billingAddress | Y | Json String | 账单信息 |
billingAddress Object
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
firstName | Y | string | 收货人名 |
lastName | Y | string | 收货人姓 |
Y | string | 收货邮箱 | |
phoneNo | Y | string | 收货手机号 |
street | N | string | 收货街道地址 |
houseNo | N | string | 收货街道地址和门牌号当street存在时可以不填 |
postalCode | N | string | 邮编,如果该国家或地区由邮编必须传,否则可以不传 |
city | N | string | 城市 |
state | N | string | 省/州/地区, 需满足 ISO 3166-2 |
country | N | string | 国家,ISO 两位大写英文国家代码, 需满足 ISO 3166-1 |
orderInfo 订单信息
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
subject | Y | string | 订单标题 |
goodsInfo | N | array | 商品信息, 请参考 goodsInfo |
shippingAddress | N | object | 收货地址, 请参考 shippingAddress |
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/x-www-form-urlencoded
Body 参数application/x-www-form-urlencoded
amount
string
必需
支付金额,单位为对应币种的最小货币单位(详见 ISO 4217)(12)
示例值:
100
appId
string
必需
max=128 网站域名
示例值:
www.pay.com
autoRedirect
string
可选
是否302跳转 true/ false 默认 true
示例值:
false
country
string
可选
示例值:
JP
echoParam
string
可选
回声参数,响应报文会原样返回(256)
示例值:
echoParam
merchantNo
string
必需
merchantNo
示例值:
500000000007362
notifyUrl
string
异步通知(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
必需
Json格式的String 付款方信息, 请下方
示例值:
{"paymentMethod":"konbini","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
必需
跳转商户地址(512)
示例值:
http://192.168.1.56:8005/redirectV2u0
sign
string
可选
示例值:
9ee208a2dcdd4bbc9ba0a99be4b6b0d8
signType
string
必需
max=16 商户生成签名字符串所使用的签名算法类型 RSA/MD5
示例值:
MD5
terminalType
string
可选
示例值:
WEB
transactionExpirationTime
string
可选
maxlength=6 过期时间,本地化过期时间建议7天以上
示例值:
1880
transactionId
string
必需
max=64 商户订单号,建议每次请求的 transactionId 唯一,有利于后续订单查询和对账。
示例值:
490f9dc6-59c9-49b5-8c88-2a948f1b4d3b
transactionType
string
必需
交易类型 : pay
示例值:
pay
userInfo
string
必需
示例值:
{"userId":"victor1","ip":"103.25.65.178","email":"useepay@useepay.com"}
version
string
必需
max=5 调用的接口版本,固定为:1.0
示例值:
1.0
示例代码
返回响应
成功(200)
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": "100",
"redirectUrl": "https://checkout1.uat.useepay.com/v2?accessToken=eAFlVVtvG0UU_ivR9NV29uqs94nEbWhRkholpaqaCs3ujNcj784ss7NxrRAJXkojpUoRl5cKibciISHgBQSF_hdU17zxFzhn1xsvIVGszLl-55zvHJ8SzYsyNSQ8JWOhC3NAM05CQrOIa9IhKb0SPaAyAUlO51zfkWOFLrEqpdFzcHhvVOsyLs0-NxPFQDhVMhJSkLMOSajhMzo_VKWOMcG9w1u3RtsPrjsVJHwIYalmR_Oc1y8D_7WDPeoQWaNUMhWSfxhRORUA7gw0SrM1vEikYJDc5EWsRW6UhjBJCTkhgRZghyBns1kPiurFKkNNqTWXcV0SwkuUYkVdL3l4ekxERhN-TMJjsvjqyeKLTxcv_lyef1bq9Jh0jslHJZVGmDkY2PDMtYhrY9txvcoCobfdnz9bvvyx0gjWki9ffb24_KWSx9C6ROn5keZtz-VPvy9f_PD228__eXXx5tdni-cXy99eLp5-X8vf_PF6-eV3f33yzcfwt3j6ZHH-cxUsUgzBNejfXl7-_bpO36RpaetQlV8xLVuK6gX1RZrKNmrox_L8onKoOnKVp3qdPWr6uWJZNawN6FfKQZNxHU-gfXerEeJovIE1HrC43_UH8aDrDSK_G8RB0HXowAvGduQxNwLHeuboYFvQZ8t3Asfx_H4wsN0A9AZQFtsZkBwMrEaABANJQSE5EFQUQyrfL0U8HVGc_hzYB2yfKMkPgOsEAvuB73muC2KeUZGCcEKFnfL5O2XB-ZpDNE2HSo5F0qwJZTQ3sE8hsTzwjpQxKrsPsEFyyIFyfGMIlN-AzLg_YIKNSPgefJRAN0yPQs1pTWJYKrTisKWMcbabJhgbJZIdiYwPVVqR_cburudVJSeZGaI7RzWQ03egSZ7tB5ZlAckzs6-YGM9X2v6WO3Bd3_d8fwtaAzht7NDhRM2GuPJMzeQqY7rGyCUggM7II2gaqG_Y9pZzE2FliLRet_pZT7rav7ZgxYtKhHhgRyEOZZmQ2xAGWrxj_h8dxSW0VI7EYw5jccASGgGbP1JpiiXBIfE7cOqY0DzGUpuWFlDRdp7vUH3bh0zY5bVoFLdEO3BL4InQ0AKf109L473Tnm_jgAOeqJStTteV-OSklWRXqZonTah38fowuF-t1JXsWpg9lSBJm6jVCuHYriq6z6NCmKuyDdXmP0TxtvEXi5vLA2Wg9XAPhJJXtxxDG57lKXAI5-a56_dqbAd8dlsVhrMVj0dI3bXVPY0N3DxxUIYriQBUiWvpBEEVX8_3VEybPsNW7a9uwmGN3SJnsKrNHOuAE2PycHPTHjg9ux_07J7fD4HV_mZj9oFTYvDmvFSk84H2q58tt4-I8DvnQO2VEzmc8HhKwjFNC94hNM9TDgU1SO4w2NCGmU1M_PLoFXALI_W4tzoGWKWawk6EJFN5mNFchAipCH03Gm9Zfas7Zv1-17Y569KIR11m-dyKqEcH1CVn_wKzjJ55",
"resultCode": "received",
"sign": "362e40f06091b1c22914d86c1c050911",
"errorCode": "0000",
"transactionId": "490f9dc6-59c9-49b5-8c88-2a948f1b4d3b",
"errorMsg": "Approved or completed successfully",
"token": "mop:mapi:redis:53bf7060-fd66-11ed-abeb-d05e0ba4a9a3",
"transactionType": "pay",
"reference": "1012305282245689138",
"echoParam": "echoParam",
"signType": "MD5",
"currency": "JPY",
"merchantNo": "500000000007362"
}
最后修改时间: 1 年前