# Webhooks overview This page provides an introduction to webhooks, how they work on Spotnana, and a sample use case. ## What are webhooks? 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. ## Spotnana webhooks workflow Webhook request and response flow ***Fig:** Fig: Webhook request and response flow between Spotnana and the partner’s system.* br Here's how the webhook flow works: 1. An event occurs on the Spotnana platform (e.g., a booking has been created). 2. Spotnana sends an HTTP POST request containing the event data to the partner's configured HTTPS endpoint. 3. The partner's system receives and processes the webhook payload. 4. The partner's system returns an HTTP 200 OK response indicating the delivery has been successful. 5. Spotnana logs the delivery as successful on our system. ## Sample use case **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: 1. The partner subscribes to the [PNR_V3](/openapi/webhookeventapi/webhooks/paths/pnr_v3/post) webhook. 2. A traveler (who's part of the partner's organization) books a flight on Spotnana. This triggers the [PNR_V3](/openapi/webhookeventapi/webhooks/paths/pnr_v3/post) event with `operation` as `BOOKING_CREATED`. The partner's system receives the booking details and knows that a new trip is in progress. 3. The supplier then processes the payment and issues a ticket for the booking. This triggers the [PNR_V3](/openapi/webhookeventapi/webhooks/paths/pnr_v3/post) event with `operation` as `BOOKING_TICKETED`. This indicates the payment has been made and the ticket has been issued to the traveler. 4. The partner endpoint receives this event along with the booking details, traveler info, pricing, and payment data. 5. The partner system uses this data to create an expense entry in their database. 6. If the traveler later cancels or exchanges the ticket, a [PNR_V3](/openapi/webhookeventapi/webhooks/paths/pnr_v3/post) event is triggered with `operation` as `TICKET_VOIDED` or `TICKET_REFUNDED`, and the partner updates or reverses the expense accordingly.