home / skills / andrelandgraf / fullstackrecipes / stripe-sync
This skill automates Stripe subscriptions syncing with Postgres via webhooks, Vercel flags for plan configuration, and billing portal integration.
npx playbooks add skill andrelandgraf/fullstackrecipes --skill stripe-syncReview the files below or copy the command above to add this skill to your agents.
---
name: stripe-sync
description: Complete subscription system with Stripe, Vercel Flags for plan configuration, webhook handling for syncing subscription state to Postgres, usage tracking, and billing portal integration.
---
# Stripe Subscriptions DB Sync
To set up Stripe Subscriptions DB Sync, refer to the fullstackrecipes MCP server resource:
**Resource URI:** `recipe://fullstackrecipes.com/stripe-sync`
If the MCP server is not configured, fetch the recipe directly:
```bash
curl -H "Accept: text/plain" https://fullstackrecipes.com/api/recipes/stripe-sync
```
This skill implements a complete Stripe subscription system that syncs billing state to Postgres, integrates a billing portal, tracks usage, and supports plan configuration via Vercel Flags. It provides webhook handling and production-ready patterns to keep your database in sync with Stripe subscription lifecycle events. The codebase is TypeScript-first and designed for full-stack AI web apps.
The skill wires Stripe webhooks to server endpoints that parse events and update subscription, customer, and invoice records in Postgres. Vercel Flags drive plan definitions and feature toggles so you can change pricing or entitlements without redeploying. Usage tracking routes metered events into Stripe and your DB, and a billing portal link lets customers manage payment methods and plans. The implementation includes robust idempotency and verification to avoid duplicate state updates.
Does this handle webhook retries and duplicate events?
Yes. The webhook handlers verify signatures, apply idempotency checks, and are safe to retry.
Can I change plan pricing without deploying code?
Yes. Use Vercel Flags to adjust plan configuration and entitlements dynamically.