Real time booking cancellation notification


Stay up-to-date on your bookings

There can be many reasons why a booking might be cancelled — from a change in travel plans to unexpected events. At Holidu, it is our responsibility to make sure that our partners are informed of booking cancellations in a timely manner.

This document covers the booking cancellation notification for both Holidu Payment (HoPa) and non-Holidu Payment partners.


How It Works

Guest Experience

  1. Guest initiates cancellation — The guest visits their Holidu post-booking page and selects "Cancel booking"
  2. Reason selection — Guest chooses a cancellation reason and confirms
  3. Confirmation — Guest sees a confirmation page and receives a cancellation email
  4. Partner notification — Holidu sends a cancellation notification to your API endpoint

Before You Start

The cancellation notification is not enabled by default. As a Holidu API partner, you will need to implement a certain degree of logic on your system in order to consume the event successfully.

Requirements

  • Dedicated endpoint — Have an endpoint to accept booking cancellation events (and in the future, booking modification events as well)
  • Idempotency — Ensure that your endpoint is idempotent. This guarantees that all cancellation notification requests are processed consistently and simplifies error handling

Implementing Booking Cancellation Notification

Request

Method: POST
Content-Type: application/json

Your endpoint will receive a JSON payload with the following structure:

{
  "holiduBookingId": 3536882,
  "providerBookingId": "test_bk-6148266",
  "action": "CANCELLATION",
  "cancellationFee": {
    "amount": 50,
    "currency": "EUR"
  },
  "cancellationReason": "CUSTOMER_UNKNOWN_REASON",
  "paymentHandler": "HOLIDU"
}

Request Fields

ParameterTypeRequiredDescription
holiduBookingIdIntegerYesThe booking ID on the Holidu system
providerBookingIdStringYesThe corresponding booking ID on your system
actionStringYesThe action of the notification. Currently only CANCELLATION is supported
cancellationFeeObjectNoCancellation fee details. Only included for Holidu Payment bookings
cancellationFee.amountIntegerNoThe cancellation fee amount
cancellationFee.currencyStringNoThe cancellation fee currency (e.g., EUR)
cancellationReasonStringYesThe reason for the booking cancellation
paymentHandlerStringYesIndicates who handles the payment: HOLIDU or PARTNER

Response

Your endpoint must respond with an acknowledgment:

{
  "status": "ACKNOWLEDGED"
}

HTTP Status: 200 OK

ParameterTypeRequiredDescription
statusStringYesConfirmation that you acknowledged the request and will process it on your system

Holidu Payment vs Non-Holidu Payment

The cancellation notification works for both payment models, with some key differences:

AspectHolidu Payment (HoPa)Non-Holidu Payment
paymentHandler value"HOLIDU""PARTNER"
cancellationFee objectIncluded (when applicable)Not included
Payment processingHolidu handles refundsPartner handles refunds

Example: Holidu Payment Request

{
  "holiduBookingId": 3536882,
  "providerBookingId": "test_bk-6148266",
  "action": "CANCELLATION",
  "cancellationFee": {
    "amount": 50,
    "currency": "EUR"
  },
  "cancellationReason": "CUSTOMER_UNKNOWN_REASON",
  "paymentHandler": "HOLIDU"
}

Example: Non-Holidu Payment Request

{
  "holiduBookingId": 4930433,
  "providerBookingId": "709489",
  "action": "CANCELLATION",
  "cancellationReason": "CUSTOMER_UNKNOWN_REASON",
  "paymentHandler": "PARTNER"
}

Testing Your Integration

You can test your endpoint using curl:

curl --location --request POST 'https://your-domain.com/booking/cancel' \
  --header 'Content-Type: application/json' \
  --data '{
    "holiduBookingId": 4930433,
    "providerBookingId": "709489",
    "action": "CANCELLATION",
    "cancellationReason": "CUSTOMER_UNKNOWN_REASON",
    "paymentHandler": "PARTNER"
  }'

Expected Response:

HTTP 200
{
  "status": "ACKNOWLEDGED"
}

Important Notes

For Holidu Payment bookings: The notification is initiated only after Holidu has successfully cancelled the booking. As soon as you receive the notification, mark the corresponding booking as cancelled in your system.

For non-Holidu Payment bookings: Since payment handling remains with you, ensure you process any necessary refunds according to your cancellation policy after receiving the notification.


Integration Checklist

  • Implement a cancellation endpoint that accepts the request format above
  • Ensure your endpoint is idempotent
  • Return {"status": "ACKNOWLEDGED"} with HTTP 200
  • Process the cancellation in your system upon receiving the notification
  • Provide your cancellation endpoint URL to your Holidu Technical Account Manager