Conversation
Add a new core plugin for managing Stripe subscriptions with webhook handling, checkout sessions, and subscription gating middleware. - Webhook endpoint with HMAC-SHA256 signature verification - Handles 6 event types: subscription CRUD, checkout, payment - Checkout session creation with automatic customer linking - Subscription status API for authenticated users - Admin dashboard with stats and filterable subscription list - requireSubscription() middleware for route gating - Uses fetch + Web Crypto API (no Stripe SDK, CF Workers compatible) Closes #760 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Changes
stripe-plugin/index.tsstripe-plugin/types.tsstripe-plugin/manifest.jsonstripe-plugin/services/subscription-service.tsstripe-plugin/services/stripe-api.tsstripe-plugin/routes/api.tsstripe-plugin/routes/admin.tsstripe-plugin/components/subscriptions-page.tsstripe-plugin/middleware/require-subscription.tsrequireSubscription()route gatingcore-plugins/index.tsapp.tsAPI Endpoints
POST /api/stripe/webhook— Stripe webhook (signature verified, no auth)POST /api/stripe/create-checkout-session— Create checkout session (auth required)GET /api/stripe/subscription— Current user's subscription status (auth required)GET /api/stripe/subscriptions— List all subscriptions (admin only)GET /api/stripe/stats— Subscription stats (admin only)GET /admin/plugins/stripe— Admin dashboardTesting
tsc --noEmit)Checklist
Closes #760
🤖 Generated with Claude Code