Guides
How do I test in the sandbox?
Run the booking flow in a dedicated sandbox or local test environment without assuming a public sandbox hostname.
Sandbox environment
| Setting | Value |
|---|---|
| Base URL | your provisioned sandbox origin, or http://localhost:4000 for local integration |
| Payment provider | stub or your configured test gateway |
| Hold TTL | 15 minutes |
| Rate limit | 100 req/min per tenant |
Test payment tokens
| Token | Behavior |
|---|---|
tok_test | Payment succeeds |
tok_fail | Payment declined (payment_failed, 402) |
tok_timeout | Provider timeout (payment_provider_error, 502) |
Testing error scenarios
Hold expiry
Create a hold, wait 15 minutes, attempt booking → hold_expired (410).
Allocation failure
Hold all inventory, attempt another hold → allocation_failed (409).
Idempotent replay
Create a hold with Idempotency-Key: test, repeat → cached response with Idempotent-Replayed: true.
Rate limiting
Send 101 requests in under 1 minute → rate_limited (429).
Notes
- The production canonical API origin is
https://api.agenthotel.dev. - Do not hard-code
https://sandbox.agenthotel.devunless your deployment actually provisions that hostname.