> For the complete documentation index, see [llms.txt](https://docs.supefina.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/cha-xun/jiao-yi-cha-xun.md).

# 交易查询

#### 注意：

<sub>代付请求超时仅代表未能在预定时间内获得响应，这并不意味着业务失败。遇到超时情况时，商户应采取以下标准流程：</sub>\ <sub>首先将相关订单标记为挂起状态，随后等待至少2分钟后通过查询接口检索订单状态。切勿在超时后立即尝试重新提交请求，这可能导致重复交易。</sub>\ <sub>因未遵循上述规定流程而造成的任何资金损失，将由责任方全权承担，我司概不负责。</sub>

### 请求地址

<table><thead><tr><th width="138">环境名称</th><th width="607">URL</th></tr></thead><tbody><tr><td>SandBox </td><td><mark style="color:blue;"><code>POST</code></mark><br>https://api.supefina.tech/api/supefina/transactions/search-status</td></tr><tr><td><mark style="color:red;">正式环境</mark> </td><td><mark style="color:red;"><code>POST</code></mark><br><mark style="color:red;">https://api.supefina.net/api/supefina/transactions/search-status</mark></td></tr></tbody></table>

### 请求参数

| Key            | Value              |
| -------------- | ------------------ |
| `Content-Type` | `application/json` |

#### 请求体

<table data-full-width="true"><thead><tr><th width="168">变量名</th><th width="72">必填</th><th width="108">类型</th><th width="259">描述</th></tr></thead><tbody><tr><td>merId</td><td><mark style="color:red;"><code>是</code></mark></td><td><code>String</code></td><td>商户ID<br>商户ID获取路径：Supefina商户后台-商户管理-基本信息-商户ID</td></tr><tr><td>countryId</td><td><mark style="color:red;"><code>是</code></mark></td><td><code>String</code></td><td>国家编号<br>参照：<a href="/pages/17IKBEvxR4cpZue8BRdD#afwzp">字典表-国家编号</a><br>墨西哥：<code>MEX</code></td></tr><tr><td>merOrderNo</td><td><mark style="color:red;"><code>是</code></mark></td><td><code>String</code></td><td>商户订单号</td></tr><tr><td>nonceStr</td><td><mark style="color:red;"><code>是</code></mark></td><td><code>String</code></td><td>随机字符串<br>长度不能超过32位</td></tr><tr><td>supefinaOrderId</td><td><mark style="color:red;"><code>否</code></mark></td><td><code>String</code></td><td>supefina订单号</td></tr><tr><td>sign</td><td><mark style="color:red;"><code>是</code></mark></td><td><code>String</code></td><td>签名<br><a href="/pages/DR0Ieg3d88mBdWrXD882">具体参照：签名算法</a></td></tr></tbody></table>

#### 请求示例

```json
{
	"countryId": "BRA",
	"merId": "8302996847200585",
	"merOrderNo": "P02024051517452550031527899",
	"nonceStr": "9ad3edf6d8084801bae04bfbdb788cc5",
	"sign": "8A3B428CE13F9DAB27E41C70F825B5D6",
	"supefinaOrderId": "20250623060617181000059022"
}
```

签名组装字符串

countryId=BRA\&merId=8302996847200585\&merOrderNo=P02024051517452550031527899\&nonceStr=9ad3edf6d8084801bae04bfbdb788cc5\&supefinaOrderId=20250623060617181000059022\&key=9dbb958a68f04252bae26a6b6d98e0ab

### 响应参数

<table data-full-width="true"><thead><tr><th width="193">变量名</th><th width="126">类型</th><th>描述</th></tr></thead><tbody><tr><td>code</td><td><code>String</code></td><td>响应编码<br>具体参照：<a href="/pages/j56ENY9y4TEhx8ssOv8a">响应状态码</a></td></tr><tr><td>msg</td><td><code>String</code></td><td>响应信息</td></tr><tr><td>data</td><td>Object</td><td>响应数据</td></tr><tr><td>transactionStatus</td><td><code>String</code></td><td><p>交易状态</p><p><a href="/pages/17IKBEvxR4cpZue8BRdD#kxzkj">字典表——交易订单状态</a></p></td></tr><tr><td>supefinaOrderId</td><td><code>String</code></td><td>supefina订单号</td></tr><tr><td>merOrderId</td><td><code>String</code></td><td>商户订单号</td></tr><tr><td>merId</td><td><code>String</code></td><td>商户ID</td></tr><tr><td>transactionType</td><td><code>String</code></td><td>交易类型<br><code>01</code>：代收<br><code>02</code>：代付</td></tr><tr><td>amount</td><td>BigDecimal</td><td>订单金额</td></tr><tr><td>realityAmount</td><td>BigDecimal</td><td>实收金额</td></tr><tr><td>fee</td><td>BigDecimal</td><td>预收手续费</td></tr><tr><td>realityFee</td><td>BigDecimal</td><td>实收手续费</td></tr><tr><td>successTime</td><td>Date</td><td>交易成功时间</td></tr><tr><td>identifier</td><td><code>String</code></td><td>付款参考标识符</td></tr><tr><td>stampTime</td><td><code>String</code></td><td>交易成功时间（时间戳格式，精确到秒）</td></tr><tr><td>clave</td><td><code>String</code></td><td>央行流水标识符</td></tr><tr><td>errorMsg</td><td><code>String</code></td><td>失败原因（交易失败和下单失败状态返回）</td></tr></tbody></table>

#### 响应示例

```json
{
	"code": "200",
	"msg": "success ",
	"data": {
		"transactionStatus": "01",
		"supefinaOrderId": "20250623060617181000059022",
		"merOrderId": "P02024051517452550031527899",
		"merId": "8302996847200585",
		"transactionType": "02",
		"amount": "1300.00",
		"realityAmount": "1300.00",
		"fee": "70.00",
		"realityFee": "70.00",
		"successTime": "2025-06-23 06:23:56",
		"identifier": "",
		"stampTime": 1750659836000,
		"clave": "E3038525920250601124521530b8bdb4"
	}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/cha-xun/jiao-yi-cha-xun.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
