Passa al contenuto principale

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.completed
    • invoice.paid
    • invoice.payment_failed
    • customer.subscription.updated
    • customer.subscription.deleted
    • charge.refunded

Stripe Connect Webhook (contas conectadas)

  • URL: https://platform.inallweb.com/api/stripe-connect/webhook
  • Eventos a subscrever:
    • account.updated

Como Configurar

  1. Aceder a https://dashboard.stripe.com/webhooks
  2. Clicar "Add endpoint"
  3. Inserir a URL do webhook
  4. Seleccionar os eventos listados acima
  5. Copiar o "Signing secret" (comeca com whsec_)
  6. Guardar no GitLab CI/CD Variables:
    • STRIPE_WEBHOOK_SECRET para o billing webhook
    • STRIPE_CONNECT_WEBHOOK_SECRET para o connect webhook

Ambientes

AmbienteURL BaseKeys
devdev.platform.inallweb.comsk_test_*
stagingstaging.platform.inallweb.comsk_test_*
prodplatform.inallweb.comsk_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.