# 交易查询

{% hint style="info" %}
本页GET接口，请求参数中含有特殊格式，如 - 、空格等，需要在发送请求时进行urlEncode，否则会发送失败，需要设置x-www-form-urlencoded;charset=UTF-8，如new UrlEncodedFormEntity(param, StandardCharsets.UTF\_8)，见[常见问题](/api-explorer/fu-lu/chang-jian-wen-ti.md#1-can-shu-zhi-luan-ma-huo-que-shi)
{% endhint %}

{% openapi src="/files/PClHJrVdvZlHYtVpxOuK" path="/openApi/V2022-03/transactions" method="get" %}
[openApi\_sign\_book.json](https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2Fmb4kbdEp0o8kz7esQkmQ%2FopenApi_sign_book.json?alt=media\&token=3d1b62b9-c3c0-41ab-b34d-d679df782126)
{% endopenapi %}

### 交易流水查询请求报文示例

{% code title="transaction.sh" %}

```
curl --request GET\
  --url https://{openApiUrl}/openApi/V2022-03/transactions?endTime=2022-05-21T23:59:59&pageIndex=1&pageSize=1000&startTime=2022-02-21T00:00:00&tradeNo=&uploadGoodsFlag=&uploadLogisticsFlag=&orderNo= \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
```

{% endcode %}

#### 结果对象属性描述

| property name   | type    | description                                                                                                                                                                                        |
| --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| code            | String  | 响应码                                                                                                                                                                                                |
| message         | String  | 响应信息                                                                                                                                                                                               |
| data            | Object  | 数据体                                                                                                                                                                                                |
| page            | Object  | 分页对象                                                                                                                                                                                               |
| total           | Integer | 总记录条数                                                                                                                                                                                              |
| pageSize        | Integer | 每页记录条数                                                                                                                                                                                             |
| pageIndex       | Integer | 当前页                                                                                                                                                                                                |
| list            | Array   | 列表                                                                                                                                                                                                 |
| orderNo         | String  | 商户订单号                                                                                                                                                                                              |
| tradeNo         | String  | 交易流水号                                                                                                                                                                                              |
| tradeDate       | String  | 交易时间（时间格式为：yyyy-MM-dd'T'HH:mm:ss）                                                                                                                                                                  |
| tradeAmount     | double  | 交易金额                                                                                                                                                                                               |
| tradeCurrency   | String  | 交易币种                                                                                                                                                                                               |
| sourceWebSite   | String  | 来源网址                                                                                                                                                                                               |
| authStatus      | String  | <p>预授权状态</p><p>sale：普通交易</p><p>void：预授权取消</p><p>pending：预授权待处理</p><p>capture：预授权完成</p>                                                                                                             |
| isUploadReceipt | String  | 是否上传物流订单号：yes、no                                                                                                                                                                                   |
| isUploadGoods   | String  | 是否上传商品信息：yes、no                                                                                                                                                                                    |
| tradeStatus     | String  | <p>交易状态：</p><p>pending：待处理</p><p>fail：失败</p><p>success：成功</p>                                                                                                                                      |
| tradeInfo       | String  | 交易信息                                                                                                                                                                                               |
| goods           | Object  | 商品对象                                                                                                                                                                                               |
| goodsName       | String  | 商品名称                                                                                                                                                                                               |
| goodsNum        | String  | 商品数量                                                                                                                                                                                               |
| goodsPrice      | String  | 商品单价                                                                                                                                                                                               |
| logistics       | Object  | 物流对象                                                                                                                                                                                               |
| lcCode          | String  | 物流运输商编号                                                                                                                                                                                            |
| logisticsStatus | String  | 物流状态，Pending待查询、NotFound 查询不到 、InfoReceived 预报发货 、InTransit 运输途中 、ArrivedDelivery 到达待取 、Delivering 派送途中、Delivered 成功派送、Exception 包裹异常、DeliveryFailure 投递失败、Return 包裹退回、NotOnline 未上线、 Timeout 轨迹超时 |
| trackingNo      | String  | 物流订单号                                                                                                                                                                                              |
| trackingWeb     | String  | 物流网址                                                                                                                                                                                               |

{% openapi src="/files/PClHJrVdvZlHYtVpxOuK" path="/openApi/V2022-03/orderInfo/{tradeNo}" method="get" %}
[openApi\_sign\_book.json](https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2Fmb4kbdEp0o8kz7esQkmQ%2FopenApi_sign_book.json?alt=media\&token=3d1b62b9-c3c0-41ab-b34d-d679df782126)
{% endopenapi %}

### 订单信息请求报文示例

{% code title="orderInfo.sh" %}

```
curl --request GET\
  --url https://{openApiUrl}/openApi/V2022-03/orderInfo/2022051810582957553787 \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
```

{% endcode %}

#### 结果对象属性描述

| code                | String  | 响应码                                                     |
| ------------------- | ------- | ------------------------------------------------------- |
| message             | String  | 响应信息                                                    |
| data                | Object  | 数据体                                                     |
| tradeNo             | String  | 流水订单号                                                   |
| phone               | String  | 客户电话                                                    |
| firstName           | String  | 客户名                                                     |
| lastName            | String  | 客户姓                                                     |
| billCountry         | String  | 账单国                                                     |
| billState           | String  | 州                                                       |
| billCity            | String  | 城市                                                      |
| billAddress         | String  | 地址                                                      |
| billEmail           | String  | 邮箱                                                      |
| billPostcode        | String  | 客户邮编                                                    |
| ipAddress           | String  | IP地址                                                    |
| ipCountry           | String  | IP国家                                                    |
| ipCity              | String  | IP城市                                                    |
| sourceWebSite       | String  | 交易网址                                                    |
| cardType            | String  | <p>支付卡种:</p><p>VISA,MASTER,JCB,AE,DiSCOVER,UNIONPAY</p> |
| cardNo              | String  | 卡号                                                      |
| issuingBank         | String  | 发卡行                                                     |
| crossCountryPayment | Integer | <p>跨国支付,</p><p>0:否</p><p>1:是</p>                        |
| highRiskCountry     | Integer | <p>高风险国家</p><p>0:否</p><p>1:是</p>                        |
| binCountry          | String  | 真实发卡国                                                   |
| paymentMethod       | String  | 支付方式                                                    |
| shipFirstName       | String  | 收件人名                                                    |
| shipLastName        | String  | 收件人姓                                                    |
| shipPhone           | String  | 收件人电话                                                   |
| shipCountry         | String  | 收件人国家                                                   |
| shipState           | String  | 收件人州                                                    |
| shipCity            | String  | 收件人城市                                                   |
| shipAddress         | String  | 收件人地址                                                   |
| shipPostcode        | String  | 收件人邮编                                                   |
| localPaymentLink    | String  | 本地支付链接                                                  |
| billDescriptor      | String  | 账单地址                                                    |
| platform            | String  | 商户平台                                                    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://asiabill.gitbook.io/api-explorer/api-reference/jiao-yi-cha-xun.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
