接口描述

  • 发送交易消息,可以通知POS,也可以通知云喇嘛

接口版本:

版本号 制定人 制定日期 修订日期
1.1.0 杨铝杰 2019-09-06 2019-08-12

请求URL:

请求方式:

  • POST

请求头

参数名 是否必须 类型 说明
Content-Type String 请求类型:application/json

请求参数:

参数名 是否必须 类型 说明
appid String appid
nonce_str String 随机字符串
sign String 签名字符串
device_no String 商户号+终端号(唯一值)
device_sn String 设备序列号,notice_type为2,银联云喇叭时必填
trade_time String 交易时间
total_fee String 交易金额,单位:分
pay_result String 支付结果,0-成功,其他不成功
notice_type int 消息通知方式 1-POS,2-银联云喇叭
payway String 支付方式:wx-微信,alipay-支付宝, unpay-银联云闪付

请求参数示例

{
    "device_no": "86144034816805XXXXX",
    "trade_time":"2019-09-01 20:00:03",
    "total_fee":"9999",
    "pay_result":"0",
    "notice_type":2,
    "appid":"2699F7FA9B4340A9E937C7031D8A81A8",
    "nonce_str":"k545jh835234kp236567ppo98",
    "sign":"046DB68A26FCB2571D8F8A4960E931BA",
    "payway":"unpay"
}

返回参数说明:

参数名 类型 说明
code String 0000为成功,其他失败
msg String 返回消息
data json 以下为json元素
device_no String 商户号+终端号(唯一值)
device_sn String 设备序列号,notice_type为2时有返回
trade_time String 交易时间
total_fee String 交易金额,单位:分
trade_type String 交易类型
payway String 支付方式
transaction_id String 交易单号
pay_result String 支付结果:0-成功,其他不成功
prefix String 消息广告前缀
status String 消息发送状态,0-成功,1-失败
create_ts String 发送时间

返回示例:

正确返回

{
    "code": "0000",
    "msg": "SUCCESS",
    "data": {
        "device_no": "86144034816805XXXXX",
        "trade_time": "2019-09-01 20:00:03",
        "total_fee": "9999",
        "total_fee_cn": "玖拾玖点玖玖元",
        "trade_type": "",
        "payway": "云闪付",
        "pay_result": "0",
        "prefix": "",
        "create_ts": "2019-09-29 10:15:56",
        "status": 0,
        "device_sn": "ZNXT0419090XXXXX",
        "transaction_id": ""
    }
}

备注

  • 更多返回错误代码请看错误代码描述
文档更新时间: 2021-10-26 15:49   作者:EricYang