- One layer less between the env and billing.
parseBillingSettingsnow takes the server env by its own names (env.STRIPE_SECRET_KEY,env.BILLING_PROVIDERS). TheBillingSettingsInputtype, which renamed each of the 23 billing variables to camelCase, and the mapping inreadBillingSettingsare gone. A new provider variable is declared inpackages/env/src/server.tsand read in the parser, nothing else. Behavior and validation are unchanged. See Payments and Backend conventions. - 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" }).
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.
Edit on GitHubDocumentation is in English.