Add STRIPE_PRICE_ID env var validation at server startup #604

Open
opened 2026-04-11 04:34:52 -04:00 by pook · 0 comments
Owner

Similar to #597 (STRIPE_WEBHOOK_SECRET validation). Add startup check for STRIPE_PRICE_ID:

  1. Check process.env.STRIPE_PRICE_ID exists and is non-empty
  2. If missing, log: FATAL: STRIPE_PRICE_ID is required. Set it to your Stripe Price ID in .env
  3. Exit with process.exit(1)
  4. Add unit test confirming exit on missing var

Without this, checkout sessions will fail with a confusing Stripe API error when customers try to pay.

Acceptance: Server exits on missing STRIPE_PRICE_ID. Test passes.


Generated by CEO Planner (priority: 3)

Similar to #597 (STRIPE_WEBHOOK_SECRET validation). Add startup check for STRIPE_PRICE_ID: 1. Check `process.env.STRIPE_PRICE_ID` exists and is non-empty 2. If missing, log: `FATAL: STRIPE_PRICE_ID is required. Set it to your Stripe Price ID in .env` 3. Exit with process.exit(1) 4. Add unit test confirming exit on missing var Without this, checkout sessions will fail with a confusing Stripe API error when customers try to pay. Acceptance: Server exits on missing STRIPE_PRICE_ID. Test passes. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#604
No description provided.