Get Transaction by ID

Retrieves the full details of a specific transaction by its transactionId.

GET/api/Transaction/transactionByTransactionId/{transactionId}

Required Headers

X-Client-Id
Obrigatoriostring

Your application's public ID

X-API-Key
Obrigatoriostring

Your company's secret key

Accept
Obrigatoriostring

Must be application/json

Route Parameters

transactionId

The transaction id returned in the id field when you create the transaction. The PIX endToEndId is also accepted.

Example: cmw4q82zb0uzv6ooc55yifz8n

cURL Example

cURL
curl -X GET "https://baanko.app/api/Transaction/transactionByTransactionId/9f9a917a-c265-4bd5-ba3d-c2cc7c766339" \
-H "Accept: application/json" \
-H "X-Client-Id: e1c98954cc404cbcb2868af9b40c7a33" \
-H "X-API-Key: your-secret-api-key"

Success Response (200 OK)

Response
{
"data": {
"id": "cmw4q82zb0uzv6ooc55yifz8n",
"internalId": 1607997,
"internalCompanyId": "1a6fc8db-c8ac-4964-a47e-8bd1716d26be",
"amount": 1000,
"type": "pix_in",
"status": "paid",
"refundedAmount": 0,
"paymentMethod": "pix",
"externalRef": "ORDER-10001",
"postbackUrl": null,
"createdAt": "2026-11-06T05:42:36.725045",
"updatedAt": "2026-11-06T05:42:36.725073+00:00",
"paidAt": "2026-11-06T05:42:36.725073+00:00",
"cancelledAt": null,
"refundedAt": null,
"customer": {
"id": null,
"name": "Joao Silva",
"email": "joao@email.com",
"phone": "11999998888",
"document": { "type": "cpf", "number": "12345678909" }
},
"pix": {
"qrcode": "00020101021226...",
"expiresAt": "2026-11-07T05:42:36Z",
"endToEndId": "E00000000202611060542abcdef12345",
"payer": { "name": "JOAO SILVA", "document": "12345678909", "documentType": "cpf" }
},
"fee": { "total": 23, "net": 977 }
},
"status": 200,
"message": "Transação recuperada com sucesso (fallback local)."
}

Main Fields

data.id
string

Transaction id (the same returned when the transaction was created)

data.status
string

Current status: pending, processing, paid, failure, canceled, refunded, chargeback, prechargeback

data.amount
integer

Transaction amount in cents (1000 = R$ 10.00)

data.paidAt
string | null

When the payment was confirmed

data.externalRef
string | null

Your reference sent on creation

data.customer
object

Customer data sent on creation

data.pix.endToEndId
string | null

PIX end-to-end id, after payment

data.fee
object

total = fees in cents, net = amount you receive in cents

Possible Statuses

pendingWaiting for the PIX payment (webhook: awaiting)
processingPayment being confirmed (webhook: pending)
paidPayment confirmed, final (webhook: successful)
failurePayment failed, final (webhook: failure)
canceledCharge canceled or expired, final (webhook: failure)
refundedPayment refunded, final (webhook: refunded)
chargebackPayment disputed, final (webhook: failure)

JavaScript Example

JavaScript (fetch)
const transactionId = '9f9a917a-c265-4bd5-ba3d-c2cc7c766339';
const response = await fetch(
`https://baanko.app/api/Transaction/transactionByTransactionId/${transactionId}`,
{
method: 'GET',
headers: {
'Accept': 'application/json',
'X-Client-Id': 'e1c98954cc404cbcb2868af9b40c7a33',
'X-API-Key': 'your-secret-api-key'
}
}
);
const body = await response.json();
console.log('Status:', body.data.status); // pending | paid | failure | ...
console.log('Amount:', body.data.amount / 100); // cents to reais

Important Notes

INFO

Use the transactionId returned when you created the transaction

INFO

The response is wrapped in data. data.amount is always in cents (500 = R$ 5.00)

INFO

The status is in data.status (pending, processing, paid, failure, canceled, refunded, chargeback, prechargeback). The webhook uses different names: paid here is successful in the webhook, pending here is awaiting in the webhook

INFO

Customer data is in data.customer

TIP

For real-time updates, configure webhooks instead of polling constantly