Get started
Authentication
Every request is authenticated with a secret key in the Authorization header. The key decides whether the request is live or test.
Authorization: Bearer sk_live_...Live and test keys
| Key | What it does |
|---|---|
sk_test_… | Creates test payments. No money moves, nothing reaches a bank, and webhooks go to your test webhook URL. |
sk_live_… | Creates real payments that credit your business wallet. Works once live payments are enabled for your business. |
Live and test data are fully separate. A test key can never see live payments, and the other way round. The base URL is the same for both:
https://api.kepperhq.com/v2/gatewayCreating and managing keys
- Create keys in the dashboard at dashboard.kepperhq.com, under API keys. Your transaction PIN is required.
- A key is shown once. We store only a one-way hash of it, so we can never show it again or recover it.
- You can have up to two active keys per mode. Use this to rotate a key without downtime: create a new key, deploy it, then revoke the old one.
- Revoking a key takes effect immediately.
Restrict a key to your servers' IP addresses
When you create a key, you can list the IP addresses allowed to use it. Requests from any other address are refused with403, even if they have the correct key. We strongly recommend this for live keys.
Keep your keys secret
Secret keys are for servers only
Never put a secret key in a website, mobile app, public repository or support ticket. We refuse requests that come from a browser (any request with an Origin header). If you think a key has leaked, revoke it in the dashboard straight away and create a new one.
- Keep keys in environment variables or a secrets manager, never in source code.
- Give each environment its own key, so you can revoke one without affecting the others.
- Rotate live keys regularly and whenever someone with access leaves your team.
Authentication errors
| Status | Meaning |
|---|---|
| 401 | The key is missing, malformed, revoked or unknown. |
| 403 | Live payments aren't enabled yet, your IP isn't allowed for this key, the request came from a browser, or your business account is awaiting approval. |