Commit graph

4 commits

Author SHA1 Message Date
2a61626135
feat: allow script to work with both test and live Stripe keys
- Accept both sk_test_ and sk_live_ API keys
- Show mode indicator (TEST/LIVE) in output
- Adjust webhook URL based on mode (localhost for test, towerops.net for live)
- Add warning when using test mode
- Useful for testing billing setup before going live
2026-03-06 11:08:07 -06:00
13631595a7
fix: handle spaces in JSON when extracting Stripe IDs
- Update grep patterns to match JSON with spaces after colons
- Fixes false 'Error creating meter' message when meter created successfully
- Applies to meter ID and price ID extraction
2026-03-06 11:08:07 -06:00
3e721b9395
fix: check for existing billing meter before creating
- First check if a meter with 'devices_monitored' event exists
- Reuse existing meter ID if found
- Only create new meter if none exists
- Fixes error when meter already exists in Stripe account
2026-03-06 11:08:07 -06:00
d3aa602ba4
feat: add production Stripe billing setup script
- Interactive script to create production billing meter and price
- Prompts for live API key and product ID
- Creates billing meter with 'devices_monitored' event
- Creates metered price at $1/device/month
- Outputs kubectl command for creating k8s secret
- Includes setup instructions for webhook configuration
2026-03-06 11:08:06 -06:00