Authentication
The Merchant API is backend-only. Call it only from trusted server-side systems, and never expose your credentials in browser code, frontend bundles, or client-side storage.
Authentication model
Every Merchant API request carries two things:
- an
Api-Keyheader with your API key - HTTP Basic authentication: an
Authorizationheader holding the wordBasic, a space, then your base64-encodedusername:password
Keep credentials on the backend
Never expose your credentials in browser JavaScript, frontend env files, mobile app bundles, client-side storage, screenshots, or logs a user could see. The safe pattern:
- The frontend calls your backend.
- Your backend authenticates to the Merchant API.
- Your backend returns only the minimum data the frontend needs.
This applies to Hosted Payment too. Even though the frontend launches the modal, your backend still generates the fingerprint, holds the credentials, and validates the result. The browser only ever sees launch-safe values.
Environment separation
Merchant API requests go to https://{subdomain}.{brand domain}.
| Subdomain | Environment |
|---|---|
api | Production |
apiuat | UAT |
api.sandbox | Sandbox |
The brand domain depends on your brand: travelpay.com.au, b2bpay.com.au, childcareeasypay.com.au, schooleasypay.com.au, rentalrewards.com.au, zenpay.com.au or thoroughbredpayments.com.au.
Don't mix test, UAT, and production credentials. Configure base URLs, API keys, usernames/passwords, merchant codes, and callback URLs per environment, and store all of it in environment variables or a secret manager rather than in source control.
Operational hygiene
- Limit who can access production credentials.
- Rotate credentials through a controlled process.
- Redact sensitive values in logs and support tooling.