Consultar Cobrança
curl --request GET \
--url https://api.example.com/charges/{chargeId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/charges/{chargeId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/charges/{chargeId}', 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.example.com/charges/{chargeId}",
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: <authorization>"
],
]);
$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.example.com/charges/{chargeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.example.com/charges/{chargeId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/charges/{chargeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "ch_flare_dc7dc11b7f984d2886d2b429",
"object": "charge",
"amount": 10.00,
"amount_cents": 1000,
"currency": "BRL",
"method": "pix",
"status": "paid",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"document": "12345678900"
},
"pix": {
"qr_code": "...",
"copy_paste": "00020101021226...",
"payment_link": "https://..."
},
"fee": {
"amount": 0.50,
"net_amount": 9.50
},
"created_at": "2026-03-05T18:14:48.552Z",
"paid_at": "2026-03-05T18:16:22.000Z",
"expires_at": "2026-03-05T19:14:48.549Z",
"metadata": {},
"livemode": true
}
Cobranças
Consultar Cobrança
Retorna os dados completos de uma cobrança
GET
/
charges
/
{chargeId}
Consultar Cobrança
curl --request GET \
--url https://api.example.com/charges/{chargeId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/charges/{chargeId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/charges/{chargeId}', 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.example.com/charges/{chargeId}",
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: <authorization>"
],
]);
$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.example.com/charges/{chargeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.example.com/charges/{chargeId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/charges/{chargeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "ch_flare_dc7dc11b7f984d2886d2b429",
"object": "charge",
"amount": 10.00,
"amount_cents": 1000,
"currency": "BRL",
"method": "pix",
"status": "paid",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"document": "12345678900"
},
"pix": {
"qr_code": "...",
"copy_paste": "00020101021226...",
"payment_link": "https://..."
},
"fee": {
"amount": 0.50,
"net_amount": 9.50
},
"created_at": "2026-03-05T18:14:48.552Z",
"paid_at": "2026-03-05T18:16:22.000Z",
"expires_at": "2026-03-05T19:14:48.549Z",
"metadata": {},
"livemode": true
}
Descrição
Retorna os dados completos de uma cobrança, incluindo status, dados do cliente, PIX e taxas.Parâmetros de Path
string
required
ID da cobrança. Aceita formato
ch_flare_xxx, UUID completo ou ID parcialHeaders
string
required
Bearer token de autenticação. Formato:
Bearer sk_live_xxxExemplo de Requisição
curl https://api.flarepayments.com/v1/charges/ch_flare_dc7dc11b7f984d2886d2b429 \
-H "Authorization: Bearer sk_live_sua_chave_aqui"
const response = await fetch(
'https://api.flarepayments.com/v1/charges/ch_flare_dc7dc11b7f984d2886d2b429',
{
headers: {
'Authorization': 'Bearer sk_live_sua_chave_aqui'
}
}
);
const charge = await response.json();
import requests
charge = requests.get(
'https://api.flarepayments.com/v1/charges/ch_flare_dc7dc11b7f984d2886d2b429',
headers={'Authorization': 'Bearer sk_live_sua_chave_aqui'}
).json()
Resposta 200 OK
string
ID da cobrança no formato
ch_flare_xxxstring
Sempre
"charge"float
Valor em Reais
integer
Valor em centavos
string
Status:
pending, paid, expired, failedobject
object
{
"id": "ch_flare_dc7dc11b7f984d2886d2b429",
"object": "charge",
"amount": 10.00,
"amount_cents": 1000,
"currency": "BRL",
"method": "pix",
"status": "paid",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"document": "12345678900"
},
"pix": {
"qr_code": "...",
"copy_paste": "00020101021226...",
"payment_link": "https://..."
},
"fee": {
"amount": 0.50,
"net_amount": 9.50
},
"created_at": "2026-03-05T18:14:48.552Z",
"paid_at": "2026-03-05T18:16:22.000Z",
"expires_at": "2026-03-05T19:14:48.549Z",
"metadata": {},
"livemode": true
}
Erros
| Status | Código | Descrição |
|---|---|---|
400 | missing_id | ID da cobrança não informado |
404 | charge_not_found | Cobrança não encontrada |
401 | unauthorized | Header Authorization ausente |
