1. Documentation
  2. Get Help
  3. Troubleshooting

How to Reset API Keys in WooCommerce

What are APIs? ↑ Back to top

APIs allow two separate services to connect and communicate. For example, WooCommerce can communicate with the Stripe API so that payments on a WooCommerce store can be processed via Stripe. Once that has been done, Stripe can communicate to WooCommerce that the order has been paid for. 

In order to do this safely and uniquely, these API communications are protected with keys: unique identifiers to make sure that the accounts on both sides of the communication are owned by the same people. 

The keys can be added in two ways:

  • External: The API keys are generated by a 3rd party and used on the WooCommerce store to establish the connection. The majority of payment gateways are examples of this. 
  • Internal: The API keys are generated in the WooCommerce store and then saved on the 3rd party service. 

API keys give a lot of power. If you suspect that anyone else has had access to them, update them immediately. Below, we will give a few examples of how to do this.

While you are resetting the API keys, this connection will not be functioning until you’ve reconnected the service. For example, if you reset your payment gateway API keys, you will not be able to receive payments while you are in the process of updating the keys.

How to Reset Payment Gateways API Keys ↑ Back to top

With most of the payment gateways offered via WooCommerce.com, the API keys are generated automatically once you connect your store. In most cases, disconnecting and reconnecting your store to the provider will reset the API keys. 

Here are a few examples of some of our bigger payment gateways. 

How to reset API Keys for Stripe ↑ Back to top

  • In your WooCommerce store, go to: WP Admin > WooCommerce > Settings > Payments > Stripe
  • There, select “Clear all Stripe account keys.”
  • The next step is revoking the API keys on the Stripe side:
    • If your Stripe account was connected automatically (via OAuth), WooCommerce will be listed as an authorized application
      • Go to: The applications list in the Stripe dashboard
      • There, next to “WooCommerce Services”, select “Revoke access”
    • If your Stripe account was connected via copy/pasting API keys, access is revoked by rolling the key:
      • Go to: API Keys in the Stripe dashboard
      • Next to “Secret Key”, select the ellipsis icon (...) > Roll Key…
      • Fill in the details
      • Select “Roll API key”
  • Then, back in the WooCommerce Stripe settings, select “Setup or link an existing Stripe account.”
    • Alternatively, paste the API keys from the Stripe dashboard here into the “Live Publishable Key” and “Live Secret Key” fields shown above, and “Save changes”.

How to reset API Keys for PayPal Payments ↑ Back to top

  • In your WooCommerce store, go to: WP Admin > WooCommerce > Settings > Payments > PayPal
  • There, take note of the client ID (to later double check that the keys have been updated)
  • Then, select “Disconnect”
  • Finally, select “Connect to PayPal” and go through the process of connecting your account

Double-check that the new client ID is different from the one you used to have. This is an indication that your API keys have indeed been reset. 

How to Reset WooCommerce REST API Keys ↑ Back to top

Resetting the WooCommerce REST API keys is done in a different section. Note that once you’ve reset the keys you will need to update those keys in the service that you’ve connected them with. 

  • Go to: WP Admin > WooCommerce > Settings > Advanced > Rest API
  • There, select “Revoke key”
  • Now, select “Add Key” and reconnect your 3rd party service with the new keys you’ve generated

Questions and Support

Do you still have questions and need assistance? 

WooCommerce - the most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment