How to revoke a leaked Stripe key

Updated 2026-08-04

If you think a key is exposed, revoke it. It takes about thirty seconds, breaks nothing for your customers, and regenerating is trivial. There is no reason to hesitate.

Revoking

  1. Open Developers → API keys.
  2. Find the key. This is where naming keys sensibly pays off.
  3. Click the menu.
  4. Choose Roll key or Delete key.

Roll generates a replacement immediately and lets you set a short expiry on the old one — use this if something in production depends on it, so you have a window to swap it over.

Delete kills it instantly. Use this if nothing legitimate is using it, or if you'd rather break a service than leave a window open.

What revoking does not do

It doesn't touch subscriptions, payments, customers or payouts. It doesn't notify anyone. It doesn't affect your account standing. It simply stops that credential from working.

Working out what was exposed

Developers → Logs shows every API request made with each key: timestamp, endpoint, IP address, response.

Filter by the affected key and look for:

If it was a restricted read-only key

The realistic exposure is disclosure: someone may have read your revenue, subscription and customer counts, and email addresses if you granted Customers read.

They could not refund, charge, cancel or move money. Unpleasant, not catastrophic. More on the threat model: is it safe to give an app your Stripe API key?

If it was a secret key

Different situation. A sk_live_ key can move money. In addition to revoking immediately:

  1. Check Payments for charges you don't recognise
  2. Check Refunds for refunds you didn't issue
  3. Check Payouts for changed bank details
  4. Check for new API keys created by the leaked key
  5. Contact Stripe support

Preventing the next one

A note on device-stored keys

If you use a tool that keeps keys on your phone rather than a server — as FRGMNT does — losing the device is the exposure event, not a vendor breach. Remote-wipe the device, and revoke the keys anyway. Belt and braces costs thirty seconds.

Frequently asked

Does revoking a Stripe API key affect my customers?

No. Revoking a key stops applications using that key from calling the API. Existing subscriptions, payments and customer data are untouched.

How do I know if a leaked key was used?

Stripe's Developers to Logs section shows every API request with its key, timestamp, IP and endpoint. Filter by the key to see exactly what was called.

Should I roll or delete the key?

Rolling generates a replacement and gives you a short expiry window on the old one, which is safer if the key is in production. Delete outright if nothing legitimate is using it.

Read next