Transactions
Get a Transaction
Retrieve a transaction by ID.
GET
/
v2
/
transactions
/
{id}
Get a Transaction
curl --request GET \
--url https://api.pagou.ai/v2/transactions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pagou.ai/v2/transactions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pagou.ai/v2/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/v2/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 => [
"Authorization: Bearer <token>"
],
]);
$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/v2/transactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/v2/transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pagou.ai/v2/transactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"requestId": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 50000050,
"currency": "BRL",
"buyer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"birth_date": "<string>",
"document": {
"number": "<string>"
},
"address": {
"street": "<string>",
"city": "<string>",
"country": "BR",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"state": "<string>",
"zipCode": "<string>"
}
},
"fee": {
"net_amount": 50000000,
"estimated_fee": 50000000
},
"informations": [
{
"key": "<string>",
"value": "<string>"
}
],
"paid_amount": 50000000,
"method": "pix",
"refunded_amount": 50000000,
"products": [
{
"name": "<string>",
"price": 50000000,
"quantity": 500000
}
],
"traceable": true,
"splits": [
{
"recipient_id": 0,
"amount": 50000000,
"charge_processing_fee": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"voucher": {
"barcode": "<string>",
"digitable_line": "<string>",
"url": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"instructions": "<string>",
"receipt_url": "<string>"
},
"external_ref": "<string>",
"installments": 6,
"paid_at": "2023-11-07T05:31:56Z",
"pix": {
"qr_code": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"end_to_end_id": "<string>",
"receipt_url": "<string>"
},
"metadata": {},
"ip_address": "127.0.0.1",
"next_action": {
"type": "three_ds_challenge",
"challenge_session_id": "<string>",
"client_secret": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Use this endpoint to reconcile voucher transactions after creation or webhook delivery. The latest response can include normalized
voucher fields such as barcode, digitable_line, url, expiration_date, instructions, and receipt_url.
Voucher instructions can arrive asynchronously for some payment providers. If the create response returns status: "pending" with empty voucher fields, poll this endpoint for user-facing refreshes and keep webhooks as the authoritative source for fulfillment.Authorizations
BearerAuthApiKeyAuthBasicAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$⌘I
Get a Transaction
curl --request GET \
--url https://api.pagou.ai/v2/transactions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pagou.ai/v2/transactions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pagou.ai/v2/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/v2/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 => [
"Authorization: Bearer <token>"
],
]);
$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/v2/transactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/v2/transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pagou.ai/v2/transactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"requestId": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 50000050,
"currency": "BRL",
"buyer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"birth_date": "<string>",
"document": {
"number": "<string>"
},
"address": {
"street": "<string>",
"city": "<string>",
"country": "BR",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"state": "<string>",
"zipCode": "<string>"
}
},
"fee": {
"net_amount": 50000000,
"estimated_fee": 50000000
},
"informations": [
{
"key": "<string>",
"value": "<string>"
}
],
"paid_amount": 50000000,
"method": "pix",
"refunded_amount": 50000000,
"products": [
{
"name": "<string>",
"price": 50000000,
"quantity": 500000
}
],
"traceable": true,
"splits": [
{
"recipient_id": 0,
"amount": 50000000,
"charge_processing_fee": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"voucher": {
"barcode": "<string>",
"digitable_line": "<string>",
"url": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"instructions": "<string>",
"receipt_url": "<string>"
},
"external_ref": "<string>",
"installments": 6,
"paid_at": "2023-11-07T05:31:56Z",
"pix": {
"qr_code": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"end_to_end_id": "<string>",
"receipt_url": "<string>"
},
"metadata": {},
"ip_address": "127.0.0.1",
"next_action": {
"type": "three_ds_challenge",
"challenge_session_id": "<string>",
"client_secret": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
