Overview
The API exposes three webhook endpoints for third-party services. All are public (no auth middleware) — security relies on signature verification.Stripe payment webhooks
STRIPE_SIGNING_SECRET env var.
Handles Stripe payment events (charge succeeded, failed, etc.) for Stripe Connect accounts.
Stripe subscription webhooks
STRIPE_SUBSCRIPTION_SIGNING_SECRET env var.
Handler: StripeService::handleSubscriptionWebhook()
Processes subscription lifecycle events:
customer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_failedinvoice.payment_succeeded
subscriptions table status accordingly.
Identity verification webhooks
ONFIDO_WEBHOOK_TOKEN env var.
Receives verification status updates when Onfido completes an identity check. Updates verification_accounts table with new status (PASS, FAIL, or INTERNAL_REVIEW).
Triggers TutorIDVerificationStatusUpdated email to internal team.