> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seyaha.net/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /bookings/confirm

> Convert a hold into a confirmed booking. Seyaha calls this immediately after the customer's payment succeeds.

Seyaha calls `POST /bookings/confirm` after a successful payment. This converts the
temporary hold (created by `POST /bookings/reserve`) into a confirmed booking on your platform.

***

## Request

```http theme={null}
POST /bookings/confirm
Authorization: Bearer <auth_key>
Content-Type: application/json
```

### Request body

| Field                         | Type   | Required | Description                                                    |
| ----------------------------- | ------ | -------- | -------------------------------------------------------------- |
| `reservationConfirmationCode` | string | **Yes**  | The code returned by `POST /bookings/reserve` for this booking |
| `contact`                     | object | No       | Customer contact details (same shape as in reserve)            |
| `resellerReference`           | string | No       | Seyaha's internal booking `_id`                                |

```json theme={null}
{
  "reservationConfirmationCode": "HOLD-2026-0001",
  "contact": {
    "fullName": "Jane Smith",
    "emailAddress": "jane@example.com",
    "phoneNumber": "+966501234567"
  },
  "resellerReference": "67c896a6639e6ff76dd2f882"
}
```

***

## Response

```http theme={null}
200 OK
Content-Type: application/json
```

### Response body

| Field               | Type   | Required | Description                                                                                       |
| ------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------- |
| `externalBookingId` | string | **Yes**  | Your permanent booking reference. Seyaha stores this and sends it back when the customer cancels. |
| `status`            | string | **Yes**  | Should be `"CONFIRMED"`                                                                           |
| `uuid`              | string | No       | Your internal UUID                                                                                |
| `productId`         | string | No       |                                                                                                   |
| `optionId`          | string | No       |                                                                                                   |
| `availabilityId`    | string | No       |                                                                                                   |
| `contact`           | object | No       |                                                                                                   |
| `tickets`           | array  | No       | Required when `handles_ticket_delivery: true` on your integration (see below)                     |

```json theme={null}
{
  "uuid": "res_7f3a9c",
  "status": "CONFIRMED",
  "externalBookingId": "BK-2026-9999",
  "productId": "product_abc",
  "optionId": "option_standard",
  "availabilityId": "avail_2026-07-15-10",
  "contact": {
    "fullName": "Jane Smith",
    "emailAddress": "jane@example.com",
    "phoneNumber": "+966501234567"
  }
}
```

***

## Ticket delivery

If you registered your integration with `handles_ticket_delivery: true`, include a
`tickets` array in this response. Seyaha stores the delivery options and forwards them
to the customer.

### Ticket object

| Field              | Type   | Description                        |
| ------------------ | ------ | ---------------------------------- |
| `redemptionMethod` | string | e.g. `"DIGITAL"`, `"PRINT"`        |
| `deliveryOptions`  | array  | List of delivery items (see below) |

### Delivery option object

| Field            | Type   | Description                                      |
| ---------------- | ------ | ------------------------------------------------ |
| `deliveryFormat` | string | `QRCODE`, `CODE128`, `PDF_URL`, `AZTEC`, `EAN13` |
| `deliveryMethod` | string | `TICKET` or `VOUCHER`                            |
| `deliveryValue`  | string | QR content, PDF URL, or barcode data             |

```json theme={null}
{
  "externalBookingId": "BK-2026-9999",
  "status": "CONFIRMED",
  "tickets": [
    {
      "redemptionMethod": "DIGITAL",
      "deliveryOptions": [
        {
          "deliveryFormat": "QRCODE",
          "deliveryMethod": "TICKET",
          "deliveryValue": "https://tickets.yourplatform.com/qr/BK-2026-9999"
        },
        {
          "deliveryFormat": "PDF_URL",
          "deliveryMethod": "VOUCHER",
          "deliveryValue": "https://tickets.yourplatform.com/pdf/BK-2026-9999"
        }
      ]
    }
  ]
}
```

***

## Implementation notes

<Warning>
  `externalBookingId` must be permanent and unique. Seyaha stores it immediately and
  uses it as the key when calling `POST /bookings/{externalBookingId}/cancel`.
  Never reuse booking IDs, even for cancelled bookings.
</Warning>

<Note>
  If confirm fails (e.g. the hold expired between payment and confirm), Seyaha logs the
  error but does **not** reverse the payment. The booking is marked as paid on Seyaha's
  side. You should handle this case gracefully — either still confirm the booking or
  contact Seyaha support to reconcile.
</Note>

* Timeout: **5 seconds** (HEALTHY) / **10 seconds** (DEGRADED)
* If you cannot find the `reservationConfirmationCode`, return `400` with a descriptive `message`.
* Seyaha calls this endpoint once per booking — do not create duplicate bookings if called more than once with the same code.
