# Real-time sync to Postgres

Access real-time Stripe data with a direct mapping to the Stripe API.

Data Pipeline continuously streams your Stripe data to a Postgres database. When any data changes in your Stripe account (for example, a new payment, a subscription update, or a customer change), the updated information appears in your Postgres database within a few seconds. Sync times vary with change volume, and during [public preview](https://docs.stripe.com/release-phases.md), a row can temporarily show an earlier state.

Unlike webhooks, which deliver event notifications for individual changes and require you to build and maintain your own data store, Data Pipeline maintains a continuously synchronized copy of all your Stripe data in your Postgres database. This means you can query your complete Stripe dataset without writing event handlers or managing state.

### Request to join the preview for real-time sync to Postgres.

Enter your email to request access.

```bash
curl https://docs.stripe.com/preview/register \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Referer: https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres" \
  -d '{"email": "EMAIL", "preview": "data_pipeline_next_gen_preview"}'
```

## Data availability 

A data pipeline can include everything in the public Stripe API that supports a list endpoint. See the [real-time sync schema](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres/schema.md) for the tables, columns, and Postgres data types available to sync. This means:

- All listable resources are available: charges, customers, subscriptions, payment intents, invoices, and so on.
- Resources that return a single object rather than a list aren’t available. For example, [Balance](https://docs.stripe.com/api/balance.md) is a single object and can’t be synced.
- Data Pipeline only includes data available through the public API.

You control which tables to sync. You can enable or disable syncing for individual tables at any time through the [Dashboard](https://dashboard.stripe.com/data-management/pipelines).

## Next steps 

[Configure Postgres for real-time sync](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres/configure.md) to prepare your database and connect it to Stripe.
