-
Notifications
You must be signed in to change notification settings - Fork 0
Add Stripe billing integration #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
aa165fe
Add Stripe billing integration
simonsmallchua cdc6788
Update plans to new tier structure
simonsmallchua ef90979
Fix Stripe webhook subscription fetch
simonsmallchua a25bac4
Add 1Password local dev secrets
simonsmallchua 69e8a05
Fix Stripe billing critical/major review issues
simonsmallchua c682a24
Fix Stripe nil guards and usage request dedup
simonsmallchua 52760e1
Promote stripe-go to direct dependency
simonsmallchua 0781500
Update changelog for Stripe billing
simonsmallchua 1c97a4f
Resolve imports and deps post-rebase
simonsmallchua 4f3a75e
Return 5xx on transient Stripe webhook failures
simonsmallchua 13dd662
Harden billing checkout against duplicates and PII
simonsmallchua cdd3829
Bust usage cache on plan switch
simonsmallchua 33da653
Wire Stripe secrets into deploy and review-app pipelines
simonsmallchua 81b0858
Move Stripe live keys into fly-setup composite
simonsmallchua 192edb2
Restore corrected Stripe op:// paths in .env.op
simonsmallchua 8e4c50c
Reorder Stripe migrations after main's tail
simonsmallchua c0487c0
Make Stripe migration idempotent
simonsmallchua 7319f3b
Trigger Supabase Preview after migration log repair
simonsmallchua 6e56740
Seed sandbox Stripe price IDs and fix orgs
simonsmallchua b8c17ae
Reload review app for updated Stripe webhook secret
simonsmallchua 4ee25bb
Merge branch 'main' into worktree-calm-hugging-pebble
simonsmallchua 83b8c1b
Reload review app for new Stripe webhook secret
simonsmallchua b7124fa
Move Stripe webhook route under /v1 prefix
simonsmallchua 9085689
Tolerate API version drift on webhook events
simonsmallchua ad19781
Wire Stripe portal config ID into billing portal
simonsmallchua 264e594
Redirect Stripe Checkout to plans tab with toast
simonsmallchua da4c375
Switch existing subscriptions in place via Stripe API
simonsmallchua 9dfaa62
Use sandbox portal config for review apps
simonsmallchua 1a72320
Cancel Stripe sub on Switch to Free, adopt orphan subs
simonsmallchua 6adc64e
Cancel at period end so customers keep paid time
simonsmallchua c017443
Address CodeRabbit billing safety findings
simonsmallchua 6a28b2b
ACK Stripe webhooks for unknown customer or price
simonsmallchua a615e2b
Adopt Stripe sub ID on first webhook for non-current guard
simonsmallchua 38d8ba2
Refuse subscription events when no sub is stored
simonsmallchua 54a06dc
Update changelog with hardening and switch flows
simonsmallchua 52de11e
Switch Stripe code to slog logging with Sentry integration
simonsmallchua 2f653bd
Refetch Stripe subscription on update webhook for ordering
simonsmallchua 78f3e83
Sync plan_id immediately on in-place subscription update
simonsmallchua File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Dev secrets pulled from 1Password via op inject. | ||
| # Injected automatically by dev.sh when the op CLI is available and signed in. | ||
| # No secrets here — only op:// references. Safe to commit. | ||
|
|
||
| # ── OAuth client secrets ────────────────────────────────────────────────────── | ||
| SLACK_CLIENT_SECRET=op://Good Native/hover-runtime/SLACK_CLIENT_SECRET | ||
| WEBFLOW_CLIENT_SECRET=op://Good Native/hover-runtime/WEBFLOW_CLIENT_SECRET | ||
| GOOGLE_CLIENT_SECRET=op://Good Native/hover-runtime/GOOGLE_CLIENT_SECRET | ||
|
|
||
| # ── Email ───────────────────────────────────────────────────────────────────── | ||
| LOOPS_API_KEY=op://Good Native/hover-runtime/LOOPS_API_KEY | ||
|
|
||
| # ── Stripe (test keys) ──────────────────────────────────────────────────────── | ||
| # STRIPE_WEBHOOK_SECRET is intentionally absent — it is session-specific and | ||
| # comes from the Stripe CLI: stripe listen --forward-to localhost:8080/v1/webhooks/stripe | ||
| STRIPE_SECRET_KEY=op://Good Native/hover-stripe/_TEST_STRIPE_SECRET_KEY | ||
| STRIPE_PUBLISHABLE_KEY=op://Good Native/hover-stripe/_TEST_STRIPE_PUBLISHABLE_KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| .env | ||
| .env.* | ||
| !.env.example | ||
| !.env.op | ||
|
|
||
| # Dependencies | ||
| /vendor/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.