查询交易状态
GET /api/pix/transaction/{id}
返回 PIX 交易的当前状态,包括金额、对手方和时间戳的详细信息。
标识符可以是:
- 数字 ID:Avista 返回的内部交易标识符
- externalId:您在创建交易时提供的外部标识符
认证
需要在 Authorization 头中提供 Bearer 令牌。
路径参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
id | string | 是 | 交易 ID(数字)或 externalId(字符串) |
响应 (200)
| 字段 | 类型 | 描述 |
|---|---|---|
id | string | 交易 ID |
externalId | string | null | 客户端提供的外部 ID |
type | string | 交易类型:PAYMENT、WITHDRAW、REFUND_IN、REFUND_OUT、TRANSFER |
status | string | 状态:PENDING、CONFIRMED、ERROR |
originalAmount | string | 原始金额(巴西雷亚尔) |
feeAmount | string | 手续费金额(巴西雷亚尔) |
finalAmount | string | 最终金额(巴西雷亚尔) |
e2eId | string | null | PIX End-to-end ID |
counterpartName | string | null | 对手方名称 |
counterpartDocument | string | null | 对手方证件(CPF/CNPJ) |
counterpartAccountBankCode | string | null | 对手方银行代码 |
counterpartAccountBranch | string | null | 对手方支行 |
counterpartAccountNumber | string | null | 对手方账号 |
counterpartAccountIspb | string | null | 对手方银行 ISPB |
counterpartAccountBankName | string | null | 对手方银行名称 |
createdAt | string | 创建日期(ISO 8601) |
updatedAt | string | 更新日期(ISO 8601) |
processedAt | string | null | 处理日期(ISO 8601) |
{
"id": "123",
"externalId": "ext-001",
"type": "PAYMENT",
"status": "CONFIRMED",
"originalAmount": "100.00",
"feeAmount": "1.50",
"finalAmount": "98.50",
"e2eId": "E00416968202512121343VX5Sx8fIpkY",
"counterpartName": "John Marvin",
"counterpartDocument": "12312312387",
"counterpartAccountBankCode": "001",
"counterpartAccountBranch": "0001",
"counterpartAccountNumber": "123456-7",
"counterpartAccountIspb": "00000000",
"counterpartAccountBankName": "Banco do Brasil",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:35:00.000Z",
"processedAt": "2024-01-15T10:35:00.000Z"
}错误
| 状态码 | 描述 |
|---|---|
| 401 | 令牌缺失或无效 |
| 404 | 交易未找到 |