Skip to main content

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 is an account-wide switch

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​

  1. 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).
  2. Open the Test mode tab.
  3. 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​

AreaBehaviour 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.
PaymentsRefused: 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 providersAnything that slipped past the above is blocked and logged
Receipt OCRAnswers with test data, without calling a provider or spending credits
Public APIEvery /api/v1 response carries the X-IncentIA-Test-Mode: true header
Outgoing webhooksStill delivered, so you can test your receiver

Test OCR​

Put a marker in the image URL or file name to choose the outcome:

MarkerOutcome
test_ocr_unreadableFailed read: left for review
test_ocr_low_confidenceData extracted with confidence 40: left for review
test_ocr_amount_12.34Readable 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.

Creating a test key

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.