Stripe

Connect & Ingest data from Stripe

Stripe is a payment processing platform that powers online commerce for businesses of all sizes. The Sling Stripe connector extracts data from the Stripe REST API, supporting charges, customers, invoices, subscriptions, payments, and more.

Setup

The following credentials and inputs are accepted:

Secrets:

  • api_key (required) -> Your Stripe Secret API Key

  • api_version (optional) -> Stripe API version to use (default: 2023-10-16)

Inputs:

  • anchor_date (optional) -> The starting date for historical data extraction (default: 1 year ago). Format: YYYY-MM-DD

Getting Your API Key

  1. Log in to your Stripe Dashboard

  2. Go to Developers > API keys

  3. Copy your Secret key (starts with sk_live_ for production or sk_test_ for test mode)

Using sling conns

Here are examples of setting a connection named STRIPE. We must provide the type=api property:

sling conns set STRIPE type=api spec=stripe secrets='{ api_key: sk_live_xxxxxxxxxxxx }'

Environment Variable

export STRIPE='{ type: api, spec: stripe, secrets: { api_key: "sk_live_xxxxxxxxxxxx" } }'

Sling Env File YAML

See here to learn more about the sling env.yaml file.

connections:
  STRIPE:
    type: api
    spec: stripe
    secrets:
      api_key: "sk_live_xxxxxxxxxxxx"

With anchor date for historical data:

connections:
  STRIPE:
    type: api
    spec: stripe
    secrets:
      api_key: "sk_live_xxxxxxxxxxxx"
    inputs:
      anchor_date: "2020-01-01"

Replication

Here's an example replication configuration to sync Stripe data to a PostgreSQL database:

source: STRIPE
target: MY_POSTGRES

defaults:
  mode: incremental
  object: stripe.{stream_table}

streams:
  # sync all endpoints
  '*':

  # Exclude child endpoints if not needed
  credit_note_line_item:
    disabled: true
  setup_attempt:
    disabled: true

Full refresh example for reference data:

source: STRIPE
target: MY_POSTGRES

defaults:
  mode: full-refresh
  object: stripe.{stream_table}

streams:
  # Reference data (no incremental support)
  account:
  plan:
  price:
  product:
  payment_method:

Endpoints

Core Payment Data

Endpoint
Description
Incremental

account

Stripe account information

No

charge

Payment charges

Yes

payment_intent

Payment intents

Yes

payment_method

Saved payment methods

No

payout

Payouts to bank accounts

Yes

refund

Refunds on charges

Yes

Customers & Subscriptions

Endpoint
Description
Incremental

customer

Customer records with discount info

Yes

customer_balance_transaction

Customer balance transactions

No (child)

subscription

Active and canceled subscriptions

Yes

subscription_item

Line items in subscriptions

No (child)

Billing & Invoicing

Endpoint
Description
Incremental

invoice

Invoices with discount info

Yes

invoice_item

Invoice line items

Yes

invoice_line_item

Detailed invoice lines

No (child)

credit_note

Credit notes

No

credit_note_line_item

Credit note line items

No (child, disabled)

coupon

Discount coupons

Yes

Products & Pricing

Endpoint
Description
Incremental

plan

Subscription plans (legacy)

No

price

Prices for products

No

product

Products in your catalog

No

Setup & Configuration

Endpoint
Description
Incremental

setup_intent

Setup intents for future payments

Yes

setup_attempt

Setup attempt details

No (child)

dispute

Issuing disputes

Yes

Events & Updates

Endpoint
Description
Incremental

event

Stripe events (30-day retention)

Yes

*_update

Update endpoints for merging changes

No

To discover available endpoints:

sling conns discover STRIPE

Incremental Sync

The Stripe connector uses time-based incremental sync with the created timestamp:

  • First run: Fetches all records from anchor_date (default: 1 year ago) to present

  • Subsequent runs: Only fetches records created after the last sync

Update Tracking via Events

Stripe doesn't support filtering by updated_at timestamps. Instead, the connector uses the Events API to track updates:

  1. The event endpoint fetches events from the last 30 days

  2. Events like customer.updated, invoice.updated, etc. are processed

  3. Updated records are pushed to *_update endpoints

  4. Post-hooks merge updates into the main tables

This ensures you capture both new records (via created filter) and updates (via Events API).

Stripe only retains events for 30 days. If you need to capture updates older than 30 days, run a full refresh periodically.

Date Fields

All Unix timestamp fields are automatically converted to proper datetime columns with a _date suffix:

Original Field
Converted Field

created

created_date

canceled_at

canceled_at_date

trial_start

trial_start_date

trial_end

trial_end_date

...

...

Rate Limiting

The Stripe API has rate limits:

  • Standard accounts: 100 requests per second (read operations)

  • Connect accounts: 25 requests per second

The connector automatically:

  • Uses conservative rate limiting (20 requests/second)

  • Retries with exponential backoff on 429 (rate limit) responses

Common Use Cases

Sync Core Payment Data

source: STRIPE
target: MY_POSTGRES

defaults:
  mode: incremental
  object: payments.{stream_table}

streams:
  charge:
  payment_intent:
  refund:
  payout:

Sync Customer & Subscription Data

source: STRIPE
target: MY_POSTGRES

defaults:
  mode: incremental
  object: subscriptions.{stream_table}

streams:
  customer:
  subscription:
  subscription_item:
  invoice:
  invoice_line_item:

Full Catalog Sync

source: STRIPE
target: MY_POSTGRES

defaults:
  mode: full-refresh
  object: catalog.{stream_table}

streams:
  product:
  price:
  plan:
  coupon:

If you are facing issues connecting, please reach out to us at [email protected], on discord or open a Github Issue here.

Last updated

Was this helpful?