Requests to KulmiPay are authenticated with API keys. KulmiPay provides two key types:Documentation Index
Fetch the complete documentation index at: https://developers.kulmipay.com/llms.txt
Use this file to discover all available pages before exploring further.
- Public / publishable key: prefixed with
ISPubKey_ - Secret key: prefixed with
ISSecretKey_
test and must be used with sandbox endpoints. Live keys include live and must be used with live endpoints.
| Environment | Base URL | Public key prefix | Secret key prefix |
|---|---|---|---|
| Sandbox | https://sandbox.kulmipay.com | ISPubKey_test_ | ISSecretKey_test_ |
| Live | https://app.kulmipay.com | ISPubKey_live_ | ISSecretKey_live_ |
How to get API keys
Create or view your API keys in the KulmiPay dashboard under API Applications. Your public key is used for browser-safe checkout and collection flows. Your secret key is used for protected server-to-server operations such as wallets, disbursements, payment sessions, webhooks management, and other account-level API calls. Only generate and use a secret key when your integration needs backend access.Public key authentication
Use your public key for checkout flows and public collection requests. You can pass it in the request body:kulmipay browser SDK handles public key authentication for you:
Secret key authentication
Use your secret key for protected REST API requests. Send it in theAuthorization header with the Bearer prefix.
Secret keys do not require an OAuth token exchange. Use the key directly as the Bearer token.
init():
Choosing the right key
| Use case | Key to use | Where to use it |
|---|---|---|
Hosted checkout with kulmipay SDK | Public key | Browser |
| Create a checkout session directly | Public key | Browser or backend |
| Check or list account resources | Secret key | Backend only |
| Send money or approve payouts | Secret key | Backend only |
| Manage webhooks | Secret key | Backend only |
| Wallet operations | Secret key | Backend only |
Common authentication errors
| Status | Error | What to check |
|---|---|---|
401 Unauthorized | Invalid api token | The secret key is wrong, revoked, or not attached to an active account. |
401 Unauthorized | Invalid token for live environment | You used a sandbox key on the live API, or a live key on sandbox. |
401 Unauthorized | No credentials provided | The Authorization header is missing or incomplete. |
401 Unauthorized | Bearer string should not contain spaces | The Bearer token contains spaces or the header has too many parts. |
403 Forbidden | Account cannot transact | Your business account is not enabled for the requested operation. |
Keeping credentials secure
- Store secret keys in environment variables or a secrets manager.
- Do not commit
.envfiles or hard-code credentials. - Rotate keys immediately if they are exposed.
- Use HTTPS for all requests between your backend, frontend, and KulmiPay.
- Use sandbox keys while testing and live keys only after you are ready to process real payments.
Next steps
Client Libraries
Install and configure the browser checkout SDK or PHP SDK.
Sandbox
Test your integration with sandbox keys before going live.
