Stripe API requests are authenticated by your account’s API keys. They must be included when making an API request, otherwise, your request could not be completed. Every Stripe account has separate keys for testing and for running live transactions.
There are two types of API keys: publishable and secret. Each and every account has four keys; a publishable and secret key pair for live and test modes.
Find your API keys in your Stripe account’s dashboard. In case you cannot see them, you probably don’t have access to them. In such a case, make sure to contact the account’s owner to obtain an administrator or developer role to gain access. Once you have proper access, follow the next steps:
Find a short video below on how to obtain your test and live API keys: https://www.youtube.com/watch?v=UxpgwkiA5OM&ab_channel=KorinIverson
Both modes function quite similarly, with a couple of differences.
Your secret API key can be used for API calls such as charging or refunding; therefore, it should be kept in a safe digital environment. Think of them as passwords. Make sure to make a note on your Dashboard regarding where you copied the given secret API key. In case your secret API key is compromised, you have the option to “roll the key”, in other words, to block it and generate a new one.
As your secret API keys can be used for any kind of API request without limitation, you might want to add another layer of security to keep them safe. You can create restricted API keys that enable you to limit access and permissions to them. If you choose to create a restricted key, the level of access will go down to a minimum which is essential for the service but without giving out additional account data that it doesn’t need to operate efficiently. Restricted keys are available to reduce the risks when building or using microservices and they can be revoked any time if not needed anymore. However, they cannot be used for the development of your Stripe integration. During development, use your test API keys, and once the integration is live, use your live API keys.
Here you can find a detailed tutorial on how to run a test transaction.
Setting up your test transaction:
You can run a test transaction if you have a payment, subscription or donation form that is already created and published.
Still having trouble? Check out this short video on how to complete a test transaction: https://www.youtube.com/watch?v=zRNn5XwOze8&ab_channel=KorinIverson
Stay on top of the latest news about WP Full Stripe