Testing in the sandbox
Test keys (pxt_test_…) run against the same pricing engine and validation as production. The only difference is what happens to bookings: they are stored in the sandbox, get a TEST- reference, and never reach our operations team or your invoice.
What behaves like production
- Prices, currency, commercial terms and vehicle availability.
- Validation errors, offer signing and expiry, idempotency, rate limits.
- Booking status:
confirmed,on_requestorpending_payment, exactly as a live booking would get. - Cancellation fees according to your policy.
- Webhooks to your test endpoint.
Simulating the lifecycle
In production a booking moves forward as our team works on it. In the sandbox you trigger those steps yourself:
curl -X POST https://paxvelhub.com/api/v1/test/bookings/TEST-1A2B3C4/simulate \
-H "Authorization: Bearer $PAXVEL_TEST_KEY" -H "Content-Type: application/json" \
-d '{ "event": "driver_assigned" }'event | Effect |
|---|---|
payment_completed | pending_payment → confirmed, paid = total. |
confirmed | on_request → confirmed. |
driver_assigned | Items → driver_assigned, test driver details filled. |
on_route | Items → on_route. |
completed | Items → completed. |
no_show | Items → no_show. |
on_request | Booking → on_request (waiting for our confirmation). |
offered | Booking → offered with an offer object; then try POST /bookings/{reference}/offer/accept or /offer/decline. |
Every simulation sends a booking.updated webhook to your test endpoint.
Test scenarios
Before requesting live access, run through at least these scenarios:
- Airport → hotel transfer, quote and book with a flight number.
- Return trip: two items in one booking.
- Address → airport transfer using
lat/lng/address. - Booking with an expired offer (wait 30 minutes or reuse an old
offer_id) →410 offer_expired. - The same
POST /bookingssent twice with oneIdempotency-Key→ one booking, second response hasIdempotent-Replayed: true. - Cancel a booking and check
cancellation_fee. - Simulate
driver_assignedand show the driver details in your system. - Receive and verify a webhook.
The console is the quickest way to try them; every request appears in Dashboard → Request logs.