feat(stripe): add Fastify Stripe plugin with tests and docs#1112
Open
premsgr wants to merge 22 commits into
Open
feat(stripe): add Fastify Stripe plugin with tests and docs#1112premsgr wants to merge 22 commits into
premsgr wants to merge 22 commits into
Conversation
Refresh workspace dependencies and lockfiles. Align ESLint/config package metadata. Improve error-handler and shared type definitions with updated docs and tests.
Add ANALYSIS/FEATURES/GUIDE, ignore coverage output, tune vite and lockfile for tests.
… unused deps - Route checkout metadata to the data block matching the session mode (payment_intent_data / subscription_data / setup_intent_data) so Stripe no longer rejects subscription/setup sessions. - Reuse the static Stripe.webhooks.constructEvent instead of constructing a new Stripe client per webhook request. - Tag raw-body JSON parse errors with statusCode 400 so Fastify responds 400 instead of 500. - Declare request.stripeEvent via module augmentation; drop inline casts. - Remove redundant enablePaymentWebhook guard inside the webhook controller. - Drop unused zod dependency and unused supertokens-node peer/dev dependency. - Sync ANALYSIS, FEATURES, GUIDE, README, and tests with new behavior.
…backs Treat config.stripe as optional in ApiConfig and guard every consumer (StripeClient, webhook controller, verifyStripeSignature) so the plugin is safe to load without a Stripe block. Default webhook handler now logs an error and resolves instead of throwing, so missing handler config no longer triggers infinite Stripe retries; the controller also warns at registration time and replies 500 (rather than throwing) if a verified event is somehow absent. Only populate session/mode-specific metadata when metadata is actually provided. Updates tests, ANALYSIS/FEATURES/ GUIDE/README accordingly, documents the raw-body parser's plugin-scope contract, and trims unused rollup globals.
- Add structured "ours vs theirs" classification with 36 custom logic items - Document all framework constructs (module augmentations, plugin, routes) - Detail conditional branches and default values - Include completeness checklist
uddhab
requested changes
May 14, 2026
…lback Prefer plugin register options; fall back to fastify.config.stripe with a recommendation warning. Pass resolved config into webhook controller and createVerifyStripeSignature. Update package docs and tests.
Move stripe to peerDependencies; keep it in devDependencies for package tests.
Throw when plugin options or webhook { stripeConfig } is missing.
Tighten Fastify plugin typings; bundle externals from peers only in Vite.
Update stripe docs, tests, and lockfile.
- Add stripe as a direct dependency; remove from peerDependencies - Externalize dependencies in stripe Vite build alongside peers - Remove README; update ANALYSIS, FEATURES, and GUIDE
Warn when register omits options or passes {}, use fastify.config.stripe
when present, update ANALYSIS/FEATURES/GUIDE, and extend plugin tests.
Remove fastify.config.stripe fallback when options are omitted or empty. Update ANALYSIS, FEATURES, GUIDE, and plugin tests accordingly.
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.
feat(stripe): add Fastify Stripe plugin with tests and docs
Tasks completed
@prefabs.tech/fastify-stripe: Stripe client helpers, raw body parsing for webhooks, andverifyStripeSignaturemiddleware./coveragelike sibling packages.pnpm-lock.yamlfor new dependencies.