Sandbox
The sandbox is an isolated environment that mirrors the live API. Use it to build and test integrations without moving real money.
Sandbox-first by design
We recommend validating your full flow — payment creation, webhooks and reconciliation — in the sandbox before requesting live access.
Base URL
All sandbox requests use https://sandbox.api.madfoa.com with a sandbox key. No live funds are moved.
Test values
- Successful card:
4111 1111 1111 1111 - Declined card:
4000 0000 0000 0002 - Any future expiry and a three-digit CVC
Create a test payment
Test payment
curl https://sandbox.api.madfoa.com/v1/payments \
-H "Authorization: Bearer $MADFOA_SANDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000,
"currency": "SAR",
"merchant_id": "mch_test_01",
"method": "card",
"card": { "number": "4111111111111111", "exp_month": 12, "exp_year": 2030, "cvc": "123" }
}'Going live
Live credentials and available capabilities are provisioned per engagement. When your sandbox integration is validated, contact our team to arrange live access.
Next: API reference →