Listar Transações
curl --request GET \
--url https://api.example.com/transactions \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/transactions"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/transactions', 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/transactions",
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/transactions"
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/transactions")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/transactions")
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{
"object": "list",
"data": [
{
"id": "ch_flare_dc7dc11b7f984d2886d2b429",
"object": "charge",
"amount": 10.00,
"amount_cents": 1000,
"currency": "BRL",
"status": "paid",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com"
},
"fee": {
"amount": 0.50,
"net_amount": 9.50
},
"created_at": "2026-03-05T18:14:48.552Z",
"paid_at": "2026-03-05T18:16:22.000Z",
"livemode": true
}
],
"has_more": true,
"url": "/v1/transactions"
}
Transações
Listar Transações
Retorna o histórico de cobranças e saques com filtros e paginação
GET
/
transactions
Listar Transações
curl --request GET \
--url https://api.example.com/transactions \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/transactions"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/transactions', 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/transactions",
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/transactions"
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/transactions")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/transactions")
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{
"object": "list",
"data": [
{
"id": "ch_flare_dc7dc11b7f984d2886d2b429",
"object": "charge",
"amount": 10.00,
"amount_cents": 1000,
"currency": "BRL",
"status": "paid",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com"
},
"fee": {
"amount": 0.50,
"net_amount": 9.50
},
"created_at": "2026-03-05T18:14:48.552Z",
"paid_at": "2026-03-05T18:16:22.000Z",
"livemode": true
}
],
"has_more": true,
"url": "/v1/transactions"
}
Descrição
Retorna uma lista paginada de transações (cobranças e saques) com suporte a filtros por tipo, status e data.Headers
string
required
Bearer token de autenticação. Formato:
Bearer sk_live_xxxQuery Parameters
integer
default:"10"
Quantidade de resultados (mín: 1, máx: 100)
string
Cursor de paginação: ID da última transação da página anterior
string
Filtrar por tipo:
charge ou withdrawalstring
Filtrar por status:
pending, paid, expired, failed, processingstring
Data mínima de criação (ISO 8601)
string
Data máxima de criação (ISO 8601)
Exemplo de Requisição
# Listar as últimas 20 cobranças pagas
curl "https://api.flarepayments.com/v1/transactions?limit=20&type=charge&status=paid" \
-H "Authorization: Bearer sk_live_sua_chave_aqui"
# Próxima página após o último ID retornado
curl "https://api.flarepayments.com/v1/transactions?limit=10&starting_after=ch_flare_dc7dc11b7f984d2886d2b429" \
-H "Authorization: Bearer sk_live_sua_chave_aqui"
const params = new URLSearchParams({
limit: '20',
type: 'charge',
status: 'paid',
'created[gte]': '2026-03-01T00:00:00Z',
'created[lte]': '2026-03-31T23:59:59Z'
});
const response = await fetch(
`https://api.flarepayments.com/v1/transactions?${params}`,
{ headers: { 'Authorization': 'Bearer sk_live_sua_chave_aqui' } }
);
const { data, has_more } = await response.json();
Resposta 200 OK
string
Sempre
"list"array
Lista de transações
boolean
true se existem mais resultadosstring
URL do endpoint
{
"object": "list",
"data": [
{
"id": "ch_flare_dc7dc11b7f984d2886d2b429",
"object": "charge",
"amount": 10.00,
"amount_cents": 1000,
"currency": "BRL",
"status": "paid",
"description": "Pedido #1234",
"customer": {
"name": "João Silva",
"email": "joao@email.com"
},
"fee": {
"amount": 0.50,
"net_amount": 9.50
},
"created_at": "2026-03-05T18:14:48.552Z",
"paid_at": "2026-03-05T18:16:22.000Z",
"livemode": true
}
],
"has_more": true,
"url": "/v1/transactions"
}
Paginação
A API usa cursor-based pagination com o campostarting_after:
// Buscar todas as transações automaticamente
async function buscarTodasTransacoes() {
const transacoes = [];
let cursor = null;
do {
const params = new URLSearchParams({ limit: '100' });
if (cursor) params.set('starting_after', cursor);
const res = await fetch(`https://api.flarepayments.com/v1/transactions?${params}`, {
headers: { 'Authorization': 'Bearer sk_live_xxx' }
});
const { data, has_more } = await res.json();
transacoes.push(...data);
cursor = has_more ? data[data.length - 1].id : null;
} while (cursor);
return transacoes;
}
Quando
has_more é true, existem mais resultados. Use o id da última transação retornada como starting_after para buscar a próxima página.