Overview
Superbank uses API key authentication to secure all API requests. Every request must include your API key in theX-Api-Key header.
Getting Your API Key
- Log in to the Superbank Dashboard
- Navigate to API Keys
- Click Create API Key
- Copy and securely store your API key
Using Your API Key
Include theX-Api-Key header in every API request:
API Key Types
| Type | Environment | Purpose |
|---|---|---|
| Sandbox | api-sandbox.superbank.com | Development and testing |
| Production | api.superbank.com | Live transactions |
Sandbox keys cannot access Production, and vice versa.
Security Best Practices
Do
- Store API keys in environment variables or secure vaults
- Use different keys for each environment
- Rotate keys regularly
- Restrict key access to authorized personnel only
Don’t
- Commit API keys to version control
- Share keys via email or chat
- Use production keys in development
- Expose keys in client-side code
Environment Variables
Store your API key securely:.env
Handling Authentication Errors
If authentication fails, the API returns a401 Unauthorized response:
- Missing
X-Api-Keyheader - Invalid or revoked API key
- Using the wrong key for the environment