API Key Management
API keys authenticate your applications when making requests to the Anton Payments API. You can create and manage API keys directly from the merchant portal. This article walks you through the process and covers best practices for keeping your keys secure.
Accessing API Key Settings
To manage your API keys:
Log in to the merchant portal at app.antonpayments.com.
Navigate to Settings > API Keys.
This page displays all your existing API keys, including their label, environment, creation date, and status.
Creating a New API Key
To create a new API key:
Click Create API Key.
Select the environment for the key:
Sandbox β For testing and development. Sandbox keys use the prefix
ak_test_and authenticate againstapi.antonpayments.dev.Production β For live payouts. Production keys use the prefix
ak_live_and authenticate againstapi.antonpayments.com.
Enter a label for the key. Use a descriptive name that identifies where or how the key will be used (e.g., "Backend Server", "Batch Processing Service").
Click Create.
Important: The full API key is displayed only once at the time of creation. Copy it immediately and store it in a secure location such as a secrets manager or encrypted vault. You will not be able to view the full key again after leaving this page.
Revoking an API Key
If a key is compromised, no longer needed, or you are rotating keys, you should revoke it:
Navigate to Settings > API Keys.
Find the key you want to revoke.
Click Revoke.
Confirm the revocation.
Revocation takes effect immediately. Any API requests made with the revoked key will be rejected with an authentication error. Make sure you have a replacement key in place before revoking a key that is actively in use.
Best Practices
Follow these guidelines to keep your API keys secure:
Store keys securely. Use a secrets manager, environment variables, or an encrypted vault. Never hardcode API keys in your source code.
Never share keys in plaintext. Do not send API keys via email, chat messages, or any unencrypted channel. If a key has been shared insecurely, revoke it and create a new one.
Use separate keys for separate services. If you have multiple applications or services that call the Anton API, create a dedicated key for each one. This way, if one key is compromised, you can revoke it without affecting other services.
Rotate keys periodically. Even if no compromise is suspected, rotating keys on a regular schedule reduces the window of exposure if a key is leaked without your knowledge.
Use sandbox keys for testing. Never use production keys in development or testing environments. Sandbox keys (
ak_test_) are isolated from live data and should always be used during development.Keep source code clean. Add API keys to your
.gitignoreor equivalent to prevent accidental commits. Use environment variables or a configuration management tool to inject keys at runtime.
Key Prefixes Reference
Prefix | Environment | API Base URL |
| Sandbox |
|
| Production |
|
