{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Cancellations and deleting bookings","description":"Integrate Hubby eSIM into your travel platform with our comprehensive API documentation, tutorials, and guides.","keywords":"hubby, esim, api, travel, integration, documentation"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cancellations-and-deleting-bookings"},"children":["Cancellations and deleting bookings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a booking is cancelled on your side, you remove it from our system by ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["deleting"]}," the booking via the API. See the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/v2_0_0/openapi"},"children":["API reference"]}," for the full Booking endpoints."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-can-a-booking-be-cancelled"},"children":["When can a booking be cancelled?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cancellation is only allowed ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["before promo codes have been communicated"]}," to the traveler. Once a promo code, claim link, or deep link has been sent (via email, SMS, WhatsApp, or any other channel), the booking is locked and cannot be deleted."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Condition"},"children":["Condition"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Can cancel?"},"children":["Can cancel?"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Promo codes have ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," been sent to the traveler"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Promo codes have been ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["sent"]}," (via Hubby or your own channels)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Promo codes have been ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["redeemed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Departure date is in the past"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tip:"]}," If you need the flexibility to cancel bookings after creation, set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["should_send_message: false"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["communication_options"]}," and handle delivery yourself. This way you control exactly when the traveler receives the promo code, and you can cancel the booking any time before that."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"two-ways-to-delete-cancel-a-booking"},"children":["Two ways to delete (cancel) a booking"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By our internal ID"]}," — ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/v2_0_0/openapi"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE /bookings/{id}"]}]}," ","Use the booking's unique identifier in our system (the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," field in the booking response)."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["By external booking ID"]}," — ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/v2_0_0/openapi"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE /bookings/{id}/byExternalBookingId"]}]}," ","Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["booking_id"]}," value you sent when creating the booking (your own reservation or confirmation number)."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Naming note:"]}," In the API, \"booking_id\" is used in two senses: (1) our internal booking identifier (the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," field in responses), and (2) the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["booking_id"]}," field you set on the booking (your external reference). For delete, use our ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE /bookings/{id}"]},", and your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["booking_id"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DELETE /bookings/{id}/byExternalBookingId"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/v2_0_0/openapi"},"children":["API reference"]}," — Booking and PromoCode endpoints"]}]}]},"headings":[{"value":"Cancellations and deleting bookings","id":"cancellations-and-deleting-bookings","depth":1},{"value":"When can a booking be cancelled?","id":"when-can-a-booking-be-cancelled","depth":2},{"value":"Two ways to delete (cancel) a booking","id":"two-ways-to-delete-cancel-a-booking","depth":2}],"frontmatter":{"description":"How to cancel a booking via the API, when cancellation is allowed, and which endpoints to use.","title":"Cancellations and deleting bookings","seo":{"title":"Cancellations and deleting bookings"}},"lastModified":"2026-03-24T07:09:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/cancellations","userData":{"isAuthenticated":false,"teams":["anonymous"]}}