Authentication
API keys
All payment endpoints use an x-api-key header. You get two keys from your dashboard:
Never put your API key in frontend JavaScript, mobile app source code, public repositories, or logs. Always call the Stakaba API from your server.
Getting your API key
- Sign in to app.stakaba.com
- Go to Settings → API Keys
- Copy your sandbox key to start testing
- After go-live approval, your live key will be available in the same place
Rotating keys
If a key is compromised, rotate it immediately:
This invalidates the old key and issues a new one instantly.
Sandbox vs live
The same API handles both. The key you send determines which mode runs:
- Sandbox key → simulated payments, no charges to anyone
- Live key → real money moves, requires an approved merchant account
Test thoroughly in sandbox before switching to live.
