HeadlinesBriefing favicon HeadlinesBriefing.com

Stripe-no-webhooks Syncs Payment Data to Postgres

Hacker News: Front Page •
×

A developer has open-sourced stripe-no-webhooks, a TypeScript library that syncs Stripe payment data directly to your PostgreSQL database. The tool eliminates the need for manual webhook setup and rate limit concerns while providing SQL access to subscription data. It's designed as an alternative to libraries like dj-stripe for Django.

The library creates a webhook endpoint in your Stripe account and automatically syncs all payment events to a new stripe.* schema. Developers define subscription plans in TypeScript, run a sync command, and the library handles everything from creating Stripe products to tracking credits and usage. It supports prepaid credits, account wallets, and usage-based billing with features like seat-level credits and micro-cent precision.

With stripe-no-webhooks, developers can query payment data using SQL joins, give AI agents read access for debugging, and avoid Stripe's 100 rpm API rate limit. The library provides simple APIs for subscriptions, credits, wallets, and usage tracking through commands like `billing.credits.consume()` and `billing.wallet.consume()`. A demo app is available at snw-test.vercel.app for testing with Stripe's test card 4242 4242 4242 4242.