curl --request GET \
--url https://api.brazilpix.com/v2/transactions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.brazilpix.com/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.brazilpix.com/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.brazilpix.com/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.brazilpix.com/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.brazilpix.com/v2/transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brazilpix.com/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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"type": "payment",
"paymentMethod": "pix",
"amount": 150.75,
"currency": "BRL",
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"externalReference": "pedido-12345",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"orderId": "12345",
"source": "website"
},
"pixCopyPaste": "00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"expiresAt": "2023-11-07T05:31:56Z",
"paidAt": "2023-11-07T05:31:56Z",
"e2eId": "E18189547202603160145ZYFfVx3jP8D",
"counterpartName": "Maria Silva",
"counterpartDocument": "12345678900",
"failureReason": "Bloqueio de depósito: pagador CNPJ não permitido",
"blockedDeposit": {
"reason": "cnpj_payer_not_allowed",
"refund": {
"status": "pending",
"e2eId": "D54811417202609082224L1aDrByinUX",
"settledAt": "2023-11-07T05:31:56Z"
}
},
"updatedAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 404,
"error": "NotFound",
"message": "Resource with id 550e8400-e29b-41d4-a716-446655440000 not found",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {
"resource": "Example",
"id": "550e8400-e29b-41d4-a716-446655440000"
},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}查询交易
根据 ID 返回指定交易的详情。
所需权限: TRANSACTION:READ 或 FULL_ACCESS
curl --request GET \
--url https://api.brazilpix.com/v2/transactions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.brazilpix.com/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.brazilpix.com/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.brazilpix.com/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.brazilpix.com/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.brazilpix.com/v2/transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brazilpix.com/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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"type": "payment",
"paymentMethod": "pix",
"amount": 150.75,
"currency": "BRL",
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"externalReference": "pedido-12345",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"orderId": "12345",
"source": "website"
},
"pixCopyPaste": "00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"expiresAt": "2023-11-07T05:31:56Z",
"paidAt": "2023-11-07T05:31:56Z",
"e2eId": "E18189547202603160145ZYFfVx3jP8D",
"counterpartName": "Maria Silva",
"counterpartDocument": "12345678900",
"failureReason": "Bloqueio de depósito: pagador CNPJ não permitido",
"blockedDeposit": {
"reason": "cnpj_payer_not_allowed",
"refund": {
"status": "pending",
"e2eId": "D54811417202609082224L1aDrByinUX",
"settledAt": "2023-11-07T05:31:56Z"
}
},
"updatedAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 404,
"error": "NotFound",
"message": "Resource with id 550e8400-e29b-41d4-a716-446655440000 not found",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {
"resource": "Example",
"id": "550e8400-e29b-41d4-a716-446655440000"
},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}授权
通过 POST /auth(client_id + client_secret)获取的访问令牌。有效期 300 秒。
请求头
执行操作的子账户的 reference。省略时,操作在主账户上执行;保留值 principal 同样解析为主账户,等同于省略该请求头。除 POST /auth 和 /sub-accounts 自身的端点(始终在主账户上操作)外,所有端点均接受该请求头。
可能的错误:404 SUB_ACCOUNT_NOT_FOUND、403 SUB_ACCOUNT_FORBIDDEN、403 SUB_ACCOUNT_SUSPENDED。
要求凭证已启用子账户访问(设置 → 集成 → API 凭证)。该项默认关闭,任何权限都无法替代,FULL_ACCESS 也不例外:未启用时响应为 403 SUB_ACCOUNT_FORBIDDEN。
^[a-z0-9][a-z0-9_-]{1,31}$"loja-centro"
路径参数
交易 ID(UUID)、您的 external_reference,或创建时使用的 Idempotency-Key。按此顺序解析。仍在处理中的提现(尚未生成交易)同样可以通过其中任意一项查询。
响应
交易详情
交易 ID
交易状态
pending, completed, failed, cancelled 交易类型。internal_transfer 是同一持有人名下账户之间的资金划转——内部转账或分账明细——不经过 PIX 网络。
payment, fee, refund, chargeback, withdrawal, adjustment, referral_commission, internal_transfer 使用的支付方式
pix, credit_card, boleto 金额(BRL)
150.75
货币代码
"BRL"
创建时间
交易描述
您的外部参考 ID
"pedido-12345"
客户 ID
项目 ID
自定义元数据(键值对)
{ "orderId": "12345", "source": "website" }
PIX 复制粘贴码(仅适用于待支付的 PIX 交易)
"00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890"
过期时间(仅适用于待支付的交易)
交易支付时间
PIX 网络的端到端 ID(PSP 确认后才存在)
"E18189547202603160145ZYFfVx3jP8D"
PSP 返回的交易对手名称(收款时为付款人,提现时为收款人)
"Maria Silva"
交易对手的 CPF/CNPJ,不带格式符号
"12345678900"
失败原因(仅当 status = failed 时)
"Bloqueio de depósito: pagador CNPJ não permitido"
当一笔已收到的入账因账户策略被拦截时存在(例如:不允许 CNPJ 付款人)。该金额未入账;refund 说明资金是否已退回付款人(状态 pending/confirmed/failed)、退回的 E2E 以及结算时间。
Show child attributes
Show child attributes
更新时间