API REFERENCE
Transaction details
This API queries transaction details in YabandPay clearing reports, or queries transaction details by transaction date range.
Tip
- Transaction details include only transactions involving fund clearing, such as successful payments or refunds. They exclude transactions such as cancellations and authorizations.
- When querying by date range, the range must not exceed one year.
- Transactions older than 7 years cannot be queried.
- Only merchant super administrator accounts can call this API. Operator and cashier accounts are not authorized to call it.
| Parameter | Type | Description | Required |
|---|---|---|---|
| user | String | UID of the super administrator account | Required |
| sign | String | Signature | Required |
| method | String | v3.GetTradebill | Required |
| time | Long | Timestamp | Required |
- Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| command | String | getTradebillinfo | Required |
| clearing_id | String | Clearing report ID | Optional |
| start_time | String | Transaction start time | Optional |
| end_time | String | Transaction end time | Optional |
| nonce_string | String | Random string, no longer than 32 characters | Required |
Signature example:
Sorted parameters concatenated into a URL-style query string
"clearing_id=M20240302001503350733&command=getTradebillinfo&method=v3.GetTradebill&nonce_string=tw5be5b7sry5prm96s&time=1708422208&user=036870"
Sign stringA using secret_key
The resulting signature is:
"YOUR_SIGNATURE"
Request example - clearing report:
{
"user": "036870",
"sign": "YOUR_SIGNATURE",
"method": "v3.GetTradebill",
"time": 1708422208,
"data": {
"command": "getTradebillInfo",
"clearing_id": "M20240220001503109569",
"nonce_string": "tw5be5b7sry5prm96s"
}
}
Request example - date range:
{
"user": "036870",
"sign": "YOUR_SIGNATURE",
"method": "v3.GetTradebill",
"time": 1708422208,
"data": {
"command": "getTradebillInfo",
"start_time": "1716393600",
"end_time" : "1716566340",
"nonce_string": "g46a5g156rt4784ghb1b"
}
}
Response example:
{
"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": "YOUR_ORDER_ID",
"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": "YOUR_ORDER_ID",
"trade_id": "ed71a5db-8e1c-a883-d062-ccbb4005b914",
"description": "test order",
"demo": "",
"state": "paid",
"fund_flow_status": "2",
"fund_flow_description": "settled"}
],
"count": 2
}
}
Additional information:
Response parameter descriptions:
| Parameter | Type | Description |
|---|---|---|
| time_zone | String | Clearing time zone, usually the time zone of the merchant's country of registration |
| store_name | String | Merchant store name |
| date | String | Transaction completion date |
| settlement_currency | String | Settlement currency, ISO 4217 |
| amount | String | Settlement amount |
| fee | String | Transaction fees |
| net_value | String | Net value before VAT deduction |
| vat | String | VAT on fees |
| type | String | Transaction type: Payment or Refund |
| sub_pay_method | String | Payment method |
| order_id | String | Merchant transaction ID |
| trade_id | String | Yabandpay transaction ID |
| description | String | Transaction description |
| demo | String | Merchant-defined field |
| state | String | Transaction status: Paid or Refunded |
| fund_flow_status | String | Funds status code |
| fund_flow_description | String | Funds status description |
| count | String | Number of records returned |
Funds status codes and descriptions:
| fund_flow_status | fund_flow_description |
|---|---|
| 0 | uncleared |
| 1 | cleared |
| 2 | settled |
