Query transaction status
GET /api/pix/transaction/{id}
GET https://api.avista.global/api/pix/transaction/{id}Requires a Bearer token in the Authorization header. See Generate Token to obtain one.
Returns the current status of a PIX transaction with detailed information about amounts, counterparty, and timestamps.
The identifier can be:
- Numeric ID: Internal transaction identifier returned by Avista
- externalId: External identifier that you provided when creating the transaction
Authentication
Requires a Bearer token in the Authorization header.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Transaction ID (numeric) or externalId (string) |
Code Examples
curl -X GET "https://api.avista.global/api/pix/transaction/txn_abc123" \
-H "Authorization: Bearer $AVISTA_TOKEN"const axios = require('axios');
const response = await axios.get('https://api.avista.global/api/pix/transaction/txn_abc123', {
headers: { 'Authorization': `Bearer ${process.env.AVISTA_TOKEN}` },
});
console.log(response.data);import os, requests
response = requests.get(
'https://api.avista.global/api/pix/transaction/txn_abc123',
headers={'Authorization': f'Bearer {os.environ["AVISTA_TOKEN"]}'},
)
print(response.json())$ch = curl_init('https://api.avista.global/api/pix/transaction/txn_abc123');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('AVISTA_TOKEN'),
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.avista.global/api/pix/transaction/txn_abc123"))
.header("Authorization", "Bearer " + System.getenv("AVISTA_TOKEN"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Response (200)
| Field | Type | Description |
|---|---|---|
id | string | Transaction ID |
externalId | string | null | External ID provided by the client |
type | string | Transaction type: PAYMENT, WITHDRAW, REFUND_IN, REFUND_OUT, TRANSFER |
status | string | Status: PENDING, CONFIRMED, ERROR |
originalAmount | number | Original amount in BRL |
feeAmount | number | Fee amount in BRL |
finalAmount | number | Final amount in BRL |
e2eId | string | null | PIX End-to-end ID |
counterpartName | string | null | Counterparty name |
counterpartDocument | string | null | Counterparty document (CPF/CNPJ) |
counterpartAccountBankCode | string | null | Counterparty bank code |
counterpartAccountBranch | string | null | Counterparty branch |
counterpartAccountNumber | string | null | Counterparty account number |
counterpartAccountIspb | string | null | Counterparty bank ISPB |
counterpartAccountBankName | string | null | Counterparty bank name |
createdAt | string | Creation date (ISO 8601) |
updatedAt | string | Update date (ISO 8601) |
processedAt | string | null | Processing date (ISO 8601) |
refunded | boolean | Indicates whether the transaction has been refunded (partially or totally). True if at least one CONFIRMED refund is linked. |
partiallyRefunded | boolean | Indicates whether the transaction has been partially refunded (refundedAmount > 0 and refundedAmount < amount). |
refundedAmount | number | Sum of CONFIRMED refunds in BRL. 0 when there are no refunds or for non-refundable types. |
refundableAmount | number | Remaining refundable balance in BRL. 0 for PENDING/ERROR or non-refundable types. |
relatedTransactions | array | Related transactions. Bidirectional: for PAYMENT/WITHDRAW lists refunds (children); for REFUND_IN/REFUND_OUT lists the parent. |
{
"id": "123",
"externalId": "ext-001",
"type": "PAYMENT",
"status": "CONFIRMED",
"originalAmount": 100,
"feeAmount": 1.5,
"finalAmount": 98.5,
"e2eId": "E00416968202512121343VX5Sx8fIpkY",
"counterpartName": "John Marvin",
"counterpartDocument": "12312312387",
"counterpartAccountBankCode": "001",
"counterpartAccountBranch": "0001",
"counterpartAccountNumber": "123456-7",
"counterpartAccountIspb": "00000000",
"counterpartAccountBankName": "Banco do Brasil",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:35:00.000Z",
"processedAt": "2026-01-15T10:35:00.000Z",
"refunded": true,
"partiallyRefunded": true,
"refundedAmount": 30,
"refundableAmount": 70,
"relatedTransactions": [
{
"id": "456",
"externalId": "ext-refund-001",
"type": "REFUND_IN",
"status": "CONFIRMED",
"amount": 30,
"e2eId": "E0041696820260120ABCxyz1234567",
"createdAt": "2026-01-20T14:22:00.000Z"
}
]
}Correlated refunds
The relatedTransactions field is bidirectional:
- When you poll a PAYMENT or WITHDRAW transaction, it lists all linked refunds (
REFUND_INorREFUND_OUT), in any status. - When you poll a REFUND_IN or REFUND_OUT transaction, it lists the original parent transaction (1 item in the array).
- For other types (
TRANSFER, or transactions without registered relations), returns[].
Only refunds with status: "CONFIRMED" count toward refundedAmount and refundableAmount. Refunds in PENDING or ERROR appear in relatedTransactions but do not affect the totals.
Errors
| Status | Description |
|---|---|
| 401 | Missing or invalid token |
| 404 | Transaction not found |