Sandbox & Testing
Sandbox lets you exercise the full search → quote → book → retrieve → cancel flow without live inventory charges. This page summarizes how to test effectively.
Sandbox vs production
| Aspect | Sandbox | Production |
|---|---|---|
| API host | https://test-api.bundleport.com (recommended) or https://api.bundleport.com with sandbox keys | https://api.bundleport.com with production keys |
| API keys | sk_test_* from the dashboard | sk_prod_* |
| Bookings | Test data; no real reservations | Real reservations |
Always use sandbox keys and the test API host when integrating.
Test connection codes
Your account receives one or more connection codes for sandbox integrations. Examples you may see in documentation (replace with codes assigned to your organization):
testb-hbds-1876— common in examples for a major bedbank test connection- Additional codes are provisioned per integration; confirm yours in the dashboard or with support
Use the codes in settings.connectionCodes on every transactional call.
Recommended end-to-end flow
- Search —
POST /connect/hotels/v1/availabilitywith dates far enough in the future, valid occupancies, and your sandboxconnectionCodes. - Quote —
POST /connect/hotels/v1/prebookingwithoptionRefIdfrom search. - Book —
POST /connect/hotels/v1/bookingwith holder, rooms, and the sameconnectionCodes. Set a uniqueclientReferenceper attempt (e.g. UUID) for reconciliation. - Retrieve —
POST /connect/hotels/v1/bookingdetailwith the returnedbookingID. - List (optional) —
POST /connect/hotels/v1/bookinglistfiltered by date range orclientReferenceto verify a booking after timeouts or unclear responses. - Cancel —
POST /connect/hotels/v1/cancelwhen your test policy allows it.
Debugging in sandbox
auditTransactions: true
Set settings.auditTransactions to true to include provider-level trace data in auditData (useful for support and integration debugging). Do not log raw audit payloads in production or commit them to source control.
testMode: true
Set settings.testMode to true when your integration supports it so downstream systems treat the traffic as non-production.
skipHotelCodesMapping (when applicable)
Some sandbox scenarios use hotel codes that are not yet mapped in the content catalog. Your integration may support skipping hotel-code mapping for availability in those cases—confirm with your technical contact.
Simulating real-world outcomes
- No availability — tighten dates or use restrictive filters; empty
optionswithtracingis a valid outcome. - Price change — compare search vs quote prices; handle warnings and re-quote before book.
- Provider timeout / partial failure — check
tracing.accessSpansandwarnings; one supplier may fail while others succeed. ON_REQUEST— booking may return pending confirmation; see Create a booking.
Test payment cards
If a booking requires a card in sandbox, use test card numbers only (e.g. vendor-documented test PANs). Never use real card data in sandbox.
Next steps
- Authentication — API keys and headers
- Error handling — Retries and error codes
- Create a booking — Idempotency and recovery patterns