Stripe Webhooks — Guia de Configuracao
URLs dos Webhooks
Billing Webhook (pagamentos, subscricoes)
- URL:
https://platform.inallweb.com/api/billing/webhooks/stripe - Eventos a subscrever:
checkout.session.completedinvoice.paidinvoice.payment_failedcustomer.subscription.updatedcustomer.subscription.deletedcharge.refunded
Stripe Connect Webhook (contas conectadas)
- URL:
https://platform.inallweb.com/api/stripe-connect/webhook - Eventos a subscrever:
account.updated
Como Configurar
- Aceder a https://dashboard.stripe.com/webhooks
- Clicar "Add endpoint"
- Inserir a URL do webhook
- Seleccionar os eventos listados acima
- Copiar o "Signing secret" (comeca com
whsec_) - Guardar no GitLab CI/CD Variables:
STRIPE_WEBHOOK_SECRETpara o billing webhookSTRIPE_CONNECT_WEBHOOK_SECRETpara o connect webhook
Ambientes
| Ambiente | URL Base | Keys |
|---|---|---|
| dev | dev.platform.inallweb.com | sk_test_* |
| staging | staging.platform.inallweb.com | sk_test_* |
| prod | platform.inallweb.com | sk_live_* |
Verificacao
Apos configurar, usar o Stripe CLI para testar:
stripe trigger checkout.session.completed --api-key sk_test_...
Ou verificar no painel admin: Configuracoes > Stripe > webhooks recebidos.