Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.safarapi.com/llms.txt

Use this file to discover all available pages before exploring further.

The sandbox is a fully production‑like environment running on the same infrastructure as production. It is isolated from real data by the key prefix: sk_test_* keys only touch sandbox data; sk_live_* keys only touch production.

How to get a sandbox key

Self‑service signup at console.safarapi.com/signup. Magic link in your inbox within 30 seconds. Sandbox key visible once on the activation page — copy it then.

What’s in the sandbox

ResourceCountNotes
Adventures10All slugs prefixed DEMO-, mix of experiences and trips
Rate packs30+Each adventure has 2‑3 rate packs
Agencies3Fictitious — “Atlas Demo Tours”, “Sahara Demo Trekking”, “Médina Demo Walks”
Categories5desert, mountain, beach, culture, urban

Pre-defined test travellers

The sandbox simulates real payment behaviours based on the traveler email you pass on POST /bookings:
EmailBehaviour
test.success@bank.exampleBooking confirmed, voucher generated, email sent to sandbox sink
test.cancellation@bank.exampleBooking confirmed, but cancellation API behaves with tier 1 refund
test.insufficient_credit@bank.examplePOST /bookings returns 403 partner.credit.limit.exceeded
test.amount_mismatch@bank.examplePOST /bookings returns 422 payment.amount.mismatch
test.duplicate_ref@bank.exampleSecond POST /bookings with same partner_reference returns 409
Any other email behaves like test.success@bank.example. Real email addresses are accepted but no email is ever sent in sandbox — all messages route to sandbox-sink@safariat.ma.

Rate limits in sandbox

100 requests per minute per key. Sufficient for integration testing; if you need more for load testing, contact us.

Resetting your sandbox

The console exposes a “Reset sandbox data” button under Settings. Clicking it erases all bookings, quotes, and idempotency keys created with your test key in the last 30 days. Real adventures and rate packs remain untouched.

What’s different from production

AspectSandboxProduction
Settlement invoicesNot generatedGenerated monthly
Email to travellerSink (sandbox-sink@safariat.ma)Real recipient
Webhook payloadevent.test = trueevent.test = false
Rate limit100 req/min600 req/min (negotiable)
Credit limit50 000 MAD defaultPer‑contract value
Pricing rulesZero margin (passthrough)Your negotiated rules

Time‑limited sandbox keys

A sandbox key is active for 30 days of inactivity. If you don’t make any request for 30 days, the key is auto‑disabled. Re‑activate it with a single click from the console. There’s no calendar expiration — as long as you keep using it, your sandbox key works indefinitely.