Stripe
Stripe batch source. Extracts payment objects (charges, customers, subscriptions, invoices, balance transactions) in async, sync, or sync-incremental loading modes.
Stripe is a financial-infrastructure platform for online payments, subscriptions, billing, and marketplaces. Nilus uses Stripe as a batch source to extract charges, customers, subscriptions, invoices, balance transactions, and other Stripe objects into a downstream warehouse for finance and revenue reporting.
Under the hood, Nilus calls the Stripe API using a secret or restricted key. Each Stripe object is selectable through source_table. A loading-mode suffix on source_table (:sync, :sync:incremental) controls how the data is fetched.
Requirements
Connectivity and credentials must both be in place before the pipeline can run.
Connectivity
The Nilus runtime must be able to reach
https://api.stripe.comover HTTPS.Use
sk_test_...against test data andsk_live_...against production. Switching between modes requires a different key.Restricted keys must include read permission on every object in
source_table(e.g.Charges read,Customers read).
Required parameters
api_key
Yes
-
Stripe secret or restricted key (sk_live_... or sk_test_...). Restricted keys are recommended; grant only the read permissions you need.
URI format
stripe://?api_key=<stripe-api-key>Supported objects
charge
id
merge
Payment charges.
payment_intent
id
merge
Payment intents.
payment_method
id
merge
Saved payment methods.
refund
id
merge
Refunds.
payout
id
merge
Payouts to bank accounts.
customer
id
merge
Customer records.
subscription
id
merge
Customer subscriptions.
subscription_item
id
merge
Individual subscription items.
subscription_schedule
id
merge
Scheduled subscription updates.
product
id
merge
Product catalog.
price
id
merge
Product prices.
coupon
id
replace
Coupons.
promotion_code
id
merge
Promotion codes.
invoice
id
merge
Customer invoices.
invoice_item
id
merge
Invoice line items.
credit_note
id
merge
Credit notes.
tax_rate
id
replace
Tax rates.
balance_transaction
id
merge
Balance transaction history.
event
id
append
Event stream (account-level events).
setup_intent
id
merge
Setup intents for future payments.
webhook_endpoint
id
replace
Configured webhook endpoints.
Loading modes
Stripe objects can be loaded in three modes by appending a suffix to source_table:
Async (default)
<object>
Initial loads and large datasets. Full load, parallel and fast; record order is not guaranteed. Replaces the destination table.
Sync
<object>:sync
Smaller datasets that benefit from ordered, sequential loading. Full load; replaces the destination table.
Sync incremental
<object>:sync:incremental
Subsequent runs after an initial load. Fetches only records created since the last run, using Stripe's created field, and merges on id. The first run starts from interval_start, or 2010-01-01 if it is not set.
Example:
Output schema
Nilus pins Stripe API version 2022-11-15. There is no fixed schema in Nilus for charge or any other Stripe object. Columns are created from fields in the API objects Stripe returns for your account. The exact charge column list follows the Stripe Charge object for that API version and your account data.
At the default max_table_nesting value of "0":
Top-level scalar fields land as columns.
Nested objects and arrays land as one
jsoncolumn each. Setsource.options.max_table_nestingorMAX_TABLE_NESTINGto flatten them.Fields that are null in every row may not create columns until a non-null value arrives.
The same rules apply to every Stripe object in the supported objects table.
Typical charge columns at the default nesting level are not exhaustive:
id
text
Merge key.
amount
bigint
Amount in the smallest currency unit.
currency
text
status
text
created
bigint
Unix timestamp. :sync:incremental uses this field.
billing_details
json
outcome
json
payment_method_details
json
metadata
json
refunds
json
Schema changes
Nilus does not enforce a schema contract on Stripe data:
A new Stripe field adds a nullable column.
If a field type changes, Nilus keeps the existing column and adds a variant column for the new type, such as
amount__v_text.Columns are never dropped, even if Stripe stops returning the field.
Source options
incremental_key
No
Not supported. Nilus rejects it for Stripe; use the :sync:incremental suffix instead.
max_table_nesting
No
String. Default "0": nested Stripe objects land as json columns. Raise to flatten. Also accepted as MAX_TABLE_NESTING.
Sink options
dest_table
Yes
Destination table name. Use one stable target per source resource so re-runs merge cleanly.
incremental_strategy
Yes
Destination write behavior. Use merge for time-aware resources, replace for snapshot-style resources.
Sample Nilus config
Behavior and capabilities
Pipeline type: Stripe runs as a
batchsource.Object selection: set
source.options.source_tableto one object from the supported objects table. Use one pipeline or destination table per Stripe object.Fetch semantics: async mode is the default for initial loads and large datasets. Use
:sync:incrementalafter the initial load when the object supports created-time incremental fetching.API limits: Stripe applies per-account rate limits. Stagger high-volume objects and avoid running many object pipelines at the same time.
Destination strategy: use
mergefor objects with stable IDs and change history,replacefor snapshot-style objects, andappendfor account-level events.
Troubleshooting
401 Invalid API Key
Wrong key prefix (test vs live) or revoked.
Issue a new key in Stripe Dashboard → Developers → API keys and re-supply via Nilus secrets.
403 Forbidden
Restricted key missing the required read permission for the requested object.
Edit the restricted key permissions in Stripe Dashboard or use a secret key.
No such resource
Object name does not match Stripe's resource (e.g. charges instead of charge).
Use singular names from the Supported objects table above.
Re-runs reload all data
Loading mode is async (default).
Switch to <object>:sync:incremental once initial load completes.
Rate-limited (429)
Per-account rate limit exceeded.
Switch to async mode for large reads, or stagger schedules across objects.
Related docs
Last updated
Was this helpful?