This page provides an introduction to webhooks, how they work on Spotnana, and a sample use case.
Webhooks are custom HTTP callbacks that allow one application to send real-time data to another whenever a specific event occurs. Unlike APIs that require constant polling for updates, webhooks push the latest data to a partner's designated endpoint automatically.
When a specific event occurs on the Spotnana platform (e.g., an air booking creation), a webhook event sends the relevant data payload to the partner's configured endpoint via an HTTP POST request.

Fig: Fig: Webhook request and response flow between Spotnana and the partner’s system.
Here's how the webhook flow works:
- An event occurs on the Spotnana platform (e.g., a booking has been created).
- Spotnana sends an HTTP POST request containing the event data to the partner's configured HTTPS endpoint.
- The partner's system receives and processes the webhook payload.
- The partner's system returns an HTTP 200 OK response indicating the delivery has been successful.
- Spotnana logs the delivery as successful on our system.
Scenario: A partner wants to create an expense entry in their system every time their traveler books a flight on Spotnana.
Here's how the flow works in this scenario:
- The partner subscribes to the PNR_V3 webhook.
- A traveler (who's part of the partner's organization) books a flight on Spotnana. This triggers the PNR_V3 event with
operationasBOOKING_CREATED. The partner's system receives the booking details and knows that a new trip is in progress. - The supplier then processes the payment and issues a ticket for the booking. This triggers the PNR_V3 event with
operationasBOOKING_TICKETED. This indicates the payment has been made and the ticket has been issued to the traveler. - The partner endpoint receives this event along with the booking details, traveler info, pricing, and payment data.
- The partner system uses this data to create an expense entry in their database.
- If the traveler later cancels or exchanges the ticket, a PNR_V3 event is triggered with
operationasTICKET_VOIDEDorTICKET_REFUNDED, and the partner updates or reverses the expense accordingly.