@tonyxiao/stripe-sync-engine
v0.1.2
Published
DEPRECATED - This package has moved to https://github.com/stripe/sync-engine
Maintainers
Readme
Stripe Sync Engine
Sync Stripe data into PostgreSQL from the command line.
Install
npm install @stripe/sync-engine stripe
# or
pnpm add @stripe/sync-engine stripe
# or
yarn add @stripe/sync-engine stripeRun Sync (CLI)
Set environment variables:
export STRIPE_API_KEY=sk_live_xxx
export DATABASE_URL=postgres://...Then run either command:
# 1) Sync everything
npx @stripe/sync-engine sync \
--stripe-key $STRIPE_API_KEY \
--database-url $DATABASE_URL
# 2) Sync one object type
npx @stripe/sync-engine sync customer \
--stripe-key $STRIPE_API_KEY \
--database-url $DATABASE_URLNote:
syncautomatically applies any pending database migrations before syncing data.
Supported Objects
allchargecheckout_sessionscredit_notecustomercustomer_with_entitlementsdisputeearly_fraud_warninginvoicepayment_intentpayment_methodplanpriceproductrefundsetup_intentsubscriptionsubscription_schedulestax_id
License
See LICENSE file.
Contributing
Issues and pull requests are welcome at https://github.com/stripe-experiments/sync-engine.
