Hospitality Commerce API
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

SettingValue
Base URLyour provisioned sandbox origin, or http://localhost:4000 for local integration
Payment providerstub or your configured test gateway
Hold TTL15 minutes
Rate limit100 req/min per tenant

Test payment tokens

TokenBehavior
tok_testPayment succeeds
tok_failPayment declined (payment_failed, 402)
tok_timeoutProvider 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.dev unless your deployment actually provisions that hostname.

On this page