API Specification

Webhooks & Real-time Events

v1.2.0 Active API Key Required

Subscribe to instant asynchronous event notifications for your bookings

Webhooks allow your application to receive instant HTTP POST callbacks whenever important events occur on Enjoy Holiday Hub, such as ticket issuance, cancellation confirmations, schedule modifications, and visa status changes.

Configuring Your Webhook Endpoint

To receive events, configure a publicly accessible HTTPS endpoint in your Agent Portal → API Settings. When an event fires, our server will dispatch an HTTP POST request with a JSON payload to your designated URL.

Your endpoint must return an HTTP 200 OK response status within 5 seconds. If any other status code is received, our webhook engine will retry delivery with exponential backoff (up to 5 attempts).

Supported Webhook Events

Event NameModuleDescription
flight.ticketedFlightsTriggered when airline issues confirmed e-ticket and PNR.
flight.schedule_changeFlightsTriggered when an airline changes departure or arrival times.
hotel.confirmedHotelsTriggered when hotel property confirms reservation voucher.
bus.ticket_issuedBusTriggered when bus operator assigns coach and boarding details.
visa.status_updatedVisaTriggered when embassy or consulate updates application status.

Example Webhook Payload: flight.ticketed

JSON Response
{
    "id": "evt_9981249128",
    "event": "flight.ticketed",
    "created_at": "2026-11-13T12:00:00Z",
    "data": {
        "booking_id": "EHH-BOK-884912",
        "pnr": "6EF9Z1",
        "airline": "IndiGo",
        "flight_number": "6E-2041",
        "passenger_count": 1,
        "ticket_status": "CONFIRMED",
        "ticket_url": "http://localhost/public_html/api/b2b/flights/ticket.php?booking_id=EHH-BOK-884912"
    }
}

Webhook Signature Verification

Every webhook request includes an X-EHH-Signature header containing an HMAC SHA256 digest of the request payload computed using your agency webhook signing secret.

// PHP Signature Verification Example
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_EHH_SIGNATURE'] ?? '';
$secret = 'whsec_your_webhook_signing_secret';

$computed = hash_hmac('sha256', $payload, $secret);

if (!hash_equals($computed, $signature)) {
    http_response_code(401);
    exit('Invalid signature');
}

// Process validated event
$event = json_decode($payload, true);
http_response_code(200);
echo json_encode(['status' => 'received']);

Security & Best Practices

  • Always verify the HMAC signature before processing.
  • Only accept webhook calls over HTTPS.
  • Respond with 200 OK immediately and process heavy work in background queue.
  • Ensure idempotency by tracking the unique evt_id.