---
updatedAt: 2026-10-12T23:50:33.000Z
agentTools:
  siteIndex: https://merchants.westpac.com.au/llms.txt
  projectIndex: https://merchants.westpac.com.au/onlinepay/llms.txt
---

# Authentication and environment variables

## Overview

This section provides information about how to create an API key, set up your environment variables, and use them in your <Glossary>API</Glossary> requests, as well as information about the authentication method used by the OnlinePay API.

## Authentication

OnlinePay's API uses the Basic authentication method to secure REST API requests. Basic authentication sends HTTPS requests with an `Authorization` header containing Base64-encoded strings as a username and password.

These encoded keys are passed in the API request header in the following format:

`Authorization: Basic dXNlcjEyMzphYmM0NTY=`

Where `dXNlcjEyMzphYmM0NTY=` is the Base64-encoded string of your User ID and API Key in the following format: `user-uid:api-key`.

> ℹ️
>
> Replace the `{user-uid}` and `{api-key}` values with your own keys.

## Environment variables

| Variable                       |                                          |
| ------------------------------ | ---------------------------------------- |
| **Base URL**                   | `https://au.gsc.verifone.cloud/`         |
| **API Key**                    | [Create an API Key](https://merchants.westpac.com.au/onlinepay/docs/api-key)         |
| **User ID**                    | [Retrieve your User ID](https://merchants.westpac.com.au/onlinepay/docs/user-id)     |
| **Payment Provider Contracts** | [Payment Provider Contracts](https://merchants.westpac.com.au/onlinepay/docs/ppc-id) |
| **3DS Contract**               | [3DS Contract](https://merchants.westpac.com.au/onlinepay/docs/3ds-id)               |
| **Entity ID**                  | [Entity ID](https://merchants.westpac.com.au/onlinepay/docs/org-id)                  |