Environments & API keys
Understand test and production modes, key formats and how to switch safely.
10 min read
Wajub provides two isolated environments. They share the same base URL and the same API — only the key determines the environment used.
https://api.wajub.comTest (sandbox)
The test environment faithfully reproduces production without real fund movements. Use it to develop, test your webhooks and validate your integration.
- Keys:
pk_test.…(public) andsk_test.…(secret) - Mobile Money providers are simulated via test numbers.
- Test data is isolated and can be reset.
Production
The production environment handles real payments and real transfers.
- Keys:
pk.…(public) andsk.…(secret) - Requires a verified account (KYC) — see the Go-live checklist.
Which key to use?
Public key (pk.)client / serveroptionalInitializes payments. Can be exposed client-side.
Secret key (sk.)server onlyrequiredAuthorizes refunds, transfers and sensitive reads. Never expose publicly.
Restricted key (rk.)server onlyoptionalScoped to only the permissions it was granted — use for least-privilege integrations.
Never commit your secret keys
Store sk.… in environment variables or a secrets manager. If a key
leaks, revoke it immediately from Developers → API Keys in the Dashboard.
Recommended environment variables
# Test
WAJUB_PUBLIC_KEY=pk_test.8f2b91c4d7e6a0f3
WAJUB_SECRET_KEY=sk_test.2a7c5e91b0d34f68
# Production (inject via your secrets manager)
# WAJUB_PUBLIC_KEY=pk.xxxxxxxxxxxxxxxx
# WAJUB_SECRET_KEY=sk.xxxxxxxxxxxxxxxxGoing to production
- Complete your business verification in the Dashboard.
- Replace your
pk_test.…/sk_test.…keys withpk.…/sk.…keys. - Point your webhook endpoints to their production URLs.
- Run the Go-live checklist.