Listar webhooks de la cuenta
GET /api/webhooks
Retorna todos los webhooks configurados para la cuenta autenticada.
Autenticación
Requiere un Bearer token en el header Authorization.
Respuesta (200)
| Campo | Tipo | Descripción |
|---|---|---|
accountId | number | ID de la cuenta |
webhooks | array | Lista de webhooks configurados |
webhooks[].id | number | Identificador único del webhook |
webhooks[].type | string | Tipo de evento: cash_in, cash_out, refund_in, refund_out |
webhooks[].url | string | URL del endpoint configurado |
webhooks[].headers | object | Headers personalizados (clave-valor) |
webhooks[].isActive | boolean | Indica si el webhook está activo |
webhooks[].createdAt | string | Fecha de creación (ISO 8601) |
total | number | Cantidad total de webhooks configurados |
{
"accountId": 93,
"webhooks": [
{
"id": 1,
"type": "cash_in",
"url": "https://api.example.com/webhooks/pix",
"headers": {
"Authorization": "Bearer token123"
},
"isActive": true,
"createdAt": "2025-01-09T12:00:00.000Z"
}
],
"total": 4
}Errores
| Estado | Descripción |
|---|---|
| 401 | Token faltante o inválido |
| 404 | Cuenta no encontrada |