API V2 (recommended)
Test mode and test numbers
The test_… test key routes payments through the sandbox: no real money, separate balances, and numbers that simulate each outcome.
The test key#
Each merchant account has a test key, starting with test_. It is used exactly like the live token, in the Authorization: Bearer … header, on the same endpoints and with the same formats: going live only means switching keys.
- Payments go through the LabPay sandbox: no real money moves.
- Test balances and payments are separate from live ones: a test deposit only credits the test balance, and
GET /V2/paymentswith the test key only lists test payments. - KYC verification is not required: you can integrate the API before your account is approved.
- Every response carries the
X-Labyrinthe-Mode: testheader and every payment"livemode": false. Test notifications have theX-Labyrinthe-Mode: testheader. - Platform and country amount limits also apply in test.
The test key only exists in V2: V1 only knows the live token.
The SDKs recognise the test key on their own (test_ prefix) and all their examples use it. The platform may temporarily suspend test mode: requests made with a test_… key then answer 503 TEST_MODE_DISABLED (the live token is not affected); the live status is on the home page.
Test numbers#
With the test key, these sandbox numbers simulate a success or a specific failure. They can be used in international or local format (e.g. 0813456789).
| Provider | Success | Failures (collection) |
|---|---|---|
| Vodacom M-Pesa | 243813456789 | 243813456019 limit reached · 243813456029 unknown number · 243813456039 payment not approved · 243813456049 insufficient balance |
| Airtel Money | 243973456789 | 243973456069 failure |
| Orange Money | 243893456789 | 243893456029 unknown number · 243893456039 payment not approved · 243893456049 insufficient balance |
A number ending in 129 stays in processing with no final status: useful to test automatic status re-reads and your handling of pending payments.
Rotate the test key#
The test key is visible on GET /V2/account (test_key field). POST /V2/account/test-key/rotate, called with the live token, generates a new one: the old one stops working immediately.
Read the account (test key included)
curl "https://api.labyrinthe-rdc.com/api/V2/account" \
-H "Authorization: Bearer test_xxxxxxxxxxxxxxxx" \
-H "Accept: application/json"