After moving Stripe subscriptions: update API keys, webhooks and price IDs
Moving the subscriptions is half the job. Your app still holds the old account’s keys, its price IDs and its webhook secret. Miss one and new customers land on the old account, or the new one sends events nobody listens to.
API keys
Every key belongs to one account. Create new keys on the new account, with the narrowest permissions your app needs (restricted keys), and store them where the old ones were. The publishable key in your front end changes too.
If parts of your app run on a schedule or in workers, list every place a key lives: environment variables, CI secrets, serverless functions, third-party tools (analytics, accounting, CRM) connected to Stripe.
Webhooks
- Create the same endpoints on the new account, with the same events. Each endpoint gets a new signing secret: your app must verify events with it.
- During the move both accounts send events. Make your handler accept both secrets for a while, or run one endpoint per account.
- Recreating subscriptions sends
customer.subscription.createdevents. Make sure your app doesn’t treat them as new signups (welcome emails, sales notifications, analytics). - Stopping the old renewals sends
customer.subscription.updatedand, at period end,customer.subscription.deletedfrom the old account. Don’t revoke access because of them.
The last two points matter most: a migration should be invisible to customers, and your own automations are the most likely thing to make it visible.
Price IDs
Price IDs are new on the new account. Wherever your code or config references a price (plan tables, feature flags, “if price is X then plan is Pro”), use a mapping from old to new, or better, look prices up by a lookup_key that you set to the same value on both accounts. Then the switch is a key change, not a code change.
Stored subscription IDs
Customer IDs stay the same in a Stripe-to-Stripe copy, but subscription IDs don’t. If your database stores a subscription ID per user, update it to the new one. Putting the old ID in the new subscription’s metadata (Submoving does this) makes the mapping easy to rebuild: list the new subscriptions and read their metadata.
Checkout, Payment Links and the customer portal
- Checkout: new sessions must be created with the new keys and new price IDs.
- Payment Links are tied to the account that made them: create new ones, replace them on your site and in your emails, and deactivate the old ones.
- Customer portal: its settings are per account. Configure it on the new account (which plans can be switched to, cancellation, invoice history). Customers can only see invoices of the account the portal belongs to.
- Branding, receipts and the statement descriptor are set per account too.
In what order
- Before: new account configured (webhooks, portal, branding, tax), price mapping ready, code able to read both accounts.
- At the switch: subscriptions recreated and checked, then the new keys, webhook secret and price IDs deployed together, and stored subscription IDs updated.
- Right after: old Payment Links deactivated, old renewals stopped before the first renewal date.
- Later: old webhooks removed and old keys rolled, once nothing uses them.
Frequently asked questions
Do I need new Stripe API keys after a migration?
Yes. API keys belong to one account. Your app needs the new account’s secret and publishable keys, and a new signing secret for each webhook endpoint.
Do price IDs stay the same on a new Stripe account?
No. Prices are recreated and get new IDs. Use a mapping, or set the same lookup_key on both accounts and look prices up by it.
Will recreating subscriptions trigger my webhooks?
Yes, the new account sends subscription created events. Make sure your app doesn’t treat them as new signups.
More questions about Stripe migrations
- Move Stripe subscriptions to a new account without double charging anyone
- Stripe subscriptions and a new company: what to do when your business changes entity
- Can Stripe copy customers and cards to another Stripe account?
- Moving Stripe subscriptions with coupons, trials and discounts
- How much does it cost to migrate Stripe subscriptions?
- Can you change the country of a Stripe account?
- Stripe’s Billing migration toolkit vs a migration tool
- How to verify Stripe MRR before buying a SaaS
- Stripe subscription migration checklist
- What to tell customers when you switch Stripe accounts
See what would move and the MRR it carries. Read-only, nothing is written.