Order
An order is an offer with passenger details, ready to be paid and booked.
Create an order from the offer.
Stores the passenger and contact details on the offer, runs the final price check and stores the order, which is then paid with confirm_card_payment. The order is held for 10 minutes, a shorter time than the offer: pay it before its expires_at.
In: header
Path Parameters
Id of offer
Response Body
curl -X POST "https://api.staging.dohop.io/connect_api/v1/string/create_order" \ -H "Content-Type: application/json" \ -d '{ "passengers": [ { "passenger_id": "string", "date_of_birth": "2019-08-24", "first_name": "string", "gender": "m", "last_name": "string", "title": "string" } ], "contact_information": { "first_name": "string", "last_name": "string", "phone": "string", "phone_country_code": "string", "title": "string", "email": "user@example.com" } }'{
"order_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"errors": [
{
"initial_price": {
"currency": "str",
"amount": 0
},
"new_price": {
"currency": "str",
"amount": 0
}
}
],
"bookings": [
{
"booking_type": "travel",
"booking_id": "string",
"fare_code": "string",
"leg_ids": [
"string"
],
"pnr": "string",
"status": "awaiting_payment"
}
],
"contact_information": {
"first_name": "string",
"last_name": "string",
"phone": "string",
"phone_country_code": "string",
"title": "string",
"email": "string"
},
"itinerary": {
"itinerary_tags": [
"overnight"
],
"outbound": [
{
"item_type": "leg",
"active_leg": {
"leg_id": "string",
"origin": {
"airport_iata": "str",
"airport_name": "string",
"city_iata": "string",
"city_name": "string",
"country_code": "st",
"country_name": "string",
"transport_type": "AIRPORT",
"terminal": "string"
},
"destination": {
"airport_iata": "str",
"airport_name": "string",
"city_iata": "string",
"city_name": "string",
"country_code": "st",
"country_name": "string",
"transport_type": "AIRPORT",
"terminal": "string"
},
"duration_in_seconds": 0,
"departure_date": "2019-08-24T14:15:22Z",
"arrival_date": "2019-08-24T14:15:22Z",
"flight_number": "string",
"aircraft_id": "string",
"marketing_carrier": {
"code": "string",
"name": "string"
},
"operating_carrier": {
"code": "string",
"name": "string"
},
"arrival_terminal": "string"
}
}
],
"homebound": [
{
"item_type": "leg",
"active_leg": {
"leg_id": "string",
"origin": {
"airport_iata": "str",
"airport_name": "string",
"city_iata": "string",
"city_name": "string",
"country_code": "st",
"country_name": "string",
"transport_type": "AIRPORT",
"terminal": "string"
},
"destination": {
"airport_iata": "str",
"airport_name": "string",
"city_iata": "string",
"city_name": "string",
"country_code": "st",
"country_name": "string",
"transport_type": "AIRPORT",
"terminal": "string"
},
"duration_in_seconds": 0,
"departure_date": "2019-08-24T14:15:22Z",
"arrival_date": "2019-08-24T14:15:22Z",
"flight_number": "string",
"aircraft_id": "string",
"marketing_carrier": {
"code": "string",
"name": "string"
},
"operating_carrier": {
"code": "string",
"name": "string"
},
"arrival_terminal": "string"
}
}
]
},
"passengers": [
{
"passenger_id": "string",
"date_of_birth": "2019-08-24",
"first_name": "string",
"gender": "m",
"last_name": "string",
"passport_country": "string",
"passport_expiration": "string",
"passport_number": "string",
"nationality": "string",
"title": "string",
"expected_type": "a",
"traveling_with": "string"
}
],
"summary": {
"leg_summaries": [
{
"additional_services": [
{
"service_id": "string",
"service_class": "luggage_personal",
"quantity": 0,
"price": {
"currency": "str",
"amount": 0
},
"can_increment": true,
"can_decrement": true,
"dimensions": {
"length": 0,
"width": 0,
"height": 0
},
"passenger_id": "string",
"weight": 0,
"price_per_leg": {
"currency": "str",
"amount": 0
}
}
],
"bundle": {
"code": "string",
"price": {
"currency": "str",
"amount": 0
}
},
"included_services": [
{
"bundle_code": "string",
"quantity": 0,
"service_class": "luggage_personal",
"dimensions": {
"length": 0,
"width": 0,
"height": 0
},
"weight": 0
}
],
"leg_ids": [
"string"
]
}
],
"fees": [
{
"fee_type": "dohop_service_fee",
"price": {
"currency": "str",
"amount": 0
}
}
],
"total": {
"currency": "str",
"amount": 0
},
"ticket_price": {
"total_tax": {
"currency": "str",
"amount": 0
},
"total_fare": {
"currency": "str",
"amount": 0
}
}
}
}{
"errors": [
{
"status_text": "Incomplete",
"error_code": "string",
"response_code": 0,
"description": "string",
"recoverable": true
}
]
}Confirm card payment and start booking.
Authenticates the card tokenized by the PCI Proxy endpoint and either returns a 3DS challenge, starts the booking in the background, or reports a failure. A retriable failure may be retried with another card.
In: header
Path Parameters
Id of order
Response Body
curl -X POST "https://api.staging.dohop.io/connect_api/v1/string/confirm_card_payment" \ -H "Content-Type: application/json" \ -d '{ "payment": { "billing_address": { "address": "string", "city": "string", "country": "string", "postal_code": "string", "province": "string" }, "browser_info": { "accept_header": "string", "browser_agent": "string", "browser_url": "http://example.com", "color_depth": 0, "java_enabled": true, "screen_height": 0, "screen_width": 0 }, "card_info": { "card_number": "string", "card_cvc": "string", "card_type": "string", "card_expiration": "string", "bin": "string", "last_four": "string", "name_on_card": "string" } } }'{
"result": {
"status": "challenge_required",
"order_id": "string",
"challenge": {
"challenge_id": 0,
"three_ds": {
"challenge_type": "3ds1",
"provider": "string",
"provider_action": {}
},
"target_bookings": [
"string"
]
}
}
}{
"errors": [
{
"status_text": "Incomplete",
"error_code": "string",
"response_code": 0,
"description": "string",
"recoverable": true
}
]
}{
"errors": [
{
"status_text": "Incomplete",
"error_code": "string",
"response_code": 0,
"description": "string",
"recoverable": true
}
]
}Forward the result of a 3DS challenge.
Forward the result the 3DS component returned in the customer browser, booking then resumes. Answers 409 when no challenge is waiting for a result or the result was not accepted.
In: header
Path Parameters
Id of order
Query Parameters
Challenge id (provider transaction id)
nullRedirect result for challenges that require redirection
nullThe details of the Adyen component result, e.g. {"threeDSResult": "..."}
Empty Object
The error the 3DS component raised, if any
Response Body
curl -X POST "https://api.staging.dohop.io/connect_api/v1/string/challenge_callback" \ -H "Content-Type: application/json" \ -d '{}'{
"status": "accepted"
}{
"errors": [
{
"status_text": "Incomplete",
"error_code": "string",
"response_code": 0,
"description": "string",
"recoverable": true
}
]
}{
"errors": [
{
"status_text": "Incomplete",
"error_code": "string",
"response_code": 0,
"description": "string",
"recoverable": true
}
]
}Poll the order.
Poll an order being booked, until keep_polling is false.
In: header
Path Parameters
Id of order
Response Body
curl -X GET "https://api.staging.dohop.io/connect_api/v1/string/poll"{
"order_id": "string",
"bookings": [
{
"booking_type": "travel",
"booking_id": "string",
"fare_code": "string",
"leg_ids": [
"string"
],
"pnr": "string",
"status": "awaiting_payment"
}
],
"challenge": {
"challenge_id": 0,
"three_ds": {
"challenge_type": "3ds1",
"provider": "string",
"provider_action": {}
},
"target_bookings": [
"string"
]
},
"error": {
"error_code": "string",
"is_recoverable": true,
"passengers": [
{
"passenger_id": "string",
"date_of_birth": "2019-08-24",
"first_name": "string",
"gender": "m",
"last_name": "string",
"passport_country": "string",
"passport_expiration": "string",
"passport_number": "string",
"nationality": "string",
"title": "string",
"expected_type": "a",
"traveling_with": "string"
}
]
},
"keep_polling": true,
"total": {
"currency": "str",
"amount": 0
}
}{
"errors": [
{
"status_text": "Incomplete",
"error_code": "string",
"response_code": 0,
"description": "string",
"recoverable": true
}
]
}