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.
CLI Pro Required: APIs require a CLI Pro token or Platform Plan.
Setup
The following credentials and inputs are accepted:
Secrets:
api_key(required) -> Your Stripe Secret API Keyapi_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
Log in to your Stripe Dashboard
Go to Developers > API keys
Copy your Secret key (starts with
sk_live_for production orsk_test_for test mode)
Important: Use your Secret key, not the Publishable key. The Secret key has read access to your Stripe data.
Using sling conns
sling connsHere 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: trueFull 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
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
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
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
plan
Subscription plans (legacy)
No
price
Prices for products
No
product
Products in your catalog
No
Setup & Configuration
setup_intent
Setup intents for future payments
Yes
setup_attempt
Setup attempt details
No (child)
dispute
Issuing disputes
Yes
Events & Updates
event
Stripe events (30-day retention)
Yes
*_update
Update endpoints for merging changes
No
To discover available endpoints:
sling conns discover STRIPEIncremental 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 presentSubsequent 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:
The
eventendpoint fetches events from the last 30 daysEvents like
customer.updated,invoice.updated, etc. are processedUpdated records are pushed to
*_updateendpointsPost-hooks merge updates into the main tables
This ensures you capture both new records (via created filter) and updates (via Events API).
Date Fields
All Unix timestamp fields are automatically converted to proper datetime columns with a _date suffix:
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?