Getting started
Run the Stripe migration local runner and keep live Stripe keys on your machine.
The current MVP is a local runner. It writes migration artifacts under STRIPE_MIGRATION_ARTIFACT_DIR and keeps Stripe keys local.
Install
pnpm install
cp .env.example .env.stripe-migration.localSet the Stripe keys:
STRIPE_SOURCE_SECRET_KEY=rk_test_...
STRIPE_DESTINATION_SECRET_KEY=sk_test_...
MIGRATION_MIN_START_BUFFER_HOURS=48Prefer a restricted/read-only source key for inventory. The source key only needs write access for the final source cancel apply step.
Dry-run flow
pnpm stripe-migrate inventory source
pnpm stripe-migrate plan
pnpm stripe-migrate preflight destination
pnpm stripe-migrate catalog plan
pnpm stripe-migrate customers copy-csv
pnpm stripe-migrate customers verify
pnpm stripe-migrate tax preview
pnpm stripe-migrate subscriptions toolkit-csv
pnpm stripe-migrate subscriptions schedule planCustomer copy
The runner generates a Stripe customer-copy CSV for automatic candidates:
stripe-migration-artifacts/customers/customers-to-copy.auto.csvRun Stripe's customer copy flow in the Dashboard or through Stripe Support. After the copy is complete, verify the destination customers:
pnpm stripe-migrate customers verifyApply destination writes
Only run apply commands after reviewing dry-run artifacts:
CREATE_DESTINATION_CATALOG=yes pnpm stripe-migrate catalog apply
EXECUTE_SUBSCRIPTION_SCHEDULES=yes pnpm stripe-migrate subscriptions schedule apply
pnpm stripe-migrate subscriptions verifyCancel source subscriptions
Source cancellation is blocked unless destination schedule verification is clean.
pnpm stripe-migrate source cancel plan
CANCEL_SOURCE_SUBSCRIPTIONS=yes pnpm stripe-migrate source cancel apply
pnpm stripe-migrate packet generateThe final packet is written to:
stripe-migration-artifacts/packet/final-stripe-migration-packet.md