Get started
Sandbox and testing
The sandbox runs the real orchestration engine, routing workflows and webhooks against two built-in mock gateways. Card numbers decide the outcome, so you can test every branch without a PSP contract.
Mock gateways
| Gateway | Identity in APIs and traces | Notes |
|---|---|---|
| Mock 1 | Mock | Same simulator as Mock 2, registered under a different name. |
| Mock 2 | mock2 | Lets you test routing between two gateways, and failover. |
- Each is a merchant gateway account in the Sandbox environment; you can enable, disable or remove it per merchant.
- Mocks exist only where the platform explicitly allows them. A production deployment leaves them off, so a mock can never process a real payment.
- Mock calls are marked
simulatedin the API-call logs and labelled as simulated in the console.
Test cards
The mocks read the first six digits of the card number (or of cardToken on the API). The numbers below pass the Luhn check, so they also work on the hosted checkout page. Use any future expiry and any three-digit CVV.
| Card number | Outcome | What you should see |
|---|---|---|
4000 0011 1111 2223 | Approve | 200, Authorized (or Captured with capture: true). |
4000 0111 1111 1117 | INSUFFICIENT_FUNDS (soft, retry later) | 402, Declined. No failover. |
4000 0511 1111 1113 | DO_NOT_HONOUR on every mock | Fails over if allowed, then 402 once options run out. |
4000 0611 1111 1112 | STOLEN_CARD (hard) | 402. No retry, no failover. |
4000 0311 1111 1115 | Technical failure | Fails over to the next eligible account; 502 if none is left. |
4000 0211 1111 1116 | Timeout, status stays unknown | Held for reconciliation. Never failed over. |
4000 0711 1111 1111 | Unknown outcome | Held. Never retried. |
4000 0811 1111 1110 | Timeout; status query confirms not charged | Safe failover to the next account. |
4000 0911 1111 1119 | Timeout; status query confirms charged | Completed on the original gateway. No second charge. |
4000 0411 1111 1114 | 3-D Secure challenge | 200, Requires3DS with a redirectUrl. |
4000 1011 1111 1116 | Failover demo | Mock 1 soft-declines DO_NOT_HONOUR, Mock 2 approves. |
5888 4511 1111 1119 | mada approve | Approves on a mada-enabled mock account. |
curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payments" \
-H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"amount": 75,
"currency": "SAR",
"cardToken": "4000011111111117",
"cvv": "123"
}'{
"paymentId": "<payment_id>",
"status": "Declined",
"code": "INSUFFICIENT_FUNDS",
"normalizedCode": "INSUFFICIENT_FUNDS",
"declineCategory": "SoftDecline",
"correlationId": "<correlation_id>"
}Forcing an outcome
Set metadata.mock_outcome to force an outcome regardless of the card. Values (case-insensitive): Success, Decline, Timeout, TechnicalFailure, Requires3DS, SoftDecline, HardDecline, Unknown, TimeoutNotCharged, TimeoutCharged. The hint takes precedence over card prefixes.
curl -X POST "https://api.sandbox.meem-dev.example/api/v1/payments" \
-H "Authorization: Bearer $MEEM_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"amount": 25,
"currency": "SAR",
"cardToken": "4000001111112223",
"metadata": {
"mock_outcome": "TechnicalFailure"
}
}'Environment isolation
- Sandbox and Production gateway accounts are separate, each with its own credentials, endpoint and webhook secret. They never fall back to each other.
- A payment's
environmentis either sent explicitly (SandboxorProduction) or resolved from your single resolvable account; it's never derived from the host name. - Workflows are published per environment. A sandbox publish doesn't affect production traffic.
- A production account activates only after a passing, Verified connection test.
Simulated features
- Simulated
3-D Secure challenge
A simulated issuer challenge in the sandbox. Real 3-D Secure runs through your PSP.
- Simulated
Apple Pay, Google Pay, Samsung Pay, STC Pay on hosted checkout
Badged as simulated on the page. Real wallet integrations are planned.
- Simulated
Tabby and Tamara (BNPL) on hosted checkout
Eligibility uses a simulated pre-score in the sandbox.
- Sandbox
Hosted fields (
POST /api/v1/hosted-fields/sessions)Card iframes on your page return a single-use
tok_hf_…token (15 minutes) forPOST /payments. Outside the sandbox the endpoint returns501 hosted_fields.sandbox_only. - Simulated
Payment-link email and SMS sharing
Nothing is delivered; the response says
simulated.
Pre-launch checklist
- Approve, soft decline, hard decline, technical failure and 3-D Secure all handled in your UI.
- Timeouts and unknown outcomes never trigger a new payment from your side.
- Every mutating call sends a unique
Idempotency-Key; retries reuse it. - Webhook signature verified on raw bytes; duplicate
event_ids ignored. - Return URLs confirmed server-side with
GET /api/v1/payments/{id}. - Tokens cached and refreshed before
expires_in.
Documentation reflects the platform as verified on 3 December 2026. Placeholder hosts and credentials are used throughout; your real sandbox host and keys are provided at onboarding.