Order Booking Finish Status
https://api.worldota.net/api/b2b/v3/hotel/order/booking/finish/status/
A status check for the orders completion process made in async (asynchronous) mode. The request is supposed to be used during the reservation process only.
Checking the booking status
If you get a response with processing
status, you need to request the booking finish status at certain intervals (such as every 1 second) by sending a booking status check request.
Processing 3-D Secure Credit Cards (optional)
If the issuing bank supports 3-D Secure cards, one more step is required to complete the booking.
In such a case, when a correct status request is sent, a response with the 3ds
value of the status
key and special data in data_3ds
key is retrieved. You can send a corresponding request with data for a 3-D Secure check via a GET type of request or via a POST type of request. Below you can find an example with information for sending a POST-request.
{
"data": {
"data_3ds": {
"action_url": "https://example.com/ACS/auth/start.do",
"data": {
"MD": "94cf25b2-aa6d-4204-83e4-acf036d263f6",
"PaReq": "eJxVkt1ygjAQhV/F4R7zIwI6azptqa2dAR0L0+s0RKAV0ADVvn0TC33833+zObs5G7g5l/vRp1RNUVcLi4yxNZKVqNOiyhZWEi9t37phEOdKyuBFik5JBqFsGp6JUZEurBl358xfpLbvSWw7U05sHzvU3hGyS92Z8DyfWww2t1t5ZNA3YrrPmAIaUCsqkfOqZcDF8W4VMYd6LsaAeoRSqlXACJ04U9fzAf0wVLyUTPFW5vz0AeiCIOquatUXc20JoAGgU3uWt+1hjtBwYSzqEpA5APQ3waYzUaOFzkXKwvfwHMXZaR08kHWQOGH8cIqC5BTGyQKQqYBUyzGKKcYOpiPszbEzx1NAlzzw0kzACJmYXE9wME1ur47+p0AbrfQehkcMBPJ8qCupK7R7vzGgv3nvn4yHotXuLPPZIY2ecbeLGlI8bulbkh2zzRZvXvfG2UuRUSy0P5Rg9yJpAJCRQf3SUL9vHV39g287E7qa",
"TermUrl": "https://example.com/rebpayment/rest/finish3ds.do?ret_path=finish"
},
"method": "post"
},
"partner_order_id": "asd123",
"percent": 66
},
"debug": null,
"error": null,
"status": "3ds"
}
Important:
The value of the PaReq parameter may contain line breaks, which must be retained at all times when this parameter is forwarded on in a request. Otherwise, the transaction will not be successfully completed.
Upon completion of the 3-D Secure check, the payment gateway will forward the customer back to the partner’s website (the URL in the return_path
parameter of the booking request).
It makes practical sense to enter a specific URL in the return_path
parameter value. Following this URL should trigger a booking finish status request. In this case, you will be returned to the pending
step and continue renewing the booking finish status with the corresponding request.
Method GET
If you obtain a response with “status”: “3ds” and “method”: “get”, it is necessary to transfer the user with a GET-request to “action_url”. All necessary parameters (e.g. MD
, pareq
, termurl
) will be included in the “action_url”.
Example:
"data3ds": {
"action_url": "https://example.com/ACS/auth/start.do?data={"PaReq":"eJxVkt1ygjAQhV/F4R7zIwI6azptqa2dAR0L0+s0RKAV0ADVvn0TC33833+zObs5G7g5l/vRp1RNUVcLi4yxNZKVqNOiyhZWEi9t37phEOdKyuBFik5JBqFsGp6JUZEurBl358xfpLbvSWw7U05sHzvU3hGyS92Z8DyfWww2t1t5ZNA3YrrPmAIaUCsqkfOqZcDF8W4VMYd6LsaAeoRSqlXACJ04U9fzAf0wVLyUTPFW5vz0AeiCIOquatUXc20JoAGgU3uWt+1hjtBwYSzqEpA5APQ3waYzUaOFzkXKwvfwHMXZaR08kHWQOGH8cIqC5BTGyQKQqYBUyzGKKcYOpiPszbEzx1NAlzzw0kzACJmYXE9wME1ur47+p0AbrfQehkcMBPJ8qCupK7R7vzGgv3nvn4yHotXuLPPZIY2ecbeLGlI8bulbkh2zzRZvXvfG2UuRUSy0P5Rg9yJpAJCRQf3SUL9vHV39g287E7qa","termurl":"https://example.com/rebpayment/rest/finish3ds.do?ret_path=finish","MD":"94cf25b2-aa6d-4204-83e4-acf036d263f6}"
"method": "get"
},
Completing the booking process
As soon as you request the booking finish status, it returns a status
key with an ok value, meaning that the reservation is successfully completed.
Important:
The booking is completed (successfully or not) only after a
status
key with anok
value or one of the below errors is returned.
Note that the reservation confirmation time usually doesn’t exceed 2 minutes. Nevertheless, there are cases, when the reservation takes longer to be confirmed - in any case, you need to wait till an answer different to "status":"processing"
is returned. A reservation cannot be considered successfully completed or not unless the respective information is returned in the booking status request’s response.
If you have booking time limits we have cut-off logic for booking timeouts. During this maximum booking time, you can request the Order Booking Finish Status any time you like (but we highly recommend to do it once per 5sec). At the last second, you request the status for the last time and receive the reservation status “completed” or “failed” (even in the case when the reservation is not completed yet at Emerging Travel Group).
Request example
curl --location 'https://api.worldota.net/api/b2b/v3/hotel/order/booking/finish/status/' \
--header 'Content-Type: application/json' \
--data '{
"partner_order_id": "asd123"
}'
Request body
Identifier of the booking (at the partner) made by the partner.
- The minimum length is
1
character. - The maximum length is
256
characters.
Response
Response example
{
"data": {
"data_3ds": null,
"partner_order_id": "asd123",
"percent": 100
},
"debug": null,
"error": null,
"status": "ok"
}
Errors’ description
block
Card authorization error.
charge
Card authorization error.
3ds
Invalid 3D-secure code.
soldout
The rate was no longer available at the moment of reservation, as the rooms at this rate were sold out.
book_limit
Failed booking status due to cut-off logic.
not_allowed
If such error occurs, you shall reach the regular Customer Support of ETG (according to the type of your contract), and specify that an error occurs while attempting to reserve the rate.
When contacting the Support Team, you need to specify the order_id (reservation’s number) from the response to the Order Booking Form (if you have such), or such input data of reservation as guest names, phone number, email, as well as hotel’s name.
The more information you tell the manager, the bigger is the possibility that the request attempt will be identified, and the issue with the block resolved.
The user shall be told, that the reservation error has occurred.
provider
Technical error at the rate provider.
order_not_found
No reservation with the following partner_order_id
wasn found. Probably an incorrect reservation partner_order_id
was inputted.
booking_finish_did_not_succeed
In case you are trying to request an Order Booking Finish Status without a successful Order Booking Finish.
timeout
, unknown
, and 5xx
If you get errors timeout
, unknown
, or the 5хх
status code from this call:
-
Finish the booking flow by requesting until you get the following response:
-
The
status
field has theok
value. -
The
error
field has one of the values:3ds
.block
.book_limit
.booking_finish_did_not_succeed
.charge
.decoding_json
.endpoint_exceeded_limit
.endpoint_not_active
.endpoint_not_found
.incorrect_credentials
.invalid_auth_header
.invalid_params
.lock
.no_auth_header
.not_allowed
.not_allowed_host
.order_not_found
.overdue_debt
.provider
.soldout
.unexpected_method
.
-
The requests should be sent within the agreed booking timeout.
-