Getting started
Authentication
PaySwitch uses API keys in the api-key HTTP header for merchant server requests.
Secret API key
- Used for server-to-server calls (
POST /payments,POST /refunds, etc.). - Environment-specific prefix (
snd_for test,prod_for live). - Created in Dashboard → Developers → API Keys.
Code
Never embed the secret API key in frontend code, mobile apps, or public repositories.
Publishable key
- Used by the Web SDK / client-side integration.
- Safe to expose in the browser.
- Passed when initializing the checkout widget.
Admin API key
Some account-management operations require an admin API key configured on the PaySwitch router deployment. This key is not generated from the merchant Dashboard. Contact your platform operator if you need admin-level API access.
Errors
| HTTP code | Typical cause |
|---|---|
401 | Missing or invalid api-key |
403 | Valid key but insufficient scope for the resource |
Last modified on