You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This monorepo contains two packages for synchronizing your Stripe account with a Postgres database:
7
+
This monorepo contains two packages for synchronizing your Stripe account with a PostgreSQL database:
8
8
9
-
-[`@supabase/stripe-sync-engine`](./packages/sync-engine/README.md): A TypeScript library for syncing Stripe data to Postgres, designed for integration into your own Node.js backend or serverless environment.
10
-
-[`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-Postgres sync.
9
+
-[`@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.
10
+
-[`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.
11
11
12
-

12
+

13
13
14
14
---
15
15
16
16
## Motivation
17
17
18
18
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.
19
19
20
-
This project synchronizes your Stripe account to a Postgres database. It can be a new database, or an existing Postgres database.
20
+
This project synchronizes your Stripe account to a PostgreSQL database. It can be a new database, or an existing PostgreSQL database.
21
21
22
22
---
23
23
24
24
## How it works
25
25
26
26

27
27
28
-
- Creates a new schema `stripe` in a Postgres database, with tables & columns matching Stripe.
28
+
- Creates a new schema `stripe` in a PostgreSQL database, with tables and columns matching Stripe.
29
29
- Exposes a `/webhooks` endpoint that listens to any Stripe webhooks (via the Fastify app).
30
-
- Inserts/updates/deletes changes into the tables whenever there is a change to Stripe.
30
+
- Inserts, updates, or deletes changes into the tables whenever there is a change to Stripe.
31
+
32
+
> **Note:** If other PostgreSQL users need access to the `stripe` schema, grant them privileges:
33
+
>
34
+
> ```sql
35
+
>GRANT USAGE ON SCHEMA stripe TO your_user;
36
+
>GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA stripe TO your_user;
37
+
>```
31
38
32
39
---
33
40
@@ -42,7 +49,7 @@ Each package has its own README with installation, configuration, and usage inst
42
49
43
50
## Supabase Edge Function
44
51
45
-
To deploy the sync-engine to a Supabase edge function, follow this [guide](./edge-function.md).
52
+
To deploy the sync-engine to a Supabase Edge Function, follow this [guide](./docs/edge-function.md).
46
53
47
54
## Webhook Support
48
55
@@ -60,9 +67,10 @@ To deploy the sync-engine to a Supabase edge function, follow this [guide](./edg
0 commit comments