Short answer
Open the API keys page in the Dashboard and get the current key. In live mode Stripe shows a secret or restricted key only once, so if nobody saved it, rotate or create a new one. Then replace the old key in every place that sends it: the server environment, background jobs, webhook handlers and any no-code tools. Redeploy so the new value loads. If the code is platform_api_key_expired, see the Connect platform cause below.
Rather not fix it yourself? Stripe Billing Fix and Setup handles it at a fixed price, agreed before work starts.
Why the key expired, and the fix
01
Someone expired the key
“If you expire a secret API key or a restricted API key, you must create a new one and update any code that uses the expired key.” Stripe, API keys (Expire an API key)
An expired secret or restricted key stops working, and only a new key fixes it. Create one with the same permissions and swap it in.
02
The key was rotated and the grace period ended
“When you rotate a key in the Dashboard, both the old and new keys work for up to 7 days.” Stripe, API keys (Rotate safely to avoid downtime)
Rotating a key gives you up to 7 days in which both keys work, or none if Now was chosen as the expiration. A server still on the old key fails once that time is up. Search every environment for the old key before the window ends.
03
One place still has the old key
“The API key provided has expired. Obtain your current API keys from the Dashboard and update your integration to use them.” Stripe, Error codes (api_key_expired)
The site works, but a cron job, a second server or an automation tool fails. Each of them reads its own copy of the key, so update each one and restart it.
04
A Connect platform key changed
“This occurs if your platform has either generated a new key or the connected account has been disconnected from the platform.” Stripe, Error codes (platform_api_key_expired)
Also check: platform_api_key_expired means the platform you connect through made a new key, or your account was disconnected from it. Get the current key, or reconnect the account.
Checked against the vendor’s docs on : Stripe docs: Error codes; Stripe docs: API keys.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- $950Stripe Billing Fix and SetupSubscriptions, webhooks, customer portal and failed payments set up or fixed, tested in Stripe test mode.See scope and start
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Working with Simon makes everything run so smoothly and better than I could ask for it. Amazingly communicative, extremely knowledgeable of coding and the backend processes. I strongly recommend.”
Related: Stripe invalid API key provided · Stripe works in test mode, not live · Stripe webhook signature verification failed · Stripe Checkout Session expired