Documentation

Preconfirm and Reconfirm Transfers logo icon

If an intermediate step to proceed with a payment process is needed, then you have the choice of performing a two-step confirmation.

  • Preconfirm
  • Reconfirm

Instead of the confirm call. The reason is that you will be holding the allotment or tickets until the confirmation has gone through correctly and the reconfirming. In the event of using only that the confirm call, you will be already confirming the booking regardless of the payment being successful or not. The following diagram summarizes this:

The difference between the previous example and this one is the use of two calls rather than the confirmation call. In this example:

Preconfirm: The booking is pre-confirmed and the allotment is locked. 

  • You will have 30 minutes to complete the booking and reconfirm. 
  • Otherwise the session will expire and the product will not be able to be confirmed with the same preconfirmation done. 
  • You will need to do another preconfirmation before using the reconfirm call.

Payment Platform: Although this step is NOT PROVIDED BY APITUDE for Activities

  • The step represents the point where you allow your final customer to pay for the services purchased with the payment method of your choice.

Reconfirm:

  • When you are done with the payment, you can confirm the booking by using the reconfirm API call. 
  • The response and behavior is the same that the confirm operation.

Preconfirm request

PUT https://api.test.hotelbeds.com/activity-api/3.0/bookings/preconfirm

The preconfirm request is the same as the confirm api call request. See here for details.

The pre-confirm api call will deliver a booking reference and the same information as the booking response but status "PRECONFIRMED".

The following is a preconfirm request example:

{
  "clientReference": "Exp 132223/2016",
  "holder": {
    "surname": "Smith",
    "name": "John",
    "title": "Mr",
    "email": "j.smith@hotelbeds.com",
    "address": "Cami Son Fangos 100",
    "zipCode": "07007",
    "telephones": ["555123123", "555456456", "555789789"],
    "mailing": false,
    "country": "ES"
  },
  "language": "en",
  "activities": [{
    "rateKey": "3ajeb1pcqslb8r850t2atsqk4d",
    "from": "2016-03-29",
    "to": "2016-03-29"
  }]
}


And the following is a fragment of a preconfirm response where the generated booking number can be seen:

{
  "operationId": "ACTRTR-BOOKINGPreconfirm-74hn4h1n7ptjpafl3ap16dasge",
  "auditData": {},
  "booking": {
    "creationDate": "2016-03-22T17:06:32.000Z",
    "paymentData": {... },
    "reference": "102-6112608",
    "status": "PRECONFIRMED"
      ...
  }
}

As it can be seen, a booking in “PRECONFIRMED” status has been generated and a booking reference too.

Reconfirm request

Specifications

PUT https://api.test.hotelbeds.com/activity-api/3.0/bookings/reconfirm

NAME

Type

DESCRIPTION

language

String

Language code to be used in the response.

reference

String

Booking reference generated in the preconfirm api call.

A call to reconfirm with the returned booking number will generate the valid booking. The following is an example request to reconfirm the previous booking:

{
	"language": "en",
	"reference": "102-6112608"
}

And the, the booking is marked as confirmed. See the following reconfirmation fragment for the example above:

{
  "operationId": "ACTRTR-BOOKINGReconfirm-rair2pu6d8ehli9q73s29aq847",
  "auditData": {},
  "booking": {
    "creationDate": "2016-03-22T17:07:19.776",
    "paymentData": {... },
    "reference": "102-6112608",
    "status": "CONFIRMED"
      ...
  }
}