Endpoints

Endpoint:
/Webhooks

Receba eventos em tempo real via HTTPS. Validação por HMAC-SHA256. Retries com backoff exponencial (até 5x).

Última AtualizaçãoMAR 2026
POST/v1/webhook-configs

Criar webhook

Configura um endpoint para receber webhooks. A URL deve usar HTTPS. Um secret é gerado automaticamente.

Parâmetros

CampoTipoObrigatórioDescrição
urlstringOBRIGATÓRIOURL HTTPS do seu endpoint
eventsarrayOBRIGATÓRIOEventos: payment.confirmed, ticket.generated, batch.sold_out, *
Valide webhooks com o header X-Webhook-Signature (HMAC-SHA256 do payload usando o secret).
{
  "url": "https://seusite.com/webhooks/flair",
  "events": [
    "payment.confirmed",
    "ticket.generated",
    "batch.sold_out"
  ]
}
Resposta
201 Created
{
  "data": {
    "id": "wh_uuid",
    "url": "https://seusite.com/webhooks/flair",
    "secret": "whsec_abc123...",
    "events": ["payment.confirmed", ...]
  }
}
GET/v1/webhooks/dlq

Dead Letter Queue

Lista webhooks que falharam após 5 tentativas.

curl .../webhooks/dlq -H "Authorization: Bearer TOKEN"
Resposta
200 OK
{ "data": [{ "webhook_id": "...", "event": "payment.confirmed", "attempts": 5, "last_error": "timeout" }] }
POST/v1/webhooks/dlq/:id/retry

Retentar webhook

Reenvia um webhook da DLQ.

curl -X POST .../webhooks/dlq/wh_uuid/retry -H "Authorization: Bearer TOKEN"
Resposta
200 OK
{ "data": { "status": "retrying" } }

Pronto para escalar?

Nossa infraestrutura global processa milhões de requisições simultâneas em horários de pico. Junte-se a +500 promotores usando Flair.

99.9%

Uptime Garantido

API
terminalAPI Sandbox
api.flair.api.br
Flair