API Keys Management
API Keys serve as the primary authentication identity when your application calls the Gerbang Pay endpoints. These keys must be kept confidential and stored only on your server (backend).
Generate a New API Key
To create a new API Key:
- Navigate to Settings > API Keys.
- Click the Generate New Key button.
- Select the Environment:
- Live: For real transactions. Generates a key starting with
gp_live_... - Test: For simulation/sandbox. Generates a key starting with
gp_test_...
- Live: For real transactions. Generates a key starting with
- Provide a label name (e.g., "Production Server 1") so you can easily identify it later.
- Click Create.
WARNING
The API key will only be displayed once after it is successfully created. Immediately copy and store it in your secrets manager (e.g., .env). If you lose it, you must revoke it and create a new key.

Revoke API Key
If you suspect your API key has been compromised, you should immediately revoke it:
- In the API Keys list, find the compromised key.
- Click the Revoke button.
- Applications using that key will be instantly rejected (Receiving a
401 UnauthorizedHTTP error).