Sandbox Mode
Understand Wajub sandbox mode, get your test keys, and learn the differences from the production environment.
Sandbox mode lets you develop and test your integration in a secure environment, without any real money movement. The API, webhooks, and statuses are identical to production.
Get your test keys
1. Log in to the Wajub Dashboard
2. Go to Developers > API Keys
3. Enable "Test" mode at the top right
4. Copy your pk_test.… public key and sk_test.… secret keyYou automatically receive test keys upon account creation. No KYC verification is required to use the sandbox.
Multiple test keys
You can generate multiple test key pairs to isolate your environments (dev, staging, CI/CD). Manage them in Dashboard > Developers > API Keys.
Sandbox vs production differences
| Aspect | Sandbox (pk_test.…) | Production (pk.…) |
|---|---|---|
| Real debit | None | Effective debit on the customer's account |
| Settlements | Not executed | Real settlements per your contract |
| Test numbers | Work with dedicated prefixes | Rejected |
| Test cards | Accepted with standardized numbers | Rejected |
| Rate limiting | Same limits, tied to your plan (no sandbox relaxation) | Same limits, tied to your plan |
| Webhooks | Sent to endpoints created with a sk_test.… key; secret is prefixed whsec_test_; payload has "sandbox": true | Sent to endpoints created with a live key; secret is prefixed whsec_; payload has "sandbox": false |
Switch to production
To go live, simply replace your keys and the webhook base URL:
const wajub = new Wajub(
process.env.NODE_ENV === 'production'
? process.env.WAJUB_LIVE_KEY
: process.env.WAJUB_TEST_KEY
);Check your checklist before go-live
Review the go-live checklist before switching. A missed webhook or idempotency setup can be costly.
Sandbox-specific behaviors
- Payments: any transaction initiated with
pk_test.…is automatically markedsandbox: true. - Refunds: accepted immediately, without processing delay.
- Transfers: funds are not actually debited, but the lifecycle (pending → complete) is respected.
- Fees: platform fees are simulated but not collected.
Base URL
https://api.wajub.comThe API URL is identical in sandbox and production. Your key determines the target environment.
https://api.wajub.com/paymentsThe sandbox header in responses
Each API response contains the "sandbox": true field when you use a test
key. Use it to add logs or specific behaviors during development.
Related pages