Quickstart
Process your first payment end-to-end — account creation, API keys and verification — in under five minutes.
This guide takes you from an empty account to a verified payment. You'll need a Wajub account (free) and a few minutes.
1. Create your account and get your keys
Create an account on the Dashboard. Once logged in, open Developers → API Keys. Each account has two sets of keys:
pk_test.… / sk_test.…sandboxoptionalpk.… / sk.…productionoptionalKeep your secret keys server-side
The public key (pk./pk_test.) initializes payments client-side. The secret key
(sk./sk_test.) authorizes sensitive operations (refunds, transfers) and must
never be exposed in a browser or mobile app.
2. Initialize a payment
Server-side, create a transaction. Wajub returns an id and a hosted authorization_url
to redirect your customer to.
curl https://api.wajub.com/payments \
-H "Authorization: pk_test.8f2b91c4d7e6a0f3" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"currency": "XAF",
"email": "client@example.com",
"callback": "https://example.com/return"
}'There is no official backend SDK yet (Node/Python/PHP/Go) — see SDKs & Libraries for what's actually available today.
3. Test with sandbox Mobile Money numbers
On the payment page (in test mode), use a test number to simulate each outcome:
The outcome is controlled by the number's last 6 digits, not the country — the same suffixes work for every operator:
| Suffix | Result |
|---|---|
000000 | Payment succeeded |
000001 | Insufficient funds |
000002 | Failure — operator declined |
000003 | Timeout |
000004 | Pending → cancelled |
000009 | Payment succeeds, a later refund on it fails |
Example numbers by country/operator:
| Country / Operator | Prefix | Example (success) |
|---|---|---|
| Cameroon — MTN | +23767 | +237670000000 |
| Cameroon — Orange | +23769 | +237690000000 |
| Côte d'Ivoire — MTN | +22505 | +225050000000 |
| Côte d'Ivoire — Orange | +22507 | +225070000000 |
| Côte d'Ivoire — Wave | +22503 | +225030000000 |
| Senegal — Orange | +22177 | +221770000000 |
| Ghana — MTN | +23324 | +233240000000 |
| Nigeria — MTN | +2348 | +23480000000 |
| Kenya — M-Pesa | +25470 | +254700000000 |
| Uganda — MTN | +25677 | +256770000000 |
Use any PIN when prompted on the sandbox payment page.
4. Verify the transaction
Never rely solely on the browser return: verify the status server-side before fulfilling the order.
https://api.wajub.com/payments/{id}curl https://api.wajub.com/payments/trx_01JXXXXXXXXXXXXX \
-H "Authorization: pk_test.8f2b91c4d7e6a0f3"{
"status": "OK",
"code": 200,
"transaction": {
"id": "trx_01JXXXXXXXXXXXXX",
"status": "succeeded",
"amount": 5000,
"currency": "XAF",
"channel": "cm.mtn"
}
}Track the transaction in Konsole
Open Konsole → API Logs to see the exact request/response Wajub recorded, or Routing Log to see which provider was chosen and why.
What's next?
- Receive status changes via Webhooks.
- Go to production: Go-live checklist.
- Explore what's available today: SDKs & Libraries.