Integrations

Stripe to Snowflake

Load Stripe charges, customers, invoices and subscriptions into Snowflake so finance and product can report on revenue next to the rest of your data.

StripeSourcesyncSnowflakeDestination

The pipeline as it appears on the Pipeloom canvas. You can add transforms or triggers on the same canvas later.

What to know about Stripe into Snowflake

Amounts are in the smallest currency unit

Stripe amounts, such as a charge's amount, are integers in the smallest unit of the currency, for example cents. Divide by 100 for currencies with two decimal places, and check Stripe's docs for zero-decimal currencies, before you report revenue.

Sync at least every 30 days

Incremental Stripe syncs read the Events API, which Stripe guarantees only for 30 days. If a sync gap exceeds that, changes in the gap are lost for streams that rely on events. Enable cursor-age validation for Charges, Invoices, Invoice Items, Payment Intents and Payouts so a stale stream falls back to a full refresh.

Pick the sync mode per stream

Customers, subscriptions and invoices change, so use Append + Deduped and the Snowflake table holds the current version of each. Balance transactions and events sync by creation date and never change, so plain append is right. Do not use Full Refresh | Overwrite on Events, because Stripe keeps only 30 days.

Deleted customers and products can be flagged

For customers, products, prices, plans, subscriptions, invoices and a few more streams, a record deleted in Stripe is marked is_deleted, so you can exclude it in Snowflake without losing history.

Example: gross charges per month in dollars

SELECT
  DATE_TRUNC('month', CREATED) AS month,
  SUM(AMOUNT) / 100 AS gross_usd
FROM STRIPE.CHARGES
WHERE CURRENCY = 'usd'
GROUP BY 1
ORDER BY 1;

Assumes a schema named STRIPE and USD charges. Stripe's connector pins API version 2022-11-15, so fields follow that version.

Set it up

  1. Create the Stripe sourceAuthenticate with A restricted Stripe API key with read access, plus your Stripe account ID. You need: Access to the Stripe account you want to replicate, and its account ID. A restricted API key created for Pipeloom with Read permissions only.
  2. Create the Snowflake destinationAuthenticate with Key pair (an RSA key of 2048 bits or more). You need: A Snowflake account and the ACCOUNTADMIN role for the one-time setup. A warehouse, database, user and role for Pipeloom, with a key pair attached to the user. Network policies that allow Pipeloom to connect.
  3. Connect them and pick streamsDraw the edge on the canvas and choose streams and sync modes. Stripe supports full refresh and incremental; Snowflake supports every mode: full refresh overwrite, overwrite deduped, append, incremental append and incremental append deduped.
  4. Run, then scheduleThe first sync loads each stream in full. Then set the schedule.

Step-by-step guides: Stripe and Snowflake.

What lands in Snowflake

  • A final table per stream with typed columns, plus _AIRBYTE_RAW_ID, _AIRBYTE_GENERATION_ID, _AIRBYTE_EXTRACTED_AT, _AIRBYTE_LOADED_AT and _AIRBYTE_META.
  • A raw table per stream in the airbyte_internal schema (or the internal dataset name you set), holding each record as JSON.

Type mapping

  • object → OBJECT
  • array → ARRAY
  • union and unknown → VARIANT
  • timestamp with time zone → TIMESTAMP_TZ
  • integer → NUMBER
  • number → FLOAT (or NUMBER(38,9))

When Stripe's schema changes

New columns are added and types changed as the source changes. A column removed at the source is kept, with its data, and new rows get NULL. Column names that are SQL reserved words get a leading underscore.

Streams you can sync

Includes Charges, Customers, Invoices, Subscriptions, Payment Intents, Payouts, Refunds, Balance Transactions and more. The full list is in the reference.

What it costs

A sync is metered at 1 credit per vCPU-minute, and a default sync uses 2.5 vCPUs. As an example, not a benchmark, a sync that takes 3 minutes uses 8 credits. Run 24 times a day, that is about 5,760 credits a month, more than Free's 1,500 but within Starter's 12,000 ($19 a month). Your own sync time decides the real figure, so try the calculator with your numbers.

Questions and fixes

Does the connector change Stripe's data types?

No. Stripe's API uses the same JSON types Pipeloom uses internally, so no conversion happens before Snowflake maps them to its own types.

Why must a Stripe sync run at least every 30 days?

Stripe's API cannot list objects changed since a point in time, so incremental syncs read the Events API, and Stripe guarantees events only for the last 30 days. A stream whose cursor is older than that cannot pick up changes older than 30 days. Streams listed in "Streams with API Data Retention Validation" fall back to a full refresh when their cursor is stale, which is recommended for Charges, Invoices, Invoice Items, Payment Intents and Payouts.

Why did my Events history shrink after a full refresh?

Stripe keeps events for 30 days. A Full Refresh | Overwrite sync of the Events stream replaces the destination table with just those 30 days, deleting older rows. Use an append mode for Events if you want to keep history.

Which Stripe streams sync by creation date rather than update date?

Balance Transactions, Customer Balance Transactions, Events, File Links, Files, Setup Attempts, Shipping Rates and Transfer Reversals are not covered by the Events API, so they sync by their created field. They are append-only in practice.

Why does the sync fail with "Current role does not have permissions on the target schema"?

The Pipeloom role is missing a grant on the schema it writes to. Re-run the role setup from the Snowflake guide, or grant the role usage and create-table rights on that schema.

Sync Stripe to Snowflake today

Free forever, no card. Starter is $19 a month for three seats.