Sandbox mode — Use https://wallet.e-mazad.store/api/v1 as your base URL
Sandbox

Testing & Sandbox

Everything you need to test your Mazad Wallet integration without using real money. The sandbox environment mirrors production behavior with predictable test data.

Getting sandbox access

Follow these steps to get started with the sandbox environment.

1

Contact Sales

Reach out to our team to register your merchant account and receive sandbox credentials.

2

Get your API keys

You will receive a sandbox API key starting with sk_sandbox_ and a merchant ID.

3

Set the base URL

Point all API calls to https://wallet.e-mazad.store/api/v1 for sandbox testing.

4

Use test users

The sandbox comes pre-loaded with test users and balances (see below).

Sandbox behavior

The sandbox environment is designed to behave identically to production with a few key differences for testing convenience.

Fixed FX Rates

Exchange rates are fixed and do not fluctuate, making test results predictable and reproducible.

Pre-loaded Balances

Test users come with pre-loaded wallet balances. Balances reset daily at midnight UTC.

No Real Money

No actual funds are moved. All transactions are simulated in an isolated environment.

Instant Processing

Payroll batches and subscription charges process instantly instead of asynchronously.

Webhook Delivery

Webhooks are delivered to your configured URL just like production, with test payloads.

Rate Limits Relaxed

Sandbox has higher rate limits (1000 req/min vs 100 req/min in production).

Test users

The sandbox comes with pre-configured test users. Use their IDs in API calls just like real customer IDs.

Customer IDBalanceDescription
test_buyer_rich10,000,000 IQDPre-loaded buyer with high balance. Use for successful payment flows.
test_buyer_broke0 IQDBuyer with zero balance. Use to test insufficient funds errors.
test_buyer_usd5,000 USDBuyer with USD balance only. Use for multi-currency and FX flows.
test_seller500,000 IQDSeller/merchant account. Use as the receiving end for payments.

Daily balance reset

Test user balances are reset to their default values every day at midnight UTC. If you need a persistent balance for multi-day testing, contact support.

Test PIN and OTP

In the sandbox environment, all PIN and OTP verification use the same fixed values.

Verification typeValueNotes
Wallet PIN0000006-digit PIN for checkout popup authorization
SMS OTP0000006-digit OTP for phone verification
Email OTP0000006-digit OTP for email verification
Transaction PIN0000006-digit PIN for high-value transfer confirmation

Sandbox only

The universal 000000 PIN/OTP only works in the sandbox environment. In production, real PINs and OTPs are required.

Integration test scenarios

Before going live, make sure your integration handles all of these scenarios correctly.

1
Create a payment and verify the checkout popup flow end-to-end
2
Process a refund and confirm the buyer wallet is credited
3
Create a hold, then capture partial and release the remainder
4
Subscribe a user to a plan and verify the first charge
5
Simulate a failed payment and verify the subscription enters past_due
6
Pause and resume a subscription, confirming billing date recalculation
7
Submit a payroll batch and track per-recipient completion
8
Execute an FX conversion and verify both currency balances update
9
Generate a QR code payment and complete it with the test buyer
10
Test webhook delivery by triggering each event type in sequence

Simulating edge cases

Use special sandbox headers to simulate failure scenarios and edge cases that are hard to reproduce naturally.

HeaderValueEffect
X-Sandbox-Fast-ExpiretrueMakes payment links, QR codes, and checkout sessions expire in 30 seconds instead of the default timeout. Use to test expiry handling.
X-Sandbox-Force-Fail-Recipientcustomer_idForces a specific recipient to fail in a payroll batch. Set the value to the customer_id that should fail. The failure reason will be wallet_suspended.
X-Sandbox-Force-DeclinetrueForces the next payment or subscription charge to be declined, even if the wallet has sufficient funds.
X-Sandbox-Slow-Response5000Adds an artificial delay (in milliseconds) to the API response. Use to test timeout handling.
X-Sandbox-Webhook-Delay10000Delays webhook delivery by the specified milliseconds. Use to test your app's behavior when webhooks arrive late.
# Create a payment link that expires in 30 seconds
curl -X POST https://wallet.e-mazad.store/api/v1/gateway/payment-links \
  -H "Authorization: Bearer sk_sandbox_..." \
  -H "Content-Type: application/json" \
  -H "X-Sandbox-Fast-Expire: true" \
  -d '{
    "amount": 25000,
    "currency": "IQD",
    "description": "Test expiry flow"
  }'

Headers are sandbox-only

These X-Sandbox-* headers are silently ignored in production. You do not need to strip them from your code before going live, but it is good practice to only include them in your test environment configuration.

Ready to integrate Mazad into your platform?

Our team will review your business and issue your production API keys within 2 business days.