Listar Eventos de Webhook
curl --request GET \
--url https://garu.com.br/api/v1/webhook-events \
--header 'Authorization: Bearer <token>'import requests
url = "https://garu.com.br/api/v1/webhook-events"
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/v1/webhook-events', 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/v1/webhook-events",
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/v1/webhook-events"
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/v1/webhook-events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/webhook-events")
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_bodyWebhooks e Exemplos
Listar Eventos de Webhook
Liste eventos de webhook com filtros de status, tipo e endpoint
GET
/
api
/
v1
/
webhook-events
Listar Eventos de Webhook
curl --request GET \
--url https://garu.com.br/api/v1/webhook-events \
--header 'Authorization: Bearer <token>'import requests
url = "https://garu.com.br/api/v1/webhook-events"
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/v1/webhook-events', 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/v1/webhook-events",
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/v1/webhook-events"
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/v1/webhook-events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/webhook-events")
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 uma lista paginada dos eventos de webhook emitidos pelo seller autenticado — entregues, pendentes e com falha. É a chamada por trás da aba Eventos em Configurações → Webhooks do dashboard.Exemplo de Requisição
# Últimos eventos que falharam
curl -X GET "https://garu.com.br/api/v1/webhook-events?status=failed&limit=5" \
-H "Authorization: Bearer sk_live_sua_chave_api"
# Eventos de pagamento confirmado de um endpoint específico
curl -X GET "https://garu.com.br/api/v1/webhook-events?eventType=transaction.payment.succeeded&endpointId=7" \
-H "Authorization: Bearer sk_live_sua_chave_api"
import { Garu } from '@garuhq/node';
const garu = new Garu({ apiKey: process.env.GARU_API_KEY });
// Últimos eventos que falharam
const failed = await garu.webhookEvents.list({ status: 'failed', limit: 5 });
// Eventos de um endpoint específico
const fromEndpoint = await garu.webhookEvents.list({
endpointId: 7,
eventType: 'transaction.payment.succeeded'
});
import os
import requests
response = requests.get(
"https://garu.com.br/api/v1/webhook-events",
headers={"Authorization": f"Bearer {os.environ['GARU_API_KEY']}"},
params={"status": "failed", "limit": 5},
)
for event in response.json()["data"]:
print(event["uuid"], event["eventType"], event["status"])
Parâmetros de Query
string
Filtra por status de entrega. Valores:
pending, success, failed.string
Filtra por tipo de evento (ex:
transaction.payment.succeeded, scheduled_charge.cycle_failed). Use os mesmos identificadores documentados em Webhooks → Eventos Disponíveis.number
Restringe a eventos entregues a um endpoint específico. Endpoints continuam identificados por ID numérico — a configuração de endpoint (URL, eventos assinados, secret) segue exclusiva do dashboard, não migrou para
/api/v1.number
default:"1"
Página da paginação.
number
default:"50"
Itens por página (máx. 100).
Resposta
{
"data": [
{
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"webhookEndpoint": {
"id": 7,
"url": "https://example.com/webhooks/garu",
"description": "Produção",
"enabled": true,
"events": ["transaction.payment.succeeded"]
},
"eventType": "transaction.payment.succeeded",
"status": "failed",
"attempts": 6,
"lastAttemptAt": "2026-05-18T14:22:11.000Z",
"nextRetryAt": null,
"responseStatus": 503,
"responseBody": "Service Unavailable",
"manualResendOf": null,
"createdAt": "2026-05-18T14:22:00.000Z",
"payload": {
"id": "evt_1a2b3c",
"type": "transaction.payment.succeeded",
"data": { "object": { "id": 999, "value": 49.9 } }
}
}
],
"count": 1,
"totalCount": 1,
"totalPages": 1
}
Campos
| Campo | Tipo | Descrição |
|---|---|---|
uuid | string | Identificador público do evento (use em get, resend e retry) |
webhookEndpoint | object | Snapshot do endpoint de destino — id continua numérico |
eventType | string | Tipo do evento Garu (ex: transaction.payment.succeeded) |
status | string | pending, success ou failed |
attempts | number | Quantas tentativas de entrega foram feitas |
lastAttemptAt | string|null | ISO timestamp da última tentativa (sucesso ou falha) |
nextRetryAt | string|null | Próximo retry agendado, se pending e ainda em janela de retry |
responseStatus | number|null | Código HTTP da última resposta do seu endpoint |
responseBody | string|null | Body da última resposta, truncado |
manualResendOf | string|null | uuid do evento original, quando este registro for um clone de reenvio manual |
payload | object | Payload completo enviado ao seu endpoint |
Os eventos ficam retidos por 30 dias. Para auditoria de longo prazo, persista os webhooks no seu lado conforme os recebe.
Was this page helpful?