Skip to main content

Webhooks

TexasVerified receives webhooks from three external services.

Stripe

POST /api/stripe/webhook — receives Stripe events for billing lifecycle management. Required events:
  • checkout.session.completed
  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.paid
  • invoice.payment_failed
  • invoice.payment_action_required
The handler verifies the Stripe signature, re-fetches the customer’s current subscription set, and applies the highest mapped tier through app.apply_billing_event.

Twilio MMS

POST /twilio/mms — Twilio inbound MMS webhook (intake worker). Receives MMS media from Twilio, resolves the recipient org/location from the inbound address, stores media in R2, records upload_inbounds, and queues OCR for supported file types.

Email (Cloudflare Email Routing)

The intake worker’s email handler receives forwarded email from Cloudflare Email Routing. It extracts MIME attachments, stores OCR-capable files, records upload_inbounds, and enqueues OCR processing.