交易明细


此接口查询YabandPay的清算报表的交易明细,或者按照交易日期区间查询交易明细。

[!TIP|style:flat]

1、交易明细仅包含支付成功或退款成功等涉及资金清算的交易,不包含取消、或预授权等交易。

2、如果按照日期区间查询,区间不能超过一年。

3、超过7年的交易不支持查询。

4、此API仅限商户超级管理员账号调用,操作员或收银员账号无权调用。

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

Method:POST

POST data type:Json

参数 类型 描述 是否必填
user String 超级管理员账号的UID 必填
sign String 签名 必填
method String v3.GetTradebill 必填
time Long 时间戳 必填
  • 参数
参数 类型 描述 是否必填
commond String getTradebillinfo 必填
clearing_id String 清算报表ID 选填
start_time String 交易开始时间 选填
end_time String 交易结束时间 选填
nonce_string String 随机字符串,不长于32位 必填

签名示例:

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

"clearing_id=M20240302001503350733&commond=getTradebillinfo&method=v3.GetTradebill&nonce_string=tw5be5b7sry5prm96s&time=1708422208&user=036870"

得到的 stringA 使用 secret_key做签名

得到的签名如下:

"9abdb20d59573ded6b415adf871aeddcb7896ad954e7828b39d9f14b65a3464a"

提交示例 - 清算报表:

{
    "user": "036870",
    "sign": "9abdb20d59573ded6b415adf871aeddcb7896ad954e7828b39d9f14b65a3464a",
    "method": "v3.GetTradebill",
    "time": 1708422208,
    "data": {
        "commond": "getTradebillInfo",
        "clearing_id": "M20240220001503109569",
        "nonce_string": "tw5be5b7sry5prm96s"

    }
}

提交示例 - 日期区间:

{
    "user": "036870",
    "sign": "a731d19eda0526653483f9d9384a068f19f29c2e291b23231678dfe0ef008432",
    "method": "v3.GetTradebill",
    "time": 1708422208,
    "data": {
        "commond": "getTradebillInfo",
        "start_time": "1716393600",
        "end_time" : "1716566340",
        "nonce_string": "g46a5g156rt4784ghb1b"

    }
}

返回示例:

{
    "status": true,
    "code": 200,
    "message": "",
    "data": {
        "tradebill": [
            {
                "time_zone": "GMT+1",
                "store_name": "Test Store",
                "date": "21-02-2024 19:03:21",
                "settlement_currency": "EUR",
                "amount": "2.00",
                "fee": "0.02",
                "net_value": "1.98",
                "vat": "0.01",
                "type": "payment",
                "sub_pay_method": "WeChat Pay",
                "order_id": "2024022165484654893",
                "trade_id": "ed71a5db-8e1c-a883-d062-ccbb4005b914",
                "description": "test order",
                "demo": "",
                "state": "paid",
                "fund_flow_status": "2",
                "fund_flow_description": "settled",
            },
            {
                "time_zone": "GMT+1",
                "store_name": "Test Store"
                "date": "21-02-2024 20:25:43",
                "settlement_currency": "EUR",
                "amount": "2.00",
                "fee": "0.02",
                "net_value": "1.98",
                "vat": "0.01",
                "type": "Payment",
                "sub_pay_method": "WeChat Pay",
                "order_id": "2024022165484654893",
                "trade_id": "ed71a5db-8e1c-a883-d062-ccbb4005b914",
                "description": "test order",
                "demo": "",
                "state": "paid",
                "fund_flow_status": "2",
                "fund_flow_description": "settled",
            }
        ],
        "count": 2
    }
}

更多信息:

返回参数说明如下:
参数 类型 描述
time_zone String 清算时区,通常为商户注册国家所在时区
store_name String 商户store名称
date String 交易完成日期
settlement_currency String 结算货币,ISO 4217
amount String 结算金额
fee String 交易费用
net_value String 净值,未扣除VAT
vat String 手续费的VAT
type String 交易类型,PaymentRefund
sub_pay_method String 支付方式
order_id String 商户交易id
trade_id String Yabandpay交易id
description String 交易描述
demo String 商户自定义字段
state String 交易状态,即PaidRefunded
fund_flow_status String 资金状态代码
fund_flow_description String 资金态描述
count String 返回的数据数量
资金状态代码和描述:
fund_flow_status fund_flow_description
0 uncleared
1 cleared
2 settled

results matching ""

    No results matching ""