Testing
Ophelia Test City has practice venues for every vertical, hotels and flights included. They run the real booking flow and book nothing real.
Search with "location": "Ophelia Test City" and only practice venues come back. Nothing else ever reaches them. Use them to test your integration end to end, as often as you like: no real venue, account or card is involved, and nobody is texted or emailed.
Practice venues are not mock responses. Restaurants, classes and tickets walk the same steps as the provider they imitate. Hotels and flights go further: they run Ophelia's production hotels and flights code against a pretend site, so the payment pause, the confirm step, the held checkout, the price ceiling and the unknown-outcome state all behave exactly as they do for a real booking.
Practice, test keys and live keys
402 free_tier_exhaustedPractice venues
Every practice response carries "provider": "practice", and every practice venue has metadata.practice: true. Request and response shapes otherwise match the real provider.
card_required: true. Texted code, then confirmed. Can be cancelled.metadata.sections and send its listing_id in metadata. Emailed code, then confirmed.payment, card, confirm, confirmed. Or pay by link. No code.fchk_ checkout, card, confirm: true, booked. Or pay by link. No code.The code
Every practice code is 246810. It never appears in an API response: as with a real provider, your agent has to ask the person for it. Any other code fails the booking with error_code: "otp_invalid", the way a wrong code does at the real provider. Hotels and flights send no code.
Test cards and failure cases
Practice venues never charge a card, so any card number that passes the Luhn check works, for example 4242424242424242. The values below make a hotel or flight fail on purpose, so you can test how your agent recovers. They follow the convention Stripe's test cards use.
4242424242424242status: "succeeded" with a booking_reference4000000000000002failed, error_code: "not_confirmed"502, code: "payment_declined", not retryable4000000000000119202 processing, error_code: "outcome_unknown". The booking stays processing.reason: "verify_outcome", pressed: true, outcome_known: false4000000000003220reason: "verify_outcome", pressed: true, outcome_known: false4242424242424241failed, error_code: "card_fill_incomplete"502, code: "card_fill_incomplete"max_total below the checkout totalreason: "over_max_total" with payable_total. Answer with a higher max_total and confirm: true.failed, error_code: "rate_not_available". Practice Lodge is sold out on every date: availability returns no slots.price_drift is never 0 on it.outcome_unknown or verify_outcome, the pay button was pressed and the site never said what happened. Your agent must stop and tell the person. It must never press again: on a real site, a second press can buy a second ticket.Timing
Practice answers can come back almost at once, while a real hotel search takes about 25 seconds and a flight checkout can take a minute. Set the Ophelia-Practice-Timing header to choose how long each practice step takes:
livefastinstantSend it on every request. Any other value returns 400 invalid_practice_timing.
Hotels
Search hotels with "location": "Ophelia Test City"to get six hotels in hotels.com's shape: nightly and total prices with taxes, ratings and per-rate cancellation terms.
rate_not_available)To practise a hosted card page instead, send "payment_collection": "link" on the booking. next_action.url then opens a practice pay page with no card fields: pressing its confirm button carries the booking on to confirmed.
Flights
Any route with Ophelia Test City at either end is a practice route, whatever providers says. Its airport is OTC. The other end can be JFK, BOS, ATL, MIA, ORD, DEN, LAS, LAX, SFO or SEA, or one of those cities by name. Each day has six departures on three practice airlines (Practice Air, Test City Airways, Ophelia Express), some nonstop and some with a stop at Practice Junction (PJX). All four cabins and three fares are offered, in the itinerary shape recorded from the real site.
"OTC" alone is not recognised as practice and goes to the real flights site.As on a real route, the site's $14.10-a-traveller protection plan is bought unless you send "insurance": "decline", and it shows up in price_drift.
The pressed checkout is recorded as booking bkg_fchk_..., which GET /v1/bookings/{id} returns. To practise paying by link, leave out the card and send "payment_collection": "link". The booking comes back as bkg_... with next_action.type "payment" and a URL. After the practice pay page is confirmed, the booking goes through processing to requires_action with next_action.type "confirm". Send {"confirm": true} to /continue and it is confirmed.
Walkthrough: dining with a code
The usual request rules still apply, so a practice run also tests your input. The customer needs a first and last name. Placeholder guests are refused with placeholder_customer: for example an example.com email, or a phone number in the 555 exchange such as +12125551234.