Test mode
Test mode makes your account ready for developing an integration with no real effects: outgoing messages are simulated, payments are blocked and receipt OCR answers with test data. Real members and real money are not touched.
It does not create a separate environment: while it is on, the whole account behaves this way, including the team using the back office. Turn it on in a test account or during an agreed test window, and turn it off when you finish.
Turn it on
- Go to Administration › Settings (
/app/admin/tenantSettings). You need the Test mode permission (Pages.Administration.TenantTestMode) and a customer account (the host account does not have this tab). - Open the Test mode tab.
- Switch on Enable test mode and confirm.
While it is on, the back office shows the notice Test mode is active with a Manage test mode link. To turn it off, switch it off and confirm: the account goes back to sending real messages and processing real payments.
What changes
| Area | Behaviour in test mode |
|---|---|
| Messages (WhatsApp, SMS, email, push, Telegram) | Simulated: the flow continues and the message is recorded as sent, but no provider is called. The provider id starts with test. |
| Payments | Refused: a member's checkout answers 409 with {"error":"test_mode"}, cashback payouts stay held and external provider gift cards cannot be issued |
| Calls to messaging or money providers | Anything that slipped past the above is blocked and logged |
| Receipt OCR | Answers with test data, without calling a provider or spending credits |
| Public API | Every /api/v1 response carries the X-IncentIA-Test-Mode: true header |
| Outgoing webhooks | Still delivered, so you can test your receiver |
Test OCR
Put a marker in the image URL or file name to choose the outcome:
| Marker | Outcome |
|---|---|
test_ocr_unreadable | Failed read: left for review |
test_ocr_low_confidence | Data extracted with confidence 40: left for review |
test_ocr_amount_12.34 | Readable receipt for that amount (_ is also accepted as the decimal separator) |
| (anything else) | Readable receipt of 25.50 with confidence 95 |
Test keys (mk_test_)
A test key starts with mk_test_ and behaves like a normal key with two differences:
- It only authenticates while the account is in test mode. With test mode off it answers
403. - It does not consume the monthly API quota. The key's burst, per-minute and per-hour limits still apply.
Normal keys (mk_...) keep working in test mode; they also get the X-IncentIA-Test-Mode header, so you can check which mode you are in.
The Administration › API Keys form has no checkbox for this today. A test key is created with the administration API: POST /api/services/app/ApiKey/CreateApiKey with isTestKey: true (customer accounts only). The text on the Test mode tab shows the mk_test_ prefix.
curl -si "$BASE/api/v1/members/lookup?programId=1&phone=%2B34600111222" \
-H "Authorization: Bearer mk_test_xxxxxxxx" | grep -i -E "^HTTP|x-incentia-test-mode"
# HTTP/1.1 200 OK
# X-IncentIA-Test-Mode: true
Interactive reference
The OpenAPI reference at /docs/api-v1 only sends calls with mk_test_... keys from an account in test mode; with a real key it sends neither the key nor the call. See Public API.