Link

Creating the booking

Only then can you create the booking in apaleo using the apaleo Booking API. Use the data from the response to populate the payment account model in the booking request to apaleo. Please note that all amounts you send to apaleo to overwrite the deafult amounts for time slices or services have to be gross amounts and you should not include amounts for city tax or additional custom fees.

{
  "paymentAccount": {
    "accountNumber": "1111",
    "accountHolder": "John Doe",
    "expiryMonth": "8",
    "expiryYear": "2018",
    "paymentMethod": "visa",
    "payerEmail": "s.hopper@test.com",
    "payerReference": "575b0100-b261-4a36-94cb-eeb49f7c98d3",
    "transactionReference": "564578124534890J",
    "isVirtual": false
  },
  "booker": {
    "lastName": "Doe"
  },
  "reservations": [
    {
      "arrival": "2019-09-18",
      "departure": "2019-09-19",
      "adults": 1,
      "guestComment": "I need a wake up service",
      "channelCode": "Direct",
      "primaryGuest": {
        "lastName": "Doe"
      },
      "guaranteeType": "Prepayment",
      "travelPurpose": "Business",
      "timeSlices": [
        {
          "ratePlanId": "MUC-NONREF-SGL"
        }
      ],
      "services": [
        {
          "serviceId": "MUC-YOGA",
          "dates": [
            {
              "serviceDate": "2019-09-19",
              "amount": {
                "amount": 20,
                "currency": "EUR"
              }
            }
          ]
        }
      ],
      "prePaymentAmount": {
        "amount": 70,
        "currency": "EUR"
      }
    },
    {
      "arrival": "2019-09-18",
      "departure": "2019-09-19",
      "adults": 1,
      "guestComment": "I need a wake up service",
      "channelCode": "Direct",
      "primaryGuest": {
        "lastName": "Doe"
      },
      "guaranteeType": "Prepayment",
      "travelPurpose": "Business",
      "timeSlices": [
        {
          "ratePlanId": "MUC-NONREF-SGL"
        }
      ],
      "prePaymentAmount": {
        "amount": 30,
        "currency": "EUR"
      }
    }
  ]
}

Be sure to set the paymentAccount.payerReference with the shopperReference used to perform the authorization and the paymentAccount.transactionReference with the PSP reference returned from the authorization call.

Also, the prePaymentAmount for each reservation must be set with the sum of the prePaymentGrossAmount of the selected offers.

Nice to have:

If you subscribe to the “reservation created” event, you could implement notifications like: hotel just has been booked, be fast! Pretty cool, right?