curl --request POST \
--url https://staging.api.prexsell.com/v2/bookings/{id}/pay \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"ticketIds": [
"ord_abc"
],
"orderIds": [
"ord_abc"
]
}
'import requests
url = "https://staging.api.prexsell.com/v2/bookings/{id}/pay"
payload = {
"ticketIds": ["ord_abc"],
"orderIds": ["ord_abc"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ticketIds: ['ord_abc'], orderIds: ['ord_abc']})
};
fetch('https://staging.api.prexsell.com/v2/bookings/{id}/pay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.prexsell.com/v2/bookings/{id}/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ticketIds' => [
'ord_abc'
],
'orderIds' => [
'ord_abc'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.prexsell.com/v2/bookings/{id}/pay"
payload := strings.NewReader("{\n \"ticketIds\": [\n \"ord_abc\"\n ],\n \"orderIds\": [\n \"ord_abc\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.prexsell.com/v2/bookings/{id}/pay")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ticketIds\": [\n \"ord_abc\"\n ],\n \"orderIds\": [\n \"ord_abc\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.prexsell.com/v2/bookings/{id}/pay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ticketIds\": [\n \"ord_abc\"\n ],\n \"orderIds\": [\n \"ord_abc\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"booking": {
"id": "bkg_1",
"createdAt": "2026-06-14T00:05:00.000Z",
"updatedAt": "2026-06-14T00:10:00.000Z",
"departureDate": "2026-06-15T03:30:00.000Z",
"onboardingDateTime": "2026-06-15T03:30:00.000Z",
"status": "Upcoming",
"bookingRequiredBy": null,
"paymentRequiredBy": null,
"tickets": [
{
"id": "ord_abc",
"bookingId": "bkg_1",
"note": null,
"status": "Confirmed",
"paymentStatus": "Paid",
"departureDate": "2026-06-15T00:00:00.000Z",
"source": "PrexSell",
"refundAmount": null,
"passenger": {
"id": "pass_1",
"firstName": "ะะฒะฐะฝ",
"lastName": "ะะตััะตะฝะบะพ",
"email": "ivan@example.com",
"phones": [
{
"id": "ph_1",
"phone": "+380501234567",
"messengers": [
"Viber"
]
}
]
},
"price": {
"id": "price-1",
"amount": 1450,
"currency": "UAH"
},
"discount": {
"id": "disc-1",
"name": "ะกััะดะตะฝัััะบะฐ ะทะฝะธะถะบะฐ",
"rule": "Percent",
"amount": 100,
"startDate": "2026-06-01T00:00:00.000Z",
"endDate": "2026-12-31T23:59:59.000Z"
},
"slices": [
{
"id": "sl_abc",
"duration": 480,
"departureDate": "2026-06-15T00:00:00.000Z",
"arrivalDate": "2026-06-15T08:00:00.000Z",
"seat": {
"id": "seat_1",
"label": "12A"
},
"bus": {
"id": "bus-1",
"seatsQty": 50,
"registrationNumber": "AA1234BB",
"brand": "Mercedes-Benz",
"model": "Tourismo",
"images": [
{
"id": "img-1",
"url": "https://example.com/bus.jpg",
"name": "Bus exterior"
}
]
},
"carriage": {
"id": "carriage-1",
"name": "ะะฒัะพะฟะฐัะบ โ1",
"phones": [
"+380501234567"
]
},
"route": {
"id": "route-1",
"name": "ะะธัะฒ โ ะะฐััะฐะฒะฐ",
"slug": "kyiv-warsaw",
"description": "ะฉะพะดะตะฝะฝะธะน ะฝััะฝะธะน ัะตะนั",
"company": {
"id": "company-1",
"name": "PrexSell Lines",
"slug": "prexsell-lines",
"ceo": "ะะปะตะฝะฐ ะะพะฒะฐะปั",
"partnerCompany": null,
"logoUrl": "https://example.com/logo.png",
"email": "ops@prexsell-lines.com",
"website": "https://prexsell-lines.com",
"rules": "ะะฐัะฐะถะธั ะผะฐั ะฟัะธะฑััะธ ะทะฐ 20 ั
ะฒะธะปะธะฝ ะดะพ ะฒัะดะฟัะฐะฒะปะตะฝะฝั.",
"socials": [
"https://facebook.com/prexsell.lines"
]
},
"permissions": [
{
"id": "perm-1",
"role": "Agent",
"accesses": [
"book",
"cancel"
],
"type": "Partner"
}
],
"services": [
{
"id": "svc-1",
"name": "Wi-Fi"
},
{
"id": "svc-2",
"name": "ะะพะฝะดะธััะพะฝะตั"
}
]
},
"stops": [
{
"id": "stop-1",
"departureTime": "06:30",
"arrivalTime": null,
"platform": "3",
"arrivalDate": null,
"place": "ะฆะตะฝััะฐะปัะฝะธะน ะฐะฒัะพะฒะพะบะทะฐะป",
"latitude": 50.4501,
"longitude": 30.5234,
"city": {
"id": "city-kyiv",
"name": "ะะธัะฒ",
"slug": "kyiv",
"country": "UA",
"timeZone": "Europe/Kyiv"
}
},
{
"id": "stop-2",
"departureTime": null,
"arrivalTime": "08:00",
"platform": "5",
"arrivalDate": "2026-06-15T08:00:00.000Z",
"place": "Dworzec Zachodni",
"latitude": 52.2297,
"longitude": 21.0122,
"city": {
"id": "city-warsaw",
"name": "ะะฐััะฐะฒะฐ",
"slug": "warsaw",
"country": "PL",
"timeZone": "Europe/Warsaw"
}
}
]
}
]
}
]
}
}
}{
"errors": [
{
"message": "AUTH_INVALID_CREDENTIALS",
"errorCode": "UNAUTHORIZED"
}
]
}{
"errors": [
{
"message": "RESOURCE_NOT_FOUND",
"errorCode": "NOT_FOUND"
}
]
}{
"errors": [
{
"message": "Orders already paid",
"errorCode": "CONFLICT",
"details": {
"ordersIds": [
"ord_1"
]
}
}
]
}Pay booking
Marks targeted orders as Paid. Authenticated via the api-key header; data scoped to the callerโs partner. 409 Conflict when any targeted order is already Paid, Canceled, or Refund. paymentRecipient is always Agent (FISCALIZE_ORDER gate must not become configurable). Returns the refreshed booking after the write.
curl --request POST \
--url https://staging.api.prexsell.com/v2/bookings/{id}/pay \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"ticketIds": [
"ord_abc"
],
"orderIds": [
"ord_abc"
]
}
'import requests
url = "https://staging.api.prexsell.com/v2/bookings/{id}/pay"
payload = {
"ticketIds": ["ord_abc"],
"orderIds": ["ord_abc"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ticketIds: ['ord_abc'], orderIds: ['ord_abc']})
};
fetch('https://staging.api.prexsell.com/v2/bookings/{id}/pay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.prexsell.com/v2/bookings/{id}/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ticketIds' => [
'ord_abc'
],
'orderIds' => [
'ord_abc'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.prexsell.com/v2/bookings/{id}/pay"
payload := strings.NewReader("{\n \"ticketIds\": [\n \"ord_abc\"\n ],\n \"orderIds\": [\n \"ord_abc\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.prexsell.com/v2/bookings/{id}/pay")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ticketIds\": [\n \"ord_abc\"\n ],\n \"orderIds\": [\n \"ord_abc\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.prexsell.com/v2/bookings/{id}/pay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ticketIds\": [\n \"ord_abc\"\n ],\n \"orderIds\": [\n \"ord_abc\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"booking": {
"id": "bkg_1",
"createdAt": "2026-06-14T00:05:00.000Z",
"updatedAt": "2026-06-14T00:10:00.000Z",
"departureDate": "2026-06-15T03:30:00.000Z",
"onboardingDateTime": "2026-06-15T03:30:00.000Z",
"status": "Upcoming",
"bookingRequiredBy": null,
"paymentRequiredBy": null,
"tickets": [
{
"id": "ord_abc",
"bookingId": "bkg_1",
"note": null,
"status": "Confirmed",
"paymentStatus": "Paid",
"departureDate": "2026-06-15T00:00:00.000Z",
"source": "PrexSell",
"refundAmount": null,
"passenger": {
"id": "pass_1",
"firstName": "ะะฒะฐะฝ",
"lastName": "ะะตััะตะฝะบะพ",
"email": "ivan@example.com",
"phones": [
{
"id": "ph_1",
"phone": "+380501234567",
"messengers": [
"Viber"
]
}
]
},
"price": {
"id": "price-1",
"amount": 1450,
"currency": "UAH"
},
"discount": {
"id": "disc-1",
"name": "ะกััะดะตะฝัััะบะฐ ะทะฝะธะถะบะฐ",
"rule": "Percent",
"amount": 100,
"startDate": "2026-06-01T00:00:00.000Z",
"endDate": "2026-12-31T23:59:59.000Z"
},
"slices": [
{
"id": "sl_abc",
"duration": 480,
"departureDate": "2026-06-15T00:00:00.000Z",
"arrivalDate": "2026-06-15T08:00:00.000Z",
"seat": {
"id": "seat_1",
"label": "12A"
},
"bus": {
"id": "bus-1",
"seatsQty": 50,
"registrationNumber": "AA1234BB",
"brand": "Mercedes-Benz",
"model": "Tourismo",
"images": [
{
"id": "img-1",
"url": "https://example.com/bus.jpg",
"name": "Bus exterior"
}
]
},
"carriage": {
"id": "carriage-1",
"name": "ะะฒัะพะฟะฐัะบ โ1",
"phones": [
"+380501234567"
]
},
"route": {
"id": "route-1",
"name": "ะะธัะฒ โ ะะฐััะฐะฒะฐ",
"slug": "kyiv-warsaw",
"description": "ะฉะพะดะตะฝะฝะธะน ะฝััะฝะธะน ัะตะนั",
"company": {
"id": "company-1",
"name": "PrexSell Lines",
"slug": "prexsell-lines",
"ceo": "ะะปะตะฝะฐ ะะพะฒะฐะปั",
"partnerCompany": null,
"logoUrl": "https://example.com/logo.png",
"email": "ops@prexsell-lines.com",
"website": "https://prexsell-lines.com",
"rules": "ะะฐัะฐะถะธั ะผะฐั ะฟัะธะฑััะธ ะทะฐ 20 ั
ะฒะธะปะธะฝ ะดะพ ะฒัะดะฟัะฐะฒะปะตะฝะฝั.",
"socials": [
"https://facebook.com/prexsell.lines"
]
},
"permissions": [
{
"id": "perm-1",
"role": "Agent",
"accesses": [
"book",
"cancel"
],
"type": "Partner"
}
],
"services": [
{
"id": "svc-1",
"name": "Wi-Fi"
},
{
"id": "svc-2",
"name": "ะะพะฝะดะธััะพะฝะตั"
}
]
},
"stops": [
{
"id": "stop-1",
"departureTime": "06:30",
"arrivalTime": null,
"platform": "3",
"arrivalDate": null,
"place": "ะฆะตะฝััะฐะปัะฝะธะน ะฐะฒัะพะฒะพะบะทะฐะป",
"latitude": 50.4501,
"longitude": 30.5234,
"city": {
"id": "city-kyiv",
"name": "ะะธัะฒ",
"slug": "kyiv",
"country": "UA",
"timeZone": "Europe/Kyiv"
}
},
{
"id": "stop-2",
"departureTime": null,
"arrivalTime": "08:00",
"platform": "5",
"arrivalDate": "2026-06-15T08:00:00.000Z",
"place": "Dworzec Zachodni",
"latitude": 52.2297,
"longitude": 21.0122,
"city": {
"id": "city-warsaw",
"name": "ะะฐััะฐะฒะฐ",
"slug": "warsaw",
"country": "PL",
"timeZone": "Europe/Warsaw"
}
}
]
}
]
}
]
}
}
}{
"errors": [
{
"message": "AUTH_INVALID_CREDENTIALS",
"errorCode": "UNAUTHORIZED"
}
]
}{
"errors": [
{
"message": "RESOURCE_NOT_FOUND",
"errorCode": "NOT_FOUND"
}
]
}{
"errors": [
{
"message": "Orders already paid",
"errorCode": "CONFLICT",
"details": {
"ordersIds": [
"ord_1"
]
}
}
]
}Authorizations
Partner API key, sent in the x-api-key request header. Required for bookable offer search and all booking operations. To obtain a key, register as a PREXSELL partner in the backoffice (backoffice.prexsell.com, or staging.backoffice.prexsell.com for staging) and contact support if you need help.
Path Parameters
Booking identifier.
"bkg_1"
Body
Optional action body.
Optional subset of ticket IDs to act on. Must be a subset of the booking's current actor-owned tickets โ any unknown or foreign ID returns 404 (not 403). Defaults to ALL current partner-owned tickets in the booking. Takes precedence over the deprecated orderIds alias when both are supplied.
1Ticket (order) identifier.
["ord_abc"]
DEPRECATED โ use ticketIds. Optional subset of order IDs to act on. Must be a subset of the booking's current actor-owned orders โ any unknown or foreign ID returns 404 (not 403). Defaults to ALL current partner-owned orders in the booking (current-state, not creation-snapshot โ a booking's members change on peel-off).
1Order identifier.
["ord_abc"]
Response
Booking action result (post-write refresh).
Action result (refreshed booking state).
Show child attributes
Show child attributes
