A TypeScript library for syncing Stripe objects (customers, invoices, products, etc.) to PostgreSQL in real-time via webhooks, with support for backfilling and entity revalidation. Version 0.1.0 is the initial release, offering a configurable sync engine that creates tables under a configurable schema (default: 'stripe') and handles webhook signature verification. It requires the 'stripe' npm package (peer dependency > 11) and pg (for database connections). Designed for Node.js and serverless environments, with first-class TypeScript support and optional pino logger integration.
npm install stripe-sync-engineNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize StripeSync with PostgreSQL connection and Stripe keys, then process a webhook event.
Replace `databaseUrl` with `poolConfig: { connectionString: '...' }`Ensure your prefix logic accounts for the auto-appended underscore or include it explicitly.
Update stripe to >=12 (recommended) by running `npm install stripe@latest`.
Pass `schema: 'your_schema_name'` during StripeSync construction.
Run `npm install stripe-sync-engine stripe` to install both.
Set `stripeSecretKey` in the options object to a valid Stripe secret key (e.g., from environment variable).
Replace `databaseUrl` with `poolConfig: { connectionString: 'your_connection_string' }`.