Query transaction by PIX key and identifier
GET /api/pix/transactions/pix-key/{pixKey}/{identifier}
GET https://api.avista.global/api/pix/transactions/pix-key/{pixKey}/{identifier}Requires a Bearer token in the Authorization header. See Generate Token to obtain one.
Returns a specific transaction associated with a PIX key, searched by the provided identifier.
Identifier resolution logic: The provided value is simultaneously compared against endToEndId (PIX e2eId), externalId, and numeric id. In practice there is no ambiguity: each type has a unique format (e2eId starts with E + 32 alphanumeric chars; id is purely numeric; externalId is any other string).
Authentication
Requires a Bearer token in the Authorization header.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pixKey | string | Yes | PIX key (CPF, CNPJ, phone, email, or random EVP key) |
identifier | string | Yes | Transaction identifier: compared against endToEndId, externalId, or numeric id |
Code Examples
curl -X GET "https://api.avista.global/api/pix/transactions/pix-key/12345678901/ext-123456" \
-H "Authorization: Bearer $AVISTA_TOKEN"const axios = require('axios');
const response = await axios.get('https://api.avista.global/api/pix/transactions/pix-key/12345678901/ext-123456', {
headers: { 'Authorization': `Bearer ${process.env.AVISTA_TOKEN}` },
});
console.log(response.data);import os, requests
response = requests.get(
'https://api.avista.global/api/pix/transactions/pix-key/12345678901/ext-123456',
headers={'Authorization': f'Bearer {os.environ["AVISTA_TOKEN"]}'},
)
print(response.json())$ch = curl_init('https://api.avista.global/api/pix/transactions/pix-key/12345678901/ext-123456');
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/transactions/pix-key/12345678901/ext-123456"))
.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)
{
"transactionId": "12345",
"externalId": "ext-123456",
"status": "Confirmado",
"operationType": "Pix in",
"movementType": "CREDIT",
"originalAmount": 100.00,
"feeAmount": 1.00,
"finalAmount": 99.00,
"endToEndId": "E12345678901234567890123456789012",
"createdAt": "2025-01-15T10:30:00.000Z",
"processedAt": "2025-01-15T10:30:05.000Z",
"counterpart": {
"name": "João Silva",
"document": "***.456.789-**",
"bank": {
"bankISPB": "00000000",
"bankName": "Banco do Brasil",
"bankCode": "001",
"accountBranch": "0001",
"accountNumber": "123456-7"
}
}
}Errors
| Status | Description |
|---|---|
| 401 | Missing or invalid token |
| 404 | Transaction not found for the provided PIX key and identifier |