{"id":49172505,"url":"https://github.com/stripe/sync-engine","last_synced_at":"2026-04-30T17:00:47.607Z","repository":{"id":36959053,"uuid":"362822275","full_name":"stripe/sync-engine","owner":"stripe","description":"Sync your Stripe account to you Postgres database.","archived":false,"fork":false,"pushed_at":"2026-04-15T19:49:56.000Z","size":4622,"stargazers_count":1030,"open_issues_count":27,"forks_count":114,"subscribers_count":35,"default_branch":"main","last_synced_at":"2026-04-23T16:03:28.646Z","etag":null,"topics":["fastify","postgres","postgresql","stripe","stripe-api","stripe-payments","stripe-subscriptions","typescript"],"latest_commit_sha":null,"homepage":"https://supabase.github.io/stripe-sync-engine","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stripe.png","metadata":{"funding":{"github":["supabase"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null},"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-29T13:12:48.000Z","updated_at":"2026-04-22T19:57:12.000Z","dependencies_parsed_at":"2026-04-16T15:03:48.777Z","dependency_job_id":null,"html_url":"https://github.com/stripe/sync-engine","commit_stats":{"total_commits":160,"total_committers":11,"mean_commits":"14.545454545454545","dds":0.61875,"last_synced_commit":"b84ebe1e5d63a63bc334921988d49f7c4af8ccfd"},"previous_names":["stripe/sync-engine"],"tags_count":92,"template":false,"template_full_name":null,"purl":"pkg:github/stripe/sync-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fsync-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fsync-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fsync-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fsync-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stripe","download_url":"https://codeload.github.com/stripe/sync-engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fsync-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32470879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastify","postgres","postgresql","stripe","stripe-api","stripe-payments","stripe-subscriptions","typescript"],"created_at":"2026-04-22T20:00:44.296Z","updated_at":"2026-04-30T17:00:47.600Z","avatar_url":"https://github.com/stripe.png","language":"TypeScript","funding_links":["https://github.com/sponsors/supabase"],"categories":["TypeScript"],"sub_categories":[],"readme":"# Stripe Sync Engine Monorepo\n\n![GitHub License](https://img.shields.io/github/license/supabase/stripe-sync-engine)\n![NPM Version](https://img.shields.io/npm/v/%40supabase%2Fstripe-sync-engine)\n![Docker Image Version](https://img.shields.io/docker/v/supabase/stripe-sync-engine?label=Docker)\n\nThis monorepo contains two packages for synchronizing your Stripe account with a PostgreSQL database:\n\n- [`@supabase/stripe-sync-engine`](./packages/sync-engine/README.md): A TypeScript library for syncing Stripe data to PostgreSQL, designed for integration into your own Node.js backend or serverless environment.\n- [`stripe-sync-fastify`](./packages/fastify-app/README.md): A Fastify-based server and Docker image that exposes a `/webhooks` endpoint for Stripe, providing a ready-to-run service for real-time Stripe-to-PostgreSQL sync.\n\n![Sync Stripe with PostgreSQL](./docs/stripe-sync-engine.jpg)\n\n---\n\n## Motivation\n\nSometimes you want to analyze your billing data using SQL. Even more importantly, you want to join your billing data to your product/business data.\n\nThis project synchronizes your Stripe account to a PostgreSQL database. It can be a new database, or an existing PostgreSQL database.\n\n---\n\n## How it works\n\n![How it works](./docs/sync-engine-how.png)\n\n- Creates a new schema `stripe` in a PostgreSQL database, with tables and columns matching Stripe.\n- Exposes a `/webhooks` endpoint that listens to any Stripe webhooks (via the Fastify app).\n- Inserts, updates, or deletes changes into the tables whenever there is a change to Stripe.\n\n\u003e **Note:** If other PostgreSQL users need access to the `stripe` schema, grant them privileges:\n\u003e\n\u003e ```sql\n\u003e GRANT USAGE ON SCHEMA stripe TO your_user;\n\u003e GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA stripe TO your_user;\n\u003e ```\n\n---\n\n## Packages\n\n- [Library: @supabase/stripe-sync-engine](./packages/sync-engine/README.md)\n- [Docker/Server: supabase/stripe-sync-engine](./packages/fastify-app/README.md)\n\nEach package has its own README with installation, configuration, and usage instructions.\n\n---\n\n## Supabase Edge Function\n\nTo deploy the sync-engine to a Supabase Edge Function, follow this [guide](./docs/edge-function.md).\n\n## Webhook Support\n\n- [ ] `balance.available`\n- [x] `charge.captured` 🟢\n- [x] `charge.expired` 🟢\n- [x] `charge.failed` 🟢\n- [x] `charge.pending` 🟢\n- [x] `charge.refunded` 🟢\n- [x] `charge.refund.updated` 🟡 - For updates on all refunds, listen to `refund.updated` instead\n- [x] `charge.succeeded` 🟢\n- [x] `charge.updated` 🟢\n- [x] `charge.dispute.closed` 🟢\n- [x] `charge.dispute.created` 🟢\n- [x] `charge.dispute.funds_reinstated` 🟢\n- [x] `charge.dispute.funds_withdrawn` 🟢\n- [x] `charge.dispute.updated` 🟢\n- [x] `checkout.session.async_payment_failed` 🟢\n- [x] `checkout.session.async_payment_succeeded` 🟢\n- [x] `checkout.session.completed` 🟢\n- [x] `checkout.session.expired` 🟢\n- [x] `credit_note.created` 🟢\n- [x] `credit_note.updated` 🟢\n- [x] `credit_note.voided` 🟢\n- [x] `customer.created` 🟢\n- [x] `customer.deleted` 🟢\n- [ ] `customer.source.created`\n- [ ] `customer.source.updated`\n- [x] `customer.subscription.created` 🟢\n- [x] `customer.subscription.deleted` 🟢\n- [x] `customer.subscription.paused` 🟢\n- [x] `customer.subscription.pending_update_applied` 🟢\n- [x] `customer.subscription.pending_update_expired` 🟢\n- [x] `customer.subscription.resumed` 🟢\n- [x] `customer.subscription.trial_will_end` 🟢\n- [x] `customer.subscription.updated` 🟢\n- [x] `customer.tax_id.created` 🟢\n- [x] `customer.tax_id.deleted` 🟢\n- [x] `customer.tax_id.updated` 🟢\n- [x] `customer.updated` 🟢\n- [x] `invoice.created` 🟢\n- [x] `invoice.deleted` 🟢\n- [x] `invoice.finalized` 🟢\n- [x] `invoice.finalization_failed` 🟢\n- [x] `invoice.marked_uncollectible` 🟢\n- [x] `invoice.paid` 🟢\n- [x] `invoice.payment_action_required` 🟢\n- [x] `invoice.payment_failed` 🟢\n- [x] `invoice.payment_succeeded` 🟢\n- [x] `invoice.sent` 🟢\n- [ ] `invoice.upcoming` 🔴 - Event has no id and cannot be processed\n- [x] `invoice.updated` 🟢\n- [x] `invoice.overdue` 🟢\n- [x] `invoice.overpaid` 🟢\n- [x] `invoice.will_be_due` 🟢\n- [x] `invoice.voided` 🟢\n- [x] `invoice_payment.paid` 🟢\n- [ ] `issuing_authorization.request`\n- [ ] `issuing_card.created`\n- [ ] `issuing_cardholder.created`\n- [x] `payment_intent.amount_capturable_updated` 🟢\n- [x] `payment_intent.canceled` 🟢\n- [x] `payment_intent.created` 🟢\n- [x] `payment_intent.partially_funded` 🟢\n- [x] `payment_intent.payment_failed` 🟢\n- [x] `payment_intent.processing` 🟢\n- [x] `payment_intent.requires_action` 🟢\n- [x] `payment_intent.succeeded` 🟢\n- [x] `payment_method.attached` 🟢\n- [x] `payment_method.automatically_updated` 🟢\n- [x] `payment_method.detached` 🟢\n- [x] `payment_method.updated` 🟢\n- [x] `plan.created` 🟢\n- [x] `plan.deleted` 🟢\n- [x] `plan.updated` 🟢\n- [x] `price.created` 🟢\n- [x] `price.deleted` 🟢\n- [x] `price.updated` 🟢\n- [x] `product.created` 🟢\n- [x] `product.deleted` 🟢\n- [x] `product.updated` 🟢\n- [x] `radar.early_fraud_warning.created` 🟢\n- [x] `radar.early_fraud_warning.updated` 🟢\n- [x] `refund.created` 🟢\n- [x] `refund.failed` 🟢\n- [x] `refund.updated` 🟢\n- [x] `review.opened` 🟢\n- [x] `review.closed` 🟢\n- [x] `setup_intent.canceled` 🟢\n- [x] `setup_intent.created` 🟢\n- [x] `setup_intent.requires_action` 🟢\n- [x] `setup_intent.setup_failed` 🟢\n- [x] `setup_intent.succeeded` 🟢\n- [x] `subscription_schedule.aborted` 🟢\n- [x] `subscription_schedule.canceled` 🟢\n- [x] `subscription_schedule.completed` 🟢\n- [x] `subscription_schedule.created` 🟢\n- [x] `subscription_schedule.expiring` 🟢\n- [x] `subscription_schedule.released` 🟢\n- [x] `subscription_schedule.updated` 🟢\n- [x] `entitlements.active_entitlement_summary.updated` 🟢\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstripe%2Fsync-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstripe%2Fsync-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstripe%2Fsync-engine/lists"}