Skip to main content
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>'

Documentation Index

Fetch the complete documentation index at: https://docs.garu.com.br/llms.txt

Use this file to discover all available pages before exploring further.

Visã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).
É a chamada que alimenta a página de detalhes do dashboard.

Exemplo de Requisição

curl -X GET https://garu.com.br/api/scheduled-charges/sch_abc123 \
  -H "Authorization: Bearer sk_test_sua_chave"

Parâmetros de Path

id
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

eventTypeQuando
createdCobrança agendada
postponedData alterada
paused / resumedPausa / retomada manual
manually_marked_paidMarcada como paga (pagamento off-Garu)
paidPagamento confirmado pela Garu
d_day_reminder_sentE-mail enviado ao cliente no vencimento
overdue_reminder_sentLembrete 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.