Lodging Booking API
Guidance and examples for accessing the Lodging Booking API
Important: All partners leveraging XAP Booking APIs from any line of business must be aware of the PSD2 and 3DSv2 initiatives that launched in September, 2019. Please read the article on XAP Support of PSD2 and 3DSv2 Bookings for more information.
The Lodging Booking API allows you to enable up to 8 rooms in a single property to be booked on behalf of a customer.
Endpoint
Method | Endpoint | Prerequisite |
---|---|---|
POST | https://apim.expedia.com/hotels/bookings/[offerToken] | The offerToken from the Lodging Details API |
Required Headers
Key: | Expedia API key |
Authorization: | Expedia API Authorization String |
User-Id: | username@domain.com The email address associated with the booking and to which the Booking Confirmation Email will be sent. |
Content-Type: | application/json |
Accept: | application/vnd.exp-hotel.v3+json |
Partner-Transaction-Id: | [Partner TransactionID String] |
Next Steps
- View itinerary via Lodging Retrieve API.
- View cancellation details via Lodging PreCancel API.
- Cancel a booking via Lodging Cancel API.
- Go to weblink for retrieve.
Hotel Booking Request Examples
Booking Request URL
https://apim.expedia.com/hotels/bookings/[offerToken]?price=[price]¤cy=[currency]
Single Room Book Request
{
"Title": "My Hotel Booking",
"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
"RoomDetails": [
{
"Traveler": {
"Primary": true,
"Name": {
"FirstName": "San",
"LastName": "Zhang",
"MiddleName": "Edward"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
},
"SpecialRequests": "check-in 2 hours late,Crib Required"
}
],
"BillingDetails": {
"CreditCard": {
"CardNumber": "4XXXXXXXXXXXXXX8",
"CardType": "Visa",
"CardSecurityCode": "123",
"ExpirationMonth": "12",
"ExpirationYear": "2025"
},
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Address": {
"Address1": "3333 108th Ave",
"Address2": "Expedia HQ",
"City": "Bellevue",
"Province": "WA",
"Country": "USA",
"PostalCode": "98004"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "425",
"Number": "1234567"
}
},
"AdditionalBookingDetails": {
"MarketingCode": "111abc",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123"
},
"PartnerMetaData" : {
"SampleKey1" : "Sample Value 1",
"SampleKey2" : "Sample Value 2"
}
}
Single Room Book Response
{
"TransactionId": "a18c6a56-5203-415a-befe-67a63f7509be",
"OrderNumber": "9030261720045",
"OrderId": -9223371999697382799,
"OrderVersion": 1,
"TripId": "a5f94da6-174f-5bda-a772-d0ab69ddd320",
"ItineraryNumber": 79018026356,
"BookingDateTime": "2021-10-05T13:06:00-07:00",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123",
"Links": {
"ApiCancel": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "PUT",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356"
},
"ApiPreCancel": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356/canceldetails"
},
"WebItinRetrieve": {
"Href": "https://wwwexpediacom.int-milan.sb.karmalab.net/trips/79018026356?userToken="
},
"ApiItinRetrieve": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356"
}
},
"HotelConfirmation": "8100769832243",
"NumberOfRooms": 1,
"LengthOfStay": 3,
"HotelDetails": {
"Id": "50947",
"Rooms": [
{
"Traveler": {
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
},
"RoomPreferences": [
{
"Type": "SmokingPreference",
"Value": "NonSmoking"
},
{
"Type": "Bed",
"Value": "15"
}
],
"SpecialRequests": "check-in 2 hours late,Crib Required",
"Occupants": [
{
"Adults": 2
}
],
"StayDates": [
{
"CheckInDate": "2021-10-17",
"CheckOutDate": "2021-10-20"
}
],
"Description": "Single Room, 1 Queen Bed",
"RatePlanType": "standalone",
"RatePlans": [
{
"RoomTypeId": "201892847",
"RatePlanId": "209571066",
"RateRuleId": "226351705",
"InventorySourceId": "24",
"ReserveWithDeposit": true,
"StayDates": {
"CheckInDate": "2021-10-17",
"CheckOutDate": "2021-10-20"
},
"Price": {
"BaseRate": {
"Value": "927.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "150.60",
"Currency": "USD"
},
"TotalPrice": {
"Value": "1077.60",
"Currency": "USD"
},
"AvgNightlyRate": {
"Value": "309.00",
"Currency": "USD"
},
"HotelMandatoryFees": {
"Value": "42.57",
"Currency": "USD"
},
"RoomRates": [
{
"RoomIndex": 1,
"NightlyRates": [
{
"StayDate": "2021-10-17",
"BaseRate": {
"Value": "309.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "50.20",
"Currency": "USD"
},
"TotalPrice": {
"Value": "359.20",
"Currency": "USD"
}
},
{
"StayDate": "2021-10-18",
"BaseRate": {
"Value": "309.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "50.20",
"Currency": "USD"
},
"TotalPrice": {
"Value": "359.20",
"Currency": "USD"
}
},
{
"StayDate": "2021-10-19",
"BaseRate": {
"Value": "309.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "50.20",
"Currency": "USD"
},
"TotalPrice": {
"Value": "359.20",
"Currency": "USD"
}
}
]
}
]
},
"PaymentMethod": "Hotel",
"CancellationPolicy": {
"Refundable": true,
"FreeCancellation": true,
"FreeCancellationEndDateTime": "2021-10-15T19:00:00-07:00",
"CancellationPenaltyRules": [
{
"PenaltyNightCount": 1,
"PenaltyStartDateTime": "2021-10-15T19:00:00-07:00",
"PenaltyEndDateTime": "2021-10-17T19:00:00-07:00"
},
{
"PenaltyPercentOfStay": "100",
"PenaltyStartDateTime": "2021-10-17T19:00:00-07:00",
"PenaltyEndDateTime": "2021-10-20T19:00:00-07:00"
}
]
},
"ConfirmationNumber": "075d5c53-f9c5-436f-a98f-592e32f12fd8",
"Links": {
"ApiCancel": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "PUT",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356?roomConfirmations=075d5c53-f9c5-436f-a98f-592e32f12fd8"
}
}
}
],
"Price": {
"BaseRate": {
"Value": "927.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "150.60",
"Currency": "USD"
},
"TotalPrice": {
"Value": "1077.60",
"Currency": "USD"
},
"AvgNightlyRate": {
"Value": "309.00",
"Currency": "USD"
},
"HotelMandatoryFees": {
"Value": "42.57",
"Currency": "USD"
}
},
"Links": {
"ApiCancel": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "PUT",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356?roomConfirmations=075d5c53-f9c5-436f-a98f-592e32f12fd8"
}
},
"SmokingOption": "NonSmoking"
}
]
},
"TotalPrice": {
"Value": "1077.60",
"Currency": "USD"
}
}
Single Room Book Response - More Details
{
"TransactionId": "a18c6a56-5203-415a-befe-67a63f7509be",
"OrderNumber": "9030261720045",
"OrderId": -9223371999697382799,
"OrderVersion": 1,
"TripId": "a5f94da6-174f-5bda-a772-d0ab69ddd320",
"ItineraryNumber": 79018026356,
"BookingDateTime": "2021-10-05T13:06:00-07:00",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123",
"Links": {
"ApiCancel": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "PUT",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356"
},
"ApiPreCancel": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356/canceldetails"
},
"WebItinRetrieve": {
"Href": "https://wwwexpediacom.int-milan.sb.karmalab.net/trips/79018026356?userToken="
},
"ApiItinRetrieve": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356"
}
},
"HotelConfirmation": "8100769832243",
"NumberOfRooms": 1,
"LengthOfStay": 3,
"HotelDetails": {
"Id": "50947",
"Name": "Motif Seattle",
"LocalCurrencyCode": "USD",
"PhoneInfos": [{
"CountryCode": "1",
"AreaCode": "425",
"Number": "1234567"
}],
"Location": {
"Address": {
"Address1": "1415 5th Ave",
"City": "Seattle",
"Province": "WA",
"Country": "USA",
"PostalCode": "98101"
},
"GeoLocation": {
"Latitude": "47.60985",
"Longitude": "-122.33475"
}
},
"Description": {
"LocationTeaser": "Located in Seattle Central Business District, this hotel is within a 5-minute walk of 5th Avenue Theater and Nordstrom. Pike Place Market and Washington State Convention Center are also within 10 minutes. ",
"HotelTeaser": "Along with 2 restaurants, this smoke-free hotel has 2 bars/lounges and a fitness center. WiFi in public areas is free. Other amenities include a rooftop terrace, a 24-hour business center, and self parking. ",
"RoomTeaser": "All 319 rooms offer comforts like pillowtop beds and premium bedding, plus iPod docks and flat-screen TVs with satellite channels. Guests will also find WiFi, room service, and coffee makers. "
},
"ThumbnailUrl": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_t.jpg",
"Media": [{
"Type": "1",
"Title": "Featured Image",
"Size": "b",
"Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_b.jpg"
},
{
"Type": "1",
"Title": "Featured Image",
"Size": "s",
"Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_s.jpg"
},
{
"Type": "1",
"Title": "Featured Image",
"Size": "t",
"Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_t.jpg"
},
{
"Type": "1",
"Title": "Featured Image",
"Size": "y",
"Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_y.jpg"
},
{
"Type": "1",
"Title": "Featured Image",
"Size": "z",
"Url": "https://images.trvl-media.com/hotels/5000000/4700000/4694100/4694093/3a0c141c_z.jpg"
}
],
"StarRating": "4.0",
"Policies": {
"CheckInStartTime": "4 PM",
"CheckInEndTime": "2 AM",
"CheckOutTime": "noon",
"PetPolicies": [
"Pets allowed for an extra charge of USD 20 per accommodation, per stay",
"2 per room"
],
"ChildrenAndExtraBedsPolicies": [
"Children are welcome.",
"Rollaway/extra beds are available for USD 20 per night.",
"Free cribs (infant beds)!"
]
},
"CleanlinessAndSafety": {
"CLEANLINESS": [
"Follows regional sanitization guidelines of O2 Safe (UNPLV) (France)",
"Follows standard sanitization guidelines of We Care Clean (Best Western)",
"Follows industry sanitization guidelines of European Holiday Home Association (EHHA - Europe)"
],
"SOCIAL_DISTANCING": [
"Protective shields in place at main contact areas",
"Guest rooms kept vacant for 72 hours between stays",
"Social distancing measures in place"
],
"SAFETY": [
"Personal protective equipment worn by staff",
"Temperature checks available for guests",
"Masks available",
"Hand sanitizer provided",
"Individually-wrapped food options available for lunch, dinner, and through room service"
],
"DISCLAIMER": [
"This information is provided by our partners."
]
},
"HotelAmenities": [{
"Id": "2178",
"Name": "Use of nearby fitness center (discount)"
},
{
"Id": "324",
"Name": "Coffee/tea in common areas"
},
{
"Id": "8",
"Name": "Elevator/lift"
},
{
"Id": "3912",
"Name": "Rooftop terrace"
},
{
"Id": "9",
"Name": "Fitness facilities"
},
{
"Id": "3913",
"Name": "Number of bars/lounges - 2"
},
{
"Id": "2063",
"Name": "24-hour front desk"
},
{
"Id": "81",
"Name": "Conference space"
},
{
"Id": "2066",
"Name": "Porter/bellhop"
},
{
"Id": "2131",
"Name": "Meeting rooms12"
},
{
"Id": "2070",
"Name": "Dry cleaning/laundry service"
},
{
"Id": "2390",
"Name": "Free WiFi"
},
{
"Id": "3862",
"Name": "Self parking (surcharge)"
},
{
"Id": "2072",
"Name": "Limo or Town Car service available"
},
{
"Id": "2137",
"Name": "Smoke-free property"
},
{
"Id": "2016",
"Name": "Safe-deposit box at front desk"
},
{
"Id": "2592",
"Name": "Conference space size (meters) - 1394"
},
{
"Id": "2593",
"Name": "Number of meeting rooms - 14"
},
{
"Id": "4003",
"Name": "Luggage storage"
},
{
"Id": "2537",
"Name": "Number of restaurants - 2"
},
{
"Id": "361",
"Name": "Breakfast available (surcharge)"
},
{
"Id": "2538",
"Name": "24-hour business center"
},
{
"Id": "43",
"Name": "Concierge services"
},
{
"Id": "2539",
"Name": "Conference space size (feet) - 15000"
},
{
"Id": "52",
"Name": "Total number of rooms - 319"
},
{
"Id": "54",
"Name": "Number of floors - 20"
},
{
"Id": "2043",
"Name": "Multilingual staff"
},
{
"Id": "317",
"Name": "Fireplace in lobby"
},
{
"Id": "2047",
"Name": "Free newspapers in lobby"
}
],
"Accessibility": [
"Accessible bathroom",
"Roll-in shower",
"Accessible parking",
"In-room accessibility"
],
"Rooms": [{
"Traveler": {
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
},
"RoomPreferences": [{
"Type": "SmokingPreference",
"Value": "NonSmoking"
},
{
"Type": "Bed",
"Value": "15"
}
],
"SpecialRequests": "check-in 2 hours late,Crib Required",
"Occupants": [{
"Adults": 2
}],
"StayDates": [{
"CheckInDate": "2021-10-17",
"CheckOutDate": "2021-10-20"
}],
"Description": "Single Room, 1 Queen Bed",
"RatePlanType": "standalone",
"RatePlans": [{
"RoomTypeId": "201892847",
"RatePlanId": "209571066",
"RateRuleId": "226351705",
"InventorySourceId": "24",
"InventorySourceCode": "expe",
"ReserveWithDeposit": true,
"StayDates": {
"CheckInDate": "2021-10-17",
"CheckOutDate": "2021-10-20"
},
"Price": {
"BaseRate": {
"Value": "927.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "150.60",
"Currency": "USD"
},
"TotalPrice": {
"Value": "1077.60",
"Currency": "USD"
},
"AvgNightlyRate": {
"Value": "309.00",
"Currency": "USD"
},
"HotelMandatoryFees": {
"Value": "42.57",
"Currency": "USD"
},
"RoomRates": [{
"RoomIndex": 1,
"NightlyRates": [{
"StayDate": "2021-10-17",
"BaseRate": {
"Value": "309.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "50.20",
"Currency": "USD"
},
"TotalPrice": {
"Value": "359.20",
"Currency": "USD"
}
},
{
"StayDate": "2021-10-18",
"BaseRate": {
"Value": "309.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "50.20",
"Currency": "USD"
},
"TotalPrice": {
"Value": "359.20",
"Currency": "USD"
}
},
{
"StayDate": "2021-10-19",
"BaseRate": {
"Value": "309.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "50.20",
"Currency": "USD"
},
"TotalPrice": {
"Value": "359.20",
"Currency": "USD"
}
}
]
}]
},
"PaymentMethod": "Hotel",
"FreeBreakfast": true,
"FreeBreakfastDetails": [
"Breakfast Buffet"
],
"CancellationPolicy": {
"Refundable": true,
"FreeCancellation": true,
"FreeCancellationEndDateTime": "2021-10-15T19:00:00-07:00",
"CancellationPenaltyRules": [{
"PenaltyNightCount": 1,
"PenaltyStartDateTime": "2021-10-15T19:00:00-07:00",
"PenaltyEndDateTime": "2021-10-17T19:00:00-07:00"
},
{
"PenaltyPercentOfStay": "100",
"PenaltyStartDateTime": "2021-10-17T19:00:00-07:00",
"PenaltyEndDateTime": "2021-10-20T19:00:00-07:00"
}
]
},
"ConfirmationNumber": "075d5c53-f9c5-436f-a98f-592e32f12fd8",
"Links": {
"ApiCancel": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "PUT",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356?roomConfirmations=075d5c53-f9c5-436f-a98f-592e32f12fd8"
}
}
}],
"Price": {
"BaseRate": {
"Value": "927.00",
"Currency": "USD"
},
"TaxesAndFees": {
"Value": "150.60",
"Currency": "USD"
},
"TotalPrice": {
"Value": "1077.60",
"Currency": "USD"
},
"AvgNightlyRate": {
"Value": "309.00",
"Currency": "USD"
},
"HotelMandatoryFees": {
"Value": "42.57",
"Currency": "USD"
}
},
"Links": {
"ApiCancel": {
"Accept": "application/vnd.exp-hotel.v3+json",
"Method": "PUT",
"Href": "https://apim.expedia.com/hotels/bookings/79018026356?roomConfirmations=075d5c53-f9c5-436f-a98f-592e32f12fd8"
}
},
"SmokingOption": "NonSmoking"
}]
},
"TotalPrice": {
"Value": "1077.60",
"Currency": "USD"
}
}
Single Room Book Request - With Coupon
{
"Coupon": "EwsTestUKS13",
"Title": "Hotel Booking Automation",
"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
"RoomDetails": [
{
"Traveler": {
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com",
"Primary": true
},
"RoomPreferences": [
{
"Type": "SmokingPreference",
"Value": "SmokingOrNonSmoking"
},
{
"Type": "Bed",
"Value": "1"
}
],
"SpecialRequests": "check-in 2 hours late,Crib Required"
}
],
"BillingDetails": {
"CreditCard": {
"CardNumber": "4XXXXXXXXXXXXXX8",
"CardType": "Visa",
"CardSecurityCode": "123",
"ExpirationMonth": "12",
"ExpirationYear": "2025"
},
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Address": {
"Address1": "3333 108th Ave",
"Address2": "Expedia HQ",
"City": "Bellevue",
"Province": "WA",
"Country": "USA",
"PostalCode": "98004"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "425",
"Number": "1234567"
}
},
"AdditionalBookingDetails": {
"MarketingCode": "111abc",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123"
},
"PartnerMetaData" : {
"SampleKey1" : "Sample Value 1",
"SampleKey2" : "Sample Value 2"
}
}
Single Room Book Request - With HotelProgram
{
"Title": "My Hotel Booking",
"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
"HotelProgram":"FHR",
"RoomDetails": [
{
"Traveler": {
"Primary": true,
"Name": {
"FirstName": "San",
"LastName": "Zhang",
"MiddleName": "Edward"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
},
"SpecialRequests": "check-in 2 hours late,Crib Required"
}
],
"BillingDetails": {
"CreditCard": {
"CardNumber": "4XXXXXXXXXXXXXX8",
"CardType": "Visa",
"CardSecurityCode": "123",
"ExpirationMonth": "12",
"ExpirationYear": "2025"
},
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Address": {
"Address1": "3333 108th Ave",
"Address2": "Expedia HQ",
"City": "Bellevue",
"Province": "WA",
"Country": "USA",
"PostalCode": "98004"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "425",
"Number": "1234567"
}
},
"AdditionalBookingDetails": {
"MarketingCode": "111abc",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123"
},
"PartnerMetaData" : {
"SampleKey1" : "Sample Value 1",
"SampleKey2" : "Sample Value 2"
}
}
Multiple Room Book Request
{
"Title": "My Hotel Booking",
"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
"RoomDetails": [
{
"Traveler": {
"Primary": false,
"Name": {
"FirstName": "San",
"LastName": "Zhang",
"MiddleName": "Edward"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
},
"RoomPreferences": [
{
"Type": "SmokingPreference",
"Value": "NonSmoking"
},
{
"Type": "Bed",
"Value": "21"
}
],
"SpecialRequests": "check-in 2 hours late,Crib Required"
},
{
"Traveler": {
"Primary": true,
"Name": {
"FirstName": "San",
"LastName": "Little",
"MiddleName": "Edward"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
},
"RoomPreferences": [
{
"Type": "SmokingPreference",
"Value": "NonSmoking"
},
{
"Type": "Bed",
"Value": "21"
}
],
"SpecialRequests": "check-in 2 hours late,Crib Required"
},
{
"Traveler": {
"Primary": false,
"Name": {
"FirstName": "San",
"LastName": "Sr",
"MiddleName": "Edward"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
},
"RoomPreferences": [
{
"Type": "SmokingPreference",
"Value": "NonSmoking"
},
{
"Type": "Bed",
"Value": "21"
}
],
"SpecialRequests": "check-in 2 hours late,Crib Required"
}
],
"BillingDetails": {
"CreditCard": {
"CardNumber": "4XXXXXXXXXXXXXX8",
"CardType": "Visa",
"CardSecurityCode": "555",
"ExpirationMonth": "08",
"ExpirationYear": "2025"
},
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Address": {
"Address1": "3333 108th Ave",
"Address2": "Expedia HQ",
"City": "Bellevue",
"Province": "WA",
"Country": "USA",
"PostalCode": "98004"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "425",
"Number": "1234567"
}
},
"AdditionalBookingDetails": {
"MarketingCode": "111abc",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123",
"HotelLoyalty": {
"Type": "AB",
"Number": "556677"
}
}
}
PayPal and 3DS Examples
PayPal Book Request
{
"Title": "My Hotel Booking",
"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
"RoomDetails": [{
"Traveler": {
"Primary": true,
"Name": {
"FirstName": "San",
"LastName": "Zhang"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
}
}],
"BillingDetails": {
"TwoStepPaymentDetails": {
"PaymentType": "PAYPAL",
"ReturnUrl": "http://www.google.com"
},
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Address": {
"Address1": "3333 108th Ave",
"Address2": "Expedia HQ",
"City": "Bellevue",
"Province": "WA",
"Country": "USA",
"PostalCode": "98004"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "425",
"Number": "1234567"
}
},
"AdditionalBookingDetails": {
"MarketingCode": "111abc",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123",
"HotelLoyalty": {
"Type": "AB",
"Number": "556677"
}
}
}
3DS Book Request
EWS supports 2 ways for 3ds:
- External authentication and EG authorization. in this way, partner use their own service provider to authenticate payment with bank and pass authentication data to EWS for authorization. If partner uses External authentication, MpiData is required.
- EG authentication and EG authorization. in this way, partner integrate EG JS lib to authenticate and authorize payment. If partner uses EG authentication, BrowserData is required.
3DS Book Request - With External authentication
{
"Title": "My Hotel Booking",
"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
"RoomDetails": [{
"Traveler": {
"Primary": true,
"Name": {
"FirstName": "San",
"LastName": "Zhang"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
}
}],
"BillingDetails": {
"CreditCard": {
"CardNumber": "520000XXXXX00007",
"CardType": "MasterCard",
"CardSecurityCode": "111",
"ExpirationMonth": "12",
"ExpirationYear": "2025"
},
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Address": {
"Address1": "3333 108th Ave",
"Address2": "Expedia HQ",
"City": "Bellevue",
"Province": "WA",
"Country": "USA",
"PostalCode": "98004"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "425",
"Number": "1234567"
},
"TwoStepPaymentDetails": {
"PaymentType": "3DS",
"ReturnUrl": "http://www.google.com",
"PaymentSessionId": "ern:pay:pa:r1::d6d6aa02-833a-09cc-2136-d5abdd2b7344",
"MpiData": {
"Cavv": "Y2FyZGluYWxjb21tZXJjZWF1dGg=",
"Xid": "ODUzNTYzOTcwODU5NzY3Qw==",
"Eci": "05",
"CavvAlgorithm": "2",
"DsTransactionId": "1c59a512-ab4f-4370-af97-4cfe69b7276e",
"ThreeDSVersion": "2.0.1",
"MerchantName": "Expedia.com",
"PAResStatus": "Y",
"VEResStatus": "Y"
}
}
},
"AdditionalBookingDetails": {
"MarketingCode": "111abc",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123",
"HotelLoyalty": {
"Type": "AB",
"Number": "556677"
}
}
}
3DS Book Request - With EG authentication
{
"Title": "My Hotel Booking",
"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
"BrowserData": {
"IpAddressV4": "216.251.118.195",
"BrowserAcceptHeader": "text/html",
"EncodedBrowserMetadata": "eyJicm93c2VySmF2YUVuYWJsZWQiOmZhbHNlLCJicm93c2VyTGFuZ3VhZ2UiOiJ6aC1DTiIsImJyb3dzZXJDb2xvckRlcHRoIjoyNCwiYnJvd3NlclNjcmVlbkhlaWdodCI6MTA4MCwiYnJvd3NlclNjcmVlbldpZHRoIjoxOTIwLCJicm93c2VyVFoiOi00ODAsImJyb3dzZXJVc2VyQWdlbnQiOiJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCA2LjE7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS83NS4wLjM3NzAuMTAwIFNhZmFyaS81MzcuMzYifQ==",
"MerchantUrl": "https://www.expedia.com/hotel"
},
"RoomDetails": [
{
"Traveler": {
"Primary": true,
"Name": {
"FirstName": "San",
"LastName": "Zhang"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "206",
"Number": "9876543"
},
"Email": "San.Zhang@gmail.com"
}
}
],
"BillingDetails": {
"CreditCard": {
"CardNumber": "520000XXXXX00007",
"CardType": "MasterCard",
"CardSecurityCode": "111",
"ExpirationMonth": "12",
"ExpirationYear": "2025"
},
"Name": {
"FirstName": "San",
"MiddleName": "Edward",
"LastName": "Zhang"
},
"Address": {
"Address1": "3333 108th Ave",
"Address2": "Expedia HQ",
"City": "Bellevue",
"Province": "WA",
"Country": "USA",
"PostalCode": "98004"
},
"Phone": {
"CountryCode": "1",
"AreaCode": "425",
"Number": "1234567"
},
"TwoStepPaymentDetails": {
"PaymentType": "3DS",
"ReturnUrl": "http://www.google.com",
"PaymentSessionId": "ern:pay:pa:r1::d6d6aa02-833a-09cc-2136-d5abdd2b7344"
}
},
"AdditionalBookingDetails": {
"MarketingCode": "111abc",
"PartnerAgentId": "123456",
"PartnerConfirmationNumber": "hello123",
"HotelLoyalty": {
"Type": "AB",
"Number": "556677"
}
}
}
Error Codes
Warning Codes
API details
Here, you can explore the endpoint definitions for this API, then go to the API Explorer to try out all the XAP endpoints, download OpenAPI specs, or download our Postman collections. Testing with one or all of these options will give you an understanding of how the examples and schema definitions compare to the actual output.