Booking test requests
To assist you in testing your integration's handling of possible booking error states, test requests are available for all methods of the Rapid Booking API.
To send a test request for a Rapid Booking API method, include an additional HTTP header named test in your booking request and use the appropriate value from the tables below.
Please review our testing notes in full before attempting any tests. A list of test header values and their responses can be found below.
Important test booking notes
Note: Failing to send test header, or sending an invalid test header, will cause the booking to be processed live.
- Always check the returned cancellation policy to ensure no penalties will apply.
- Cancelling an on-hold test booking (
hold = true
) without confirming it will cause the itinerary ID returned by the initial response to be reused by our booking system, since the original itinerary was never completed. Be aware of potential false duplicates in this testing scenario. - Test bookings are not surfaced to our booking support agents' platform. Contact your Rapid representative or partner support for test booking issues.
- Please note that when in a test environment some test responses are stubbed. Therefore responses will not always match the content expected in response.
- Before launch, during testing, please ensure you send your queries to test.ean.com. This endpoint never makes a live booking, but creates a mock booking in a test environment. This can still be used post-launch for testing production credentials.
- The test header will result in a static 'canned' message returned as a response. Therefore, rates/content etc. returned may not be relevant with the properties being tested.
Important live test booking notes
Live tests are simply standard live bookings made with a real credit card, without a test header that are cancelled after confirmation. It is your responsibility to select acceptable candidate properties and to cancel your own tests. We recommend live tests only for the very final stages of pre-launch development. Rapid is not responsible for any charges incurred by in-policy cancellations or non-refundable rates used for live tests.
Placing live test bookings
- Search for stays at least 60-90 days into the future.
- Select rooms without any cancellation penalties before the policy period (some properties charge for both inside- and outside-policy cancellations).
- Verify the room does not have a false
refundable
flag. - Use 'test booking' as your guest name values in the booking request's
rooms
object. - Use the actual name, address, and phone associated with your credit card in the
billing_contact
object.
Cancelling live test bookings
- Rooms must be cancelled within 48 hours of booking.
- Allow 5 business days to process the refund of the cancel fee.
- Allow 30 business days for the credit to be posted to the credit card account.
Register payment sessions
Test header value | HTTP code & response | Live | Test |
---|---|---|---|
standard | 201 - Standard response | ✔ | ✔ |
init_skip | 201 - Standard response w/oencodedInitConfig | ✘ | ✔ |
init_fail | 201 - Standard response & init fail | ✘ | ✔ |
init_timeout | 201 - Standard response & init timeout | ✘ | ✔ |
internal_server_error | 500 - Internal server error | ✔ | ✔ |
service_unavailable | 503 - Service unavailable | ✔ | ✔ |
Create booking
Test header value | HTTP code & response | Live | Test |
---|---|---|---|
complete_payment_session | 201 - Standard PSD2 response & success challenge | ✔ | ✔ |
standard | 201 - Standard response | ✔ | ✔ |
complete_payment_session_show | 201 - Standard PSD2 response & show challenge | ✘ | ✔ |
complete_payment_session_fail | 201 - Standard PSD2 response & fail challenge | ✘ | ✔ |
complete_payment_session_error | 201 - Standard PSD2 response & error challenge | ✘ | ✔ |
complete_payment_session_timeout | 201 - Standard PSD2 response & timeout challenge | ✘ | ✔ |
cc_declined | 400 - Credit card declined error | ✔ | ✔ |
rooms_unavailable | 410 - Rooms unavailable error | ✔ | ✔ |
price_mismatch | 409 - Price mismatch error | ✔ | ✔ |
internal_server_error | 500 - Internal server error | ✔ | ✔ |
service_unavailable | 503 - Service unavailable | ✔ | ✔ |
Complete payment sessions
Test header value | HTTP code & response | Live | Test |
---|---|---|---|
standard | 200 - Response | ✔ | ✔ |
payment_declined | 400 - Payment declined error | ✘ | ✔ |
price_mismatch | 409 - Price mismatch error | ✘ | ✔ |
rooms_unavailable | 410 - Rooms unavailable error | ✘ | ✔ |
service_unavailable | 503 - Service unavailable | ✔ | ✔ |
internal_server_error | 500 - Internal error | ✔ | ✔ |
Retrieve booking
Test header value | HTTP code & response |
---|---|
standard | 200 - Standard response |
internal_server_error | 500 - Internal error |
service_unavailable | 503 - Service unavailable |
Cancel booking
Test header value | HTTP code & response |
---|---|
standard | 204 - No content - standard response |
post_stay_cancel | 400 - Invalid response from upstream server error |
internal_server_error | 500 - Internal error |
service_unavailable | 503 - Service unavailable |