# Billing settings read the env by its own names

The billing settings parser takes the server env record directly, so a new provider variable is two edits instead of four and its tests read like the env file.

- **One layer less between the env and billing.** `parseBillingSettings` now takes the server env by its own names (`env.STRIPE_SECRET_KEY`, `env.BILLING_PROVIDERS`). The `BillingSettingsInput` type, which renamed each of the 23 billing variables to camelCase, and the mapping in `readBillingSettings` are gone. A new provider variable is declared in `packages/env/src/server.ts` and read in the parser, nothing else. Behavior and validation are unchanged. See [Payments](/docs/features/payments) and [Backend conventions](/docs/development/backend-conventions#configuration-is-declared-once).
- **Tests read like the env file.** The test helper's defaults are `BILLING_TEST_ENV`, an env fragment with three providers on, and a test overrides variables by name: `billingSettings({ BILLING_PROVIDERS: "pagarme", PAGARME_WEBHOOK_SIGNATURE: "required" })`.
