Avistadocs

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

ParameterTypeRequiredDescription
idstringYesTransaction ID (numeric) or externalId (string)

Code Examples

cURL
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)

FieldTypeDescription
idstringTransaction ID
externalIdstring | nullExternal ID provided by the client
typestringTransaction type: PAYMENT, WITHDRAW, REFUND_IN, REFUND_OUT, TRANSFER
statusstringStatus: PENDING, CONFIRMED, ERROR
originalAmountnumberOriginal amount in BRL
feeAmountnumberFee amount in BRL
finalAmountnumberFinal amount in BRL
e2eIdstring | nullPIX End-to-end ID
counterpartNamestring | nullCounterparty name
counterpartDocumentstring | nullCounterparty document (CPF/CNPJ)
counterpartAccountBankCodestring | nullCounterparty bank code
counterpartAccountBranchstring | nullCounterparty branch
counterpartAccountNumberstring | nullCounterparty account number
counterpartAccountIspbstring | nullCounterparty bank ISPB
counterpartAccountBankNamestring | nullCounterparty bank name
createdAtstringCreation date (ISO 8601)
updatedAtstringUpdate date (ISO 8601)
processedAtstring | nullProcessing date (ISO 8601)
refundedbooleanIndicates whether the transaction has been refunded (partially or totally). True if at least one CONFIRMED refund is linked.
partiallyRefundedbooleanIndicates whether the transaction has been partially refunded (refundedAmount > 0 and refundedAmount < amount).
refundedAmountnumberSum of CONFIRMED refunds in BRL. 0 when there are no refunds or for non-refundable types.
refundableAmountnumberRemaining refundable balance in BRL. 0 for PENDING/ERROR or non-refundable types.
relatedTransactionsarrayRelated 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_IN or REFUND_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

StatusDescription
401Missing or invalid token
404Transaction not found

On this page