Paystack Test Keys, Live Keys, and Webhooks
Our API Keys & Webhooks page is where you can access your API keys (both test and live) and set Webhooks for your integration.
To access this page Go to your Dashboard >> Settings >> API Keys & Webhooks
When you sign up on Paystack, we encourage you to test out our platform, so you can fully understand the payment flow before activating your account. This is why we have the Test Mode available. In Test Mode, you can carry out transactions using a dummy/test card that is provided on the test payment page.
What API Keys are, and how to use them
APIs make it possible for programs to communicate and share data with each other efficiently. In our case, Paystack's APIs allows your website to communicate and share data with Paystack's server.
Because APIs allow our server share data with your website when you make a request, we need to be able to confirm that you are the one making the request through your website. This is where API Keys come into play. When your website sends or requests data from Paystack servers, it needs to send them along with the API Keys from your Dashboard, else the request will be denied.
How to get your Test Keys
In order to get your Test Keys, ensure that your Dashboard is in Test Mode, and go to the API Keys & Webhooks tab on the Setting page.
To verify that you are in Test Mode, ensure that the toggle button at the top of the screen is set to "Test Mode" as shown in the image below.
After you're done testing and are satisfied with your integration, you'll need your Live API Keys to be able to receive real money from your customers.
How To Get Your Live Keys
To get your live keys, you need to toggle to 'Live Mode'. As shown in the image below, you'll be able to access both your live and test API keys, as well as provide your live callback and Webhook URLs.
NB: You can only toggle to "Live Mode" if your account has been activated. Please follow this link to learn more about how to activate your Paystack account.
What is a callback URL?
The callback URL is a web address of where you want your customers to be redirected to after a successful payment is made.
What are webhooks URL?
A Webhook is a link on your server to which Paystack sends information for successful transactions that goes through your account. This is important in cases where, for example, a customer doesn't get redirected to your callback URL after a successful transaction. In this case, our server sends your webhook URL a notification so you can provide value.