Sandbox mode allows developers to test the MarzPay API in a safe testing environment without performing real financial transactions or affecting live data.

How sandbox mode works

Sandbox mode is automatically enabled by default when a business signs up. This allows you to test the API safely without affecting live data. No additional setup is required - sandbox mode is ready to use immediately after registration.

Same endpoint as production

Sandbox mode uses the same base URL as production. It is automatically detected based on your business settings. https://wallet.wearemarz.com/api/v1 Authentication is HTTP Basic: Authorization: Basic base64(api_key:api_secret).

Collect Money API - sandbox mode

Endpoint POST /api/v1/collect-money Request body
Two different “metadata” concepts:
  • The optional request field metadata is your merchant array (echoed as data.collection.metadata on create and as top-level metadata on webhooks).
  • The response object data.metadata below is only response diagnostics (response_timestamp, sandbox_mode) - not merchant data.
Sandbox response
data.collection.metadata = your merchant metadata (if sent). data.metadata = API response diagnostics only.

Send Money API - sandbox mode

Endpoint POST /api/v1/send-money Request body
Sandbox response

Sandbox callback payload

When a callback_url is provided, the system sends a callback with this structure. If you enabled “Sign outgoing webhooks”, sandbox callbacks include the same X-MarzPay-Signature and X-MarzPay-Timestamp headers as live. Top-level metadata here is your optional merchant array from the create request (not sandbox diagnostics).

Key features of sandbox mode

Safe testing

Test API functionality safely with no impact on live data. Perfect for development.

Realistic responses

Production-like responses, proper callback handling, and complete data formatting.

Provider support

All supported providers with provider-specific responses and realistic test data.

API compatibility

Same request format, same response structure, and same validation rules as production.

Testing with webhooks

Using webhook.site for testing:
  1. Go to webhook.site
  2. Copy your unique webhook URL
  3. Include it in your API request as callback_url
  4. Make the API call
  5. Check webhook.site to see the received callback
Example cURL request

Important notes

Default configuration

Sandbox mode is enabled by default when a business signs up. No additional configuration is required to start testing.

Callback testing

Callbacks are sent for testing purposes. Ensure your callback URL is accessible for proper testing.

Provider references

Sandbox provider references follow the format SANDBOX_{PROVIDER}_{TIMESTAMP}. These are not real provider references and cannot be used for actual transactions.

Status values

API response shows "status": "sandbox". Callback payload shows "status": "completed". This allows you to test both response handling and callback processing.
Sandbox transactions are simulated and do not move real money. Do not use sandbox keys in production or production keys in sandbox.
API Playground - Test sandbox endpoints live in the interactive API reference