# Services

Preflight detects the services a project uses and checks that each one is wired up: the API keys are in the environment, the SDK is initialized, the script tag is in the layout. `preflight init` declares the ones it finds in `preflight.yml`; a service declared there but never initialized is reported.

```yaml
services:
  stripe:
    declared: true
  sentry:
    declared: true
```

Each service's ID works with `--only`, `--skip`, and [`preflight ignore`](https://preflight.sh/docs/ignoring/), like a check's. IndexNow's service ID is `indexnow`, and it is verified by the `index_now` check, so either name works.

API keys are read from every `.env` file at the project root. A value in `.env`, `.env.local`, `.env.test`, and the like sets a key; a name in `.env.example`, `.env.sample`, or `.env.dist` documents it, which passes as configured but not verified. In CI, the example file is often all there is.

## Every service, with its ID

- Payments: Stripe (`stripe`), PayPal (`paypal`), Braintree (`braintree`), Paddle (`paddle`), LemonSqueezy (`lemonsqueezy`)
- Error Tracking: Sentry (`sentry`), Bugsnag (`bugsnag`), Rollbar (`rollbar`), Honeybadger (`honeybadger`), Datadog (`datadog`), New Relic (`newrelic`), LogRocket (`logrocket`)
- Email & Newsletters: Postmark (`postmark`), SendGrid (`sendgrid`), Mailgun (`mailgun`), AWS SES (`aws_ses`), Resend (`resend`), Mailchimp (`mailchimp`), Kit (`convertkit`), Beehiiv (`beehiiv`), AWeber (`aweber`), ActiveCampaign (`activecampaign`), Campaign Monitor (`campaignmonitor`), Drip (`drip`), Klaviyo (`klaviyo`), Buttondown (`buttondown`)
- Analytics: Fullres (`fullres`), Plausible (`plausible`), Fathom (`fathom`), Umami (`umami`), Google Analytics (`google_analytics`), PostHog (`posthog`), Mixpanel (`mixpanel`), Amplitude (`amplitude`), Segment (`segment`), Hotjar (`hotjar`), Datafa.st (`datafast`)
- Auth: Auth0 (`auth0`), Clerk (`clerk`), WorkOS (`workos`)
- Chat: Intercom (`intercom`), Crisp (`crisp`)
- Notifications: Slack (`slack`), Discord (`discord`), Twilio (`twilio`)
- Infrastructure: Redis (`redis`), Sidekiq (`sidekiq`), RabbitMQ (`rabbitmq`), Elasticsearch (`elasticsearch`), Convex (`convex`), Firebase (`firebase`), Supabase (`supabase`)
- Storage & CDN: AWS S3 (`aws_s3`), Cloudinary (`cloudinary`), Cloudflare (`cloudflare`)
- Search & SEO: Algolia (`algolia`), IndexNow (`indexnow`)
- AI & LLMs: OpenAI (`openai`), Anthropic (`anthropic`), Google AI (`google_ai`), Mistral (`mistral`), Cohere (`cohere`), Replicate (`replicate`), Hugging Face (`huggingface`), Grok (`grok`), Perplexity (`perplexity`), Together AI (`together_ai`)
- Cookie Consent: CookieConsent (`cookieconsent`), Cookiebot (`cookiebot`), OneTrust (`onetrust`), Termly (`termly`), CookieYes (`cookieyes`), Iubenda (`iubenda`)

Stripe is the one service whose check needs more than `declared: true`. It runs when `preflight.yml` has a `checks.stripeWebhook` block, and its result ID is `stripe` (there is no `stripe_webhook` ID). It verifies the API keys, the webhook secret, and the SDK's initialization. Set `checks.stripeWebhook.url` and it also probes the webhook endpoint.

```yaml
services:
  stripe:
    declared: true
checks:
  stripeWebhook:
    enabled: true
    url: "https://api.example.com/webhooks/stripe"  # optional
```
