快捷支付


适用于线下门店支付场景,支持微信支付和支付宝+

API URL:https://mapi.yabandpay.com/Payments

Method:POST

POST data type:Json

字段 类型 描述 是否必填
user String 收银员账号的UID 必填
sign String 签名 必填
method String v3.BarcodePayment 必填
time Long 时间戳 必填
  • 参数
字段 类型 描述 是否必填
pay_method String offline 必填
sub_pay_method String WeChat Pay,Alipay,通过接口获取sub pay method 获取。如果为空,将由YabandPay来做支付方式判断。 选填
order_id String 商户订单号 必填
amount String 金额数字。例如 € 24.99 应该写成24.99,CNY金额>=1,欧元金额>=0.1 必填
currency String 货币代码,ISO 4217,例如EUR,CHF 必填
demo String 自定义字段 选填
auth_code String 微信支付或者支付宝+钱包的授权码 必填
description String 订单描述 必填
notify_url String 支付完成后异步通知地址 选填

签名示例:

拼接为URL方式并排序后的字符串

"amount=0.1&auth_code=134443133735495918&currency=EUR&demo=test&description=YabandPay test&method=v3.BarcodePayment&notify_url=https://www.yabandpay.com/notify&order_id=202488465489451317&pay_method=offline&sub_pay_method=WeChat Pay&time=1555499083&user=016683"

得到的 stringA 使用 secret_key做签名

得到的签名如下:

"1d0acea72fa7a1f2cf2c8912bb3c5349a3d9f041eed1ee9e215b3f750166f014"

提交示例:

{
    "user": "016683",
    "sign": "1d0acea72fa7a1f2cf2c8912bb3c5349a3d9f041eed1ee9e215b3f750166f014",
    "method": "v3.BarcodePayment",
    "time": 1555499083,
    "data": {
        "amount": "0.1",
        "auth_code": "134443133735495918",
        "currency": "EUR",
        "demo": "test",
        "description": "YabandPay test",
        "notify_url": "https://www.yabandpay.com/notify",
        "order_id": "202488465489451317",
        "pay_method": "offline",
        "sub_pay_method": "WeChat Pay"
    }
}

返回示例:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "202488465489451317",
        "trade_id": "511444d0-2d91-5396-9e34-f2900e80d715",
        "amount": "0.10",
        "currency": "EUR",
        "settlement_amount": "0.10",
        "settlement_currency": "EUR",
        "exchange_rate": "1",
        "sub_pay_method": "WeChat Pay",
        "state": "paid"
    },
    "message": "",
}

更多信息:

返回结果:

[!TIP|style:flat]

  1. 在用户免密码验证情况下,支付结果将同步返回。

  2. 扫码后遇到用户输入密码验证情况下,会出现支付结果state=processing,这时商户需要每隔5秒循环调用订单查询判断实际支付结果。

  3. 如果用户取消支付或累计30秒用户内仍未支付,建议商户退出查询流程后继续调用取消支付以便撤销支付交易。如果用户实际已经支付,系统将自动做退款处理。

返回代码:
Status Description
200 Success
-1000 Internal error
-1007 Identity code is invalid
-4011 Not support the payment method
-4015 This order has been closed
-4028 WeChat Pay is not available
-4029 Alipay is not available
-4086 Unknow identity code

results matching ""

    No results matching ""