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

# Issue an order

> Book the seats, charge your wallet in USD and receive the tickets, in one call.

> [!WARNING]
>
> This is the purchase: the call that **books seats and moves money**.

No request body. In order, the platform:

1. Checks the order belongs to your agency.
2. Checks your USD wallet covers `price.total`. If not, it returns 402 `WALLET_INSUFFICIENT_BALANCE` **before anything is booked**.
3. Reserves the seats with the airline, re-checking the price. A change returns 409 `FLIGHT_PRICE_CHANGED` and nothing is charged.
4. Charges the wallet.
5. Waits for the tickets and returns them.

Expect **10 to 60 seconds**. Set your client timeout to at least 120 seconds. For an order created with `holdOnly`, step 3 is skipped (the PNR already exists) and the order must still be within `hold.expiresAt`.

`issue` is idempotent per order. Once the order is paid, repeating it (after a 504, a network failure or by mistake) skips the wallet and only reports the ticketing state. Keep calling until `status` is terminal.

## Path

**orderId** `integer` *required*

The `orderId` returned by [create order](https://developers.ttool.travel/api-reference/book.md).

## Response

**status** `string`

Overall order status. HTTP 200 only means the request was processed, so always check this. Values are listed below.

**errors** `object[]`

`code 0` and `Info` on success. Otherwise one entry per failed item: `code`, `msg`, `severity`.

**orderCode** `integer`

Human-readable order number for customers and support.

**flights** `object[]`

One entry per flight segment.

**properties**

**flightNumber** `string`

**airline** `string`

Carrier code.

**airlineName** `string`

**airplane** `string`

**departureAirport** `string`

**departureCity** `string`

**arrivalAirport** `string`

**arrivalCity** `string`

**departureDate** `string`

**departureTime** `string`

**arrivalDate** `string`

**arrivalTime** `string`

**pnr** `string`

Airline PNR.

**cabinClass** `string`

**bookingClass** `string`

**stops** `object[]`

Layovers: `airport`, `durationMinutes`.

**tickets** `object[]`

One entry per passenger per segment group.

**properties**

**tktNo** `string`

Ticket number.

**pnr** `string`

**status** `string`

**gender** `integer`

`1` male, `2` female.

**firstName** `string`

**lastName** `string`

**paxType** `string`

`ADT`, `CHD` or `INF`.

**docType** `integer`

`1` passport, `2` national id.

**nationalCode** `string`

**passportNumber** `string`

**dateOfBirth** `string`

**nationality** `string`

## Status values

| `status` | Meaning | What to do |
| - | - | - |
| `IssuedSucceeded` | Booked, paid and ticketed | Deliver the tickets |
| `IssueInProgress` | Paid, ticketing running | Call issue again, or read the [order](https://developers.ttool.travel/api-reference/get-order.md) |
| `OfflineIssueRequired` | Paid; our operations team completes the ticket manually | Tickets follow shortly. Contact support with `orderCode` if they don't. |
| `IssueFailed` | The airline rejected ticketing | Contact support with `orderCode` and the correlation id |
| `PaymentFailed` | Payment didn't complete | Check the wallet and call again |

## Errors

| HTTP | `errorCode` | Action |
| - | - | - |
| 402 | `WALLET_INSUFFICIENT_BALANCE` | `errorDetails.orderTotal` and `walletBalance` show the gap. Top up and call again. Nothing was booked. |
| 402 | `PAYMENT_CONFIRMATION_FAILED` | The wallet refused the payment after the seats were booked; `errorDetails.walletMessage` says why. Read the order status and contact support. Don't create a new order. |
| 404 | `ORDER_NOT_FOUND` | Unknown order, or not your agency's |
| 409 | `FLIGHT_PRICE_CHANGED` | Price or itinerary changed at booking time; nothing charged. Search again and create a fresh order. |
| 409 | `HOLD_EXPIRED` | The hold ended and the PNR no longer exists. Search again. |
| 502 | `RESERVATION_FAILED` | The airline refused the booking; nothing charged. |
| 504 | `ISSUANCE_TIMEOUT` | Paid, ticketing still running. Call issue again (it won't charge twice) or read the order status. |

```bash cURL theme={null}
curl -X POST "https://api.staging.ttool.travel/hub/api/v1/flights/orders/184233/issue" \
  -H "Authorization: Bearer $TOKEN" \
  --max-time 120
```

```json 200 theme={null}
{
  "status": "IssuedSucceeded",
  "errors": [ { "code": 0, "msg": "Success", "severity": "Info" } ],
  "orderCode": 1005123,
  "flights": [
    {
      "flightNumber": "4313",
      "airline": "IA",
      "airlineName": "Iraqi Airways",
      "airplane": "Boeing 737-800",
      "departureAirport": "BGW",
      "departureCity": "Baghdad",
      "arrivalAirport": "DXB",
      "arrivalCity": "Dubai",
      "departureDate": "2026-12-07",
      "departureTime": "03:00:00",
      "arrivalDate": "2026-12-07",
      "arrivalTime": "05:00:00",
      "pnr": "ABC123",
      "cabinClass": "Economy",
      "bookingClass": "Y",
      "stops": []
    }
  ],
  "tickets": [
    {
      "tktNo": "0751234567890",
      "pnr": "ABC123",
      "status": "IssuedSucceeded",
      "gender": 1,
      "firstName": "JOHN",
      "lastName": "DOE",
      "paxType": "ADT",
      "docType": 1,
      "nationalCode": "",
      "passportNumber": "A12345678",
      "dateOfBirth": "1990-01-15",
      "nationality": "Iraq"
    }
  ]
}
```

```json 402 theme={null}
{
  "success": false,
  "error": {
    "errorCode": "WALLET_INSUFFICIENT_BALANCE",
    "errorCategory": "Payment",
    "httpStatusCode": 402,
    "errorDetails": { "orderTotal": 436.00, "walletBalance": 210.00 }
  }
}
```

```json 409 theme={null}
{
  "success": false,
  "error": { "errorCode": "FLIGHT_PRICE_CHANGED", "errorCategory": "Conflict", "httpStatusCode": 409, "errorDetails": { "oldTotalPrice": 412.50, "newTotalPrice": 436.00 } }
}
```

```json 504 theme={null}
{
  "success": false,
  "error": { "errorCode": "ISSUANCE_TIMEOUT", "errorCategory": "Timeout", "httpStatusCode": 504, "suggestedAction": "Call issue again with the same orderId." }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.