Detalhes da Cobrança Agendada
curl --request GET \
--url https://garu.com.br/api/scheduled-charges/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://garu.com.br/api/scheduled-charges/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://garu.com.br/api/scheduled-charges/{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://garu.com.br/api/scheduled-charges/{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://garu.com.br/api/scheduled-charges/{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://garu.com.br/api/scheduled-charges/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/scheduled-charges/{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_bodyCobranças Agendadas
Detalhes da Cobrança Agendada
Busque uma cobrança junto com sua linha do tempo e transações geradas
GET
/
api
/
scheduled-charges
/
{id}
Detalhes da Cobrança Agendada
curl --request GET \
--url https://garu.com.br/api/scheduled-charges/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://garu.com.br/api/scheduled-charges/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://garu.com.br/api/scheduled-charges/{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://garu.com.br/api/scheduled-charges/{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://garu.com.br/api/scheduled-charges/{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://garu.com.br/api/scheduled-charges/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/scheduled-charges/{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_bodyVisão Geral
Retorna a cobrança em pacote com:- a linha do tempo de eventos (
events, ordem cronológica), - as transações Garu geradas a partir da cobrança (
transactions).
Exemplo de Requisição
curl -X GET https://garu.com.br/api/scheduled-charges/sch_abc123 \
-H "Authorization: Bearer sk_test_sua_chave"
import { Garu } from '@garuhq/node';
const garu = new Garu({ apiKey: process.env.GARU_API_KEY });
const { charge, events, transactions } = await garu.scheduledCharges.get('sch_abc123');
console.log(charge.status);
events.forEach((e) => console.log(e.eventType, e.createdAt));
import requests
import os
response = requests.get(
"https://garu.com.br/api/scheduled-charges/sch_abc123",
headers={"Authorization": f"Bearer {os.environ['GARU_API_KEY']}"}
)
detail = response.json()
print(detail["charge"]["status"])
Parâmetros de Path
string
required
ID da cobrança (
sch_…).Resposta
{
"charge": {
"id": "sch_abc123",
"customerId": 42,
"amount": 297.5,
"type": "one_time",
"dueDate": "2026-06-15",
"methods": ["pix", "boleto"],
"status": "paid",
"customer": { "id": 42, "name": "Maria Silva", "email": "maria@exemplo.com.br", "document": "12345678901" },
"product": null,
"createdAt": "2026-05-01T12:00:00Z",
"updatedAt": "2026-06-15T13:42:00Z"
},
"events": [
{ "id": 1, "scheduledChargeId": "sch_abc123", "eventType": "created",
"actor": { "type": "user", "id": 1 }, "payload": { "amount": 297.5 },
"createdAt": "2026-05-01T12:00:00Z" },
{ "id": 2, "scheduledChargeId": "sch_abc123", "eventType": "d_day_reminder_sent",
"actor": { "type": "system" }, "payload": null,
"createdAt": "2026-06-15T11:00:00Z" },
{ "id": 3, "scheduledChargeId": "sch_abc123", "eventType": "paid",
"actor": { "type": "system" }, "payload": { "transactionId": 4472 },
"createdAt": "2026-06-15T13:42:00Z" }
],
"transactions": [
{ "id": 4472, "value": 29750, "paymentMethod": "pix", "status": "payedPix",
"date": "2026-06-15T11:01:00Z", "refundedAt": null }
]
}
Cuidado com unidades:
charge.amount está em BRL decimal (297.50) mas
transactions[].value está em centavos (29750). Converta antes de comparar.Tipos de evento
eventType | Quando |
|---|---|
created | Cobrança agendada |
postponed | Data alterada |
paused / resumed | Pausa / retomada manual |
manually_marked_paid | Marcada como paga (pagamento off-Garu) |
paid | Pagamento confirmado pela Garu |
d_day_reminder_sent | E-mail enviado ao cliente no vencimento |
overdue_reminder_sent | Lembrete enviado ao time financeiro (D+1, D+2 ou D+3) |
actor.type é user (com id numérico do usuário), api_key (com id da chave) ou system para ações automáticas dos crons.Was this page helpful?
⌘I