Environments & Setup

Base hosts, environment variables, and sandbox credentials for both APIs
View as Markdown

Base Hosts

Each API is called against its own host. In this collection, both hosts are represented as environment variables rather than hardcoded URLs, so you can point them at sandbox or production without editing individual requests.

VariableUsed BySandbox/Staging Value
{{payments_api_host}}Payments APIapi-stg.epaygames.io
{{disbursement_api_host}}Disbursement APIdisbursement-api-stg.epaygames.io

All endpoint paths are appended to these hosts, e.g. in sandbox/staging:

https://api-stg.epaygames.io/v1/biller/token/create
https://disbursement-api-stg.epaygames.io/v1/auth/token

Production hosts aren’t published in this collection — use whatever host is assigned to you for production, and keep it separate from the sandbox/staging values above.

Token Environment Variables

Both APIs automatically populate an environment variable with the bearer token once you successfully authenticate, so you don’t need to manually copy/paste tokens between requests.

VariablePopulated ByUsed By
{{payments_api_token}}Payments API → Create TokenEvery other Payments API request (sent as Authorization: Bearer {{payments_api_token}})
{{token}}Disbursement API → Create Access TokenEvery other Disbursement API request

This is handled by a post-response script attached to each token endpoint: on a successful response, it reads data.token from the JSON body and saves it to the environment automatically.

Other Variables Used

VariableWhere It’s UsedPurpose
{{randomString}}Generate Transaction, Process DisbursementAuto-generates a unique reference_no for test requests

Sandbox/Staging Test Credentials

For trying out the Payments API in sandbox/staging, the collection ships with these test credentials:

FieldValue
Usernametest-merchant
Passwordp@ssw0rd01
Signature Key9XAgVZzU4WhqrXA6jEvMtkF85j8wKZZhQ5RE2hsDPwa5rjPT7RpCmJceu8jNt4Wy

The Disbursement API’s Create Access Token request also uses the same test-merchant / p@ssw0rd01 pair as its example body, so both APIs can be exercised end-to-end in sandbox with one set of credentials.

These are shared sandbox/staging credentials meant for trying out the collection. Use your own assigned production credentials before going live.

Minimum Setup Checklist

1

Set your hosts

Set payments_api_host and/or disbursement_api_host in your environment (sandbox or production, as assigned to you).

2

Authenticate

Call the relevant token endpoint (Create Token for Payments, Create Access Token for Disbursement).

3

Confirm the token was saved

Check payments_api_token / token — if the response contained an errors key instead of data, authentication failed and no token will be saved.

4

Call the functional endpoints

Every other endpoint expects the saved token in the Authorization header.