Link

Getting the money

apaleo payments use Adyen’s Drop-in technology that is based on Adyen’s checkout API. To test apaleo payments in your developer account, you need the following information:

Field Description Value
Merchant Account The company-level merchant account. It shows information for all your merchant accounts. ApaleoGmbHCOM
Sub-merchant ID Merchant-level sub-accounts detail specific settings for each merchant. It only shows you payments for the currently selected merchant account. 0000000JWSCCGBF
Checkout URL Endpoint The test checkout URL endpoint. The format is https://checkout-test.adyen.com/[version]/[method] https://checkout-test.adyen.com/checkout/V52/payments
API Key An API Key is what Adyen uses to authenticate API requests from your account. AQEshmfxLoLNaxZBw0m/n3Q5qf3VaZtMAZZFf2hU7t5zpA3osDxUhMnBXPo7mA8QwV1bDb7kfNy1WIxIIkxgBw==-QntgDhQ4FG0tGiMbnfX1KdPl6u4Fg/tHwAas6p5aJ8c=-L4KdmwfD7T6EKyNQ
Allowed origins Allowed origins are domains from which we expect to get your client-side requests. It can have HTTP in the test environment, for example, http://localhost:8080, but must have https in the live environment. If you are not using this URL, then send us an email to us at api@apaleo.com containing your URL. http://localhost:8080
Client Key The client key is a public key that uniquely identifies a web service user. If you are using http://localhost:8080 as your origin, then use the key that is provided here. test_MW2GQ44S2VGYXNSZDK52HLAZTIW73AQB

To get credentials for live apaleo payments integration, send an email to api@apaleo.com containing your origins, and we’ll send you the following details:

  • Merchant account per property
  • Sub-merchant id per property
  • URL prefix per account
  • API key per account
  • Client key per account

You can test your payments using the test card numbers that are provided by Adyen.

Depending on the guarantee types of the reservation that you have in your basket, you should run the booker through the following flows.

  • For PM6Hold you should not ask for a credit card and only allow the booker to put a credit card on file to guarantee the booking for later than 6 pm on the day of arrival.
  • For a CreditCard booking, you should at least authorize a zero amount and store the payment account with the booking.
  • For Prepayment, you would need to authorize the prepayment amount and forward also the reference to the transaction to apaleo together with the payment account.

Using Adyen’s Drop-in technology, it is really simple to authorize the above-calculated prepayment amount. Hotels can even use the credit card later for merchant-initiated transactions when you are setting the parameters shopperReference, shopperInteraction and recurringProcessingModel as shown in the example below.

It is essential to set all the metadata in the additionalData to ensure that apaleo can finalize the transaction correctly. To avoid conflicts, the shopperReference must be a UUID or a GUID.

You must send subMerchantID. It has to be part of the payment configuration.

The flow type captureOnly tells the apaleo backend how to proceed with such authorization. We put this authorization into the queue awaiting the respective booking to be created.

As soon as the booking arrives, we capture the proper amounts for each reservation and commit the payment(s). In case we do not receive a booking for such an authorization within two hours, we will automatically cancel the authorization to unblock the money on the customer’s card.

You must set the deliveryDate to the earliest arrival of all reservations in the booking so that the payment processor can calculate the potential exposure to chargebacks in regards to prepaid reservations properly and can hold back sufficient funds to cover for this risk.

If you want to create a booking with rooms from different properties, then you still can only send in one apaleo property ID. You could take the ID for the property that has the biggest portion of rooms or revenues in the whole booking. The money will be paid out to the bank account of this property then.

{
  {
  ...,
  "configuration": {
    "cardHolderName": "REQUIRED"
  },
  "deliveryDate": "2019-11-17T16:00:00.000+01:00",
  "enableOneClick": false,
  "enableRecurring": true,
  "shopperReference": "575b0100-b261-4a36-94cb-eeb49f7c98d3",
  "shopperInteraction": "Ecommerce",
  "recurringProcessingModel": "UnscheduledCardOnFile",
  "additionalData": {
    "metadata.flowType": "CaptureOnly",
    "metadata.accountId": "DEMO", // The apaleo account id
    "metadata.propertyId": "MUC", // The apaleo property id
    "subMerchantID": "48C27Z5QRX3QJBM" // The sub-merchant id
  }
}
}

After you’ve made the payment request to Adyen, you will receive a response which looks similar to this:

{
  "additionalData": {
    "expiryDate": "9/2022",
    "cvcResult": "0 Unknown",
    "authCode": "084985",
    "avsResult": "0 Unknown",
    "cardHolderName": "Expedia VirtualCard",
    "cardSummary": "0211",
    "paymentMethod": "mc",
    "refusalReasonRaw": "00 : Approved or completed successfully",
    "acquirerCode": "AdyenMasterCard_13445",
    "acquirerReference": "927513404474",
    "recurring.recurringDetailReference": "8415689021960227",
    "recurringProcessingModel": "UnscheduledCardOnFile",
    "recurring.shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"
  },
  "pspReference": "851570021506441J",
  "resultCode": "Authorised",
  "merchantReference": "YOUR_ORDER_NUMBER_Hsz7365uehhgGFFS"
}