Legado v1
Consultar transação PIX
Consulte uma transação PIX pelo ID em uma integração legado v1.
GET
/
pix
/
v1
/
transactions
/
{id}
Get a PIX Transaction
curl --request GET \
--url https://api.pagou.ai/pix/v1/transactions/{id} \
--header 'apiKey: <api-key>'import requests
url = "https://api.pagou.ai/pix/v1/transactions/{id}"
headers = {"apiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apiKey: '<api-key>'}};
fetch('https://api.pagou.ai/pix/v1/transactions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pagou.ai/pix/v1/transactions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pagou.ai/pix/v1/transactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pagou.ai/pix/v1/transactions/{id}")
.header("apiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pagou.ai/pix/v1/transactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "trn_1f3f2d2299d74944a6a028f278f2f0e7",
"status": "PAID",
"type": "PIX",
"value": 9417,
"paidAmount": 9417,
"externalId": "pedido-7429",
"createdAt": "2026-02-06T19:50:49.926Z",
"updatedAt": "2026-02-06T19:51:51.394Z"
}{
"type": "https://api.pagou.ai/problems/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The request contains invalid data.",
"instance": "/pix/v1/transactions/example-id",
"errors": [
{
"field": "transaction.value",
"message": "Must be greater than zero.",
"code": "invalid_type"
}
]
}{
"type": "https://api.pagou.ai/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Authentication failed for GET /pix/v1/transactions/{id}.",
"instance": "/pix/v1/transactions/example-id"
}Autorizações
Parâmetros de caminho
Minimum string length:
1⌘I
Get a PIX Transaction
curl --request GET \
--url https://api.pagou.ai/pix/v1/transactions/{id} \
--header 'apiKey: <api-key>'import requests
url = "https://api.pagou.ai/pix/v1/transactions/{id}"
headers = {"apiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apiKey: '<api-key>'}};
fetch('https://api.pagou.ai/pix/v1/transactions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pagou.ai/pix/v1/transactions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pagou.ai/pix/v1/transactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pagou.ai/pix/v1/transactions/{id}")
.header("apiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pagou.ai/pix/v1/transactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "trn_1f3f2d2299d74944a6a028f278f2f0e7",
"status": "PAID",
"type": "PIX",
"value": 9417,
"paidAmount": 9417,
"externalId": "pedido-7429",
"createdAt": "2026-02-06T19:50:49.926Z",
"updatedAt": "2026-02-06T19:51:51.394Z"
}{
"type": "https://api.pagou.ai/problems/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The request contains invalid data.",
"instance": "/pix/v1/transactions/example-id",
"errors": [
{
"field": "transaction.value",
"message": "Must be greater than zero.",
"code": "invalid_type"
}
]
}{
"type": "https://api.pagou.ai/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Authentication failed for GET /pix/v1/transactions/{id}.",
"instance": "/pix/v1/transactions/example-id"
}
