Create an API key
Overview
Your API key is a unique identifier that is used to authenticate your requests to the OnlinePay API. It is created under your OnlinePay user profile and is used to identify the user making the API request and to ensure that the user has sufficient permissions to perform the requested action. The API key is also used to track API usage and monitor for any suspicious activity.
You can have up to five API keys. You can use the same API key for multiple requests, or you can create a new API key for each request.
When you make an API request, you must include your API key in the request header. The API key is used to authenticate your request and identify the merchant account that you are making the request for. If your API key is invalid or has been revoked, your request will fail.
When you create an API key, it is important to keep it secure and not share it with anyone else. If your API key is compromised, someone else could use it to make requests to the OnlinePay API on your behalf, which could lead to unauthorised access to your account or sensitive information.
Create an API key
To create an API key, your OnlinePay account must have at least one of the following roles:
- Merchant Admin
- Merchant External Partner
- Merchant Supervisor
- Merchant Cashier
Use the following procedure to create a new API key or copy one you've already created.
-
Log in to your OnlinePay dashboard.
-
Click your settings menu in the upper-right corner, then select API Keys.
-
Click Create API key.
-
Click Copy public key to copy the key to your clipboard.
-
Paste the API key into your preferred REST API client, such as Postman or Insomnia, or save it in a secure location for use when making requests using cURL.
When you close the API key window or click Discard, you will not be able to retrieve the key again.
Updated 6 days ago