Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork88
Sync your Stripe account to you Postgres database.
License
supabase/stripe-sync-engine
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This monorepo contains two packages for synchronizing your Stripe account with a PostgreSQL database:
@supabase/stripe-sync-engine: A TypeScript library for syncing Stripe data to PostgreSQL, designed for integration into your own Node.js backend or serverless environment.stripe-sync-fastify: A Fastify-based server and Docker image that exposes a/webhooksendpoint for Stripe, providing a ready-to-run service for real-time Stripe-to-PostgreSQL sync.
Sometimes you want to analyze your billing data using SQL. Even more importantly, you want to join your billing data to your product/business data.
This project synchronizes your Stripe account to a PostgreSQL database. It can be a new database, or an existing PostgreSQL database.
- Creates a new schema
stripein a PostgreSQL database, with tables and columns matching Stripe. - Exposes a
/webhooksendpoint that listens to any Stripe webhooks (via the Fastify app). - Inserts, updates, or deletes changes into the tables whenever there is a change to Stripe.
Note: If other PostgreSQL users need access to the
stripeschema, grant them privileges:GRANT USAGEON SCHEMA stripe TO your_user;GRANT ALL PRIVILEGESON ALL TABLESIN SCHEMA stripe TO your_user;
Each package has its own README with installation, configuration, and usage instructions.
To deploy the sync-engine to a Supabase Edge Function, follow thisguide.
balance.availablecharge.captured🟢charge.expired🟢charge.failed🟢charge.pending🟢charge.refunded🟢charge.refund.updated🟡 - For updates on all refunds, listen torefund.updatedinsteadcharge.succeeded🟢charge.updated🟢charge.dispute.closed🟢charge.dispute.created🟢charge.dispute.funds_reinstated🟢charge.dispute.funds_withdrawn🟢charge.dispute.updated🟢checkout.session.async_payment_failed🟢checkout.session.async_payment_succeeded🟢checkout.session.completed🟢checkout.session.expired🟢credit_note.created🟢credit_note.updated🟢credit_note.voided🟢customer.created🟢customer.deleted🟢customer.source.createdcustomer.source.updatedcustomer.subscription.created🟢customer.subscription.deleted🟢customer.subscription.paused🟢customer.subscription.pending_update_applied🟢customer.subscription.pending_update_expired🟢customer.subscription.resumed🟢customer.subscription.trial_will_end🟢customer.subscription.updated🟢customer.tax_id.created🟢customer.tax_id.deleted🟢customer.tax_id.updated🟢customer.updated🟢invoice.created🟢invoice.deleted🟢invoice.finalized🟢invoice.finalization_failed🟢invoice.marked_uncollectible🟢invoice.paid🟢invoice.payment_action_required🟢invoice.payment_failed🟢invoice.payment_succeeded🟢invoice.sent🟢invoice.upcoming🔴 - Event has no id and cannot be processedinvoice.updated🟢invoice.overdue🟢invoice.overpaid🟢invoice.will_be_due🟢invoice.voided🟢issuing_authorization.requestissuing_card.createdissuing_cardholder.createdpayment_intent.amount_capturable_updated🟢payment_intent.canceled🟢payment_intent.created🟢payment_intent.partially_refunded🟢payment_intent.payment_failed🟢payment_intent.processing🟢payment_intent.requires_action🟢payment_intent.succeeded🟢payment_method.attached🟢payment_method.automatically_updated🟢payment_method.detached🟢payment_method.updated🟢plan.created🟢plan.deleted🟢plan.updated🟢price.created🟢price.deleted🟢price.updated🟢product.created🟢product.deleted🟢product.updated🟢radar.early_fraud_warning.created🟢radar.early_fraud_warning.updated🟢refund.created🟢refund.failed🟢refund.updated🟢review.opened🟢review.closed🟢setup_intent.canceled🟢setup_intent.created🟢setup_intent.requires_action🟢setup_intent.setup_failed🟢setup_intent.succeeded🟢subscription_schedule.aborted🟢subscription_schedule.canceled🟢subscription_schedule.completed🟢subscription_schedule.created🟢subscription_schedule.expiring🟢subscription_schedule.released🟢subscription_schedule.updated🟢entitlements.active_entitlement_summary.updated🟢
About
Sync your Stripe account to you Postgres database.
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.

