Skip to content

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:

  1. Navigate to Settings > API Keys.
  2. Click the Generate New Key button.
  3. 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_...
  4. Provide a label name (e.g., "Production Server 1") so you can easily identify it later.
  5. 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.

Generate API Key Placeholder

Revoke API Key

If you suspect your API key has been compromised, you should immediately revoke it:

  1. In the API Keys list, find the compromised key.
  2. Click the Revoke button.
  3. Applications using that key will be instantly rejected (Receiving a 401 Unauthorized HTTP error).

Gerbang Pay API Documentation