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.

  1. Log in to your OnlinePay dashboard.

  2. Click your settings menu in the upper-right corner, then select API Keys.

  3. Click Create API key.

  4. Click Copy public key to copy the key to your clipboard.

  5. 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.



Terms and conditions Website requirements Other fees and charges

This information is a general statement for information purposes only and should only be used as a guide. While all care has been taken in preparation of this document, no member of the Westpac Group, nor any of their employees or directors gives any warranty of accuracy or reliability nor accepts any liability in any other way, including by reason of negligence for any errors or omissions contained herein, to the extent permitted by law. Unless otherwise specified, the products and services described are available only in Australia.

© Westpac Banking Corporation ABN 33 007 457 141 AFSL and Australian credit licence 233714.