GitHub License NPM Version Docker Image Version
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.
Each package has its own README with installation, configuration, and usage instructions.
To deploy the sync-engine to a Supabase Edge Function, follow this guide.
-
balance.available -
charge.capturedπ’ -
charge.expiredπ’ -
charge.failedπ’ -
charge.pendingπ’ -
charge.refundedπ’ -
charge.refund.updatedπ‘ - For updates on all refunds, listen torefund.updatedinstead -
charge.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π’ -
credit_note.createdπ’ -
credit_note.updatedπ’ -
credit_note.voidedπ’ -
customer.createdπ’ -
customer.deletedπ’ -
customer.source.created -
customer.source.updated -
customer.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 processed -
invoice.updatedπ’ -
invoice.overdueπ’ -
invoice.overpaidπ’ -
invoice.will_be_dueπ’ -
invoice.voidedπ’ -
issuing_authorization.request -
issuing_card.created -
issuing_cardholder.created -
payment_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π’