Confirm Order
Confirms a created (unpaid) order in a single atomic call: the provider takes payment and issues the tickets, returning the same Order shape as Create Order with its status advanced (typically to paid).
TIP
Idempotent retries with the same order_id are expected to return the already-confirmed order rather than an error.
Endpoint
Method: POST
URL: /v1/order/{order_id}/confirm
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | Bearer <token> from Login |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| order_id | String | Yes | Provider order id (Order.id returned by Create Order) |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| └ payment_method | String | Yes | How the order is paid, refer to Payment Method List |
| └ locale | String | No | Language, refer to Locale List |
Request Example
json
{
"payment_method": "card",
"locale": "en"
}Response Parameters
The response is identical in shape to Create Order: an order object with status advanced (typically paid) and the issued tickets.
Response Example
json
{
"order": {
"id": "ord_7c01",
"agentorder_id": "TTN-100245",
"status": "paid",
"currency": "UAH",
"tickets": [
{ "number": "TKT-555001", "code": "BK-9931", "passenger_index": 0, "seat": "12A", "price": 650.0, "currency": "UAH", "status": "paid" }
]
}
}Error Code List
| code | message | Description |
|---|---|---|
| UNAUTHORIZED | Invalid token | The bearer token is missing, invalid, or expired (401). |
| NOT_FOUND | Order not found | No order exists for the supplied order_id. |
| NOT_CONFIRMABLE | Order cannot be confirmed | The order is already canceled, expired, or otherwise not confirmable. |
| PAYMENT_FAILED | Payment declined | The payment could not be taken for the order. |