Listar transações por chave PIX
GET /api/pix/transactions/pix-key/{pixKey}
GET https://api.avista.global/api/pix/transactions/pix-key/{pixKey}Requer um Bearer token no header Authorization. Veja Gerar Token para obter um.
Retorna transações associadas a uma chave PIX específica com paginação.
Características:
- Valores convertidos para reais (2 decimais)
- Status e tipos mapeados para português
- Documentos de contraparte mascarados
- Intervalo máximo de 31 dias entre
startDateeendDate - Default de
startDate: últimos 30 dias - Limite máximo de 1000 resultados totais
Autenticação
Requer token Bearer no header Authorization.
Path Parameters
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
pixKey | string | Sim | Chave PIX (CPF, CNPJ, telefone, e-mail ou chave aleatória EVP) |
Query Parameters
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
page | integer | Não | Número da página (1-indexed). Default: 1 |
size | integer | Não | Quantidade de registros por página (max 1000). Default: 20 |
status | string | Não | Filtro por status: PENDING, CONFIRMED, ERROR |
type | string | Não | Filtro por tipo: PAYMENT, WITHDRAW, REFUND_IN, REFUND_OUT |
startDate | string | Não | Data inicial (ISO 8601). Default: últimos 30 dias |
endDate | string | Não | Data final (ISO 8601). Default: data atual |
Exemplos de Código
curl -X GET "https://api.avista.global/api/pix/transactions/pix-key/12345678901" \
-H "Authorization: Bearer $AVISTA_TOKEN"const axios = require('axios');
const response = await axios.get('https://api.avista.global/api/pix/transactions/pix-key/12345678901', {
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',
headers={'Authorization': f'Bearer {os.environ["AVISTA_TOKEN"]}'},
)
print(response.json())$ch = curl_init('https://api.avista.global/api/pix/transactions/pix-key/12345678901');
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"))
.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)
{
"data": [
{
"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"
}
}
}
],
"metadata": {
"page": 1,
"size": 20,
"total": 150,
"totalPages": 8,
"hasNext": true,
"hasPrevious": false
}
}Erros
| Status | Descrição |
|---|---|
| 400 | Parâmetros inválidos ou intervalo de datas excede 31 dias |
| 401 | Token não fornecido ou inválido |