Stripe-To-Postgres Sync Engine as standalone Library
Blog post from Supabase
Syncing Stripe data to a Postgres database using the Stripe-Sync-Engine offers benefits such as locally available data, lower latency, better joins, and the ability to implement custom logic. The engine can be installed directly within a backend, and Supabase Edge Functions can be used to facilitate the synchronization process by setting up Stripe webhooks with a deployed Edge Function URL. To utilize the Stripe-Sync-Engine effectively, it's important to ensure that the necessary schema and tables are in place, preferably performing schema migrations outside the Edge Function through a one-off migration or by integrating migration files into the regular workflow. As webhooks are received, data is automatically stored in the Stripe schema, enabling more efficient analytics, faster dunning workflows, and streamlined integrations, ultimately bringing billing data closer to databases and applications. More detailed guidance can be found in the Stripe-Sync-Engine repository documentation.