Book a Flight
curl --request POST \
--url https://api.payvessel.com/pms/api/external/request/flights/book/ \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-secret>' \
--data '
{
"flightKey": "a1b2c3d4e5f6...",
"contactEmail": "traveller@example.com",
"contactPhone": "08031234567",
"passengers": [
{
"firstName": "Amina",
"lastName": "Ibrahim",
"title": "Mrs",
"dateOfBirth": "1988-03-22",
"gender": "Female",
"passengerType": "Adult",
"nationality": "NGA",
"passportNumber": "A12345678",
"passportExpiryDate": "2030-03-22",
"email": "amina.ibrahim@example.com",
"phoneNumber": "08031234567"
}
]
}
'import requests
url = "https://api.payvessel.com/pms/api/external/request/flights/book/"
payload = {
"flightKey": "a1b2c3d4e5f6...",
"contactEmail": "traveller@example.com",
"contactPhone": "08031234567",
"passengers": [
{
"firstName": "Amina",
"lastName": "Ibrahim",
"title": "Mrs",
"dateOfBirth": "1988-03-22",
"gender": "Female",
"passengerType": "Adult",
"nationality": "NGA",
"passportNumber": "A12345678",
"passportExpiryDate": "2030-03-22",
"email": "amina.ibrahim@example.com",
"phoneNumber": "08031234567"
}
]
}
headers = {
"api-key": "<api-key>",
"api-secret": "<api-secret>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'api-key': '<api-key>',
'api-secret': '<api-secret>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
flightKey: 'a1b2c3d4e5f6...',
contactEmail: 'traveller@example.com',
contactPhone: '08031234567',
passengers: [
{
firstName: 'Amina',
lastName: 'Ibrahim',
title: 'Mrs',
dateOfBirth: '1988-03-22',
gender: 'Female',
passengerType: 'Adult',
nationality: 'NGA',
passportNumber: 'A12345678',
passportExpiryDate: '2030-03-22',
email: 'amina.ibrahim@example.com',
phoneNumber: '08031234567'
}
]
})
};
fetch('https://api.payvessel.com/pms/api/external/request/flights/book/', 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://api.payvessel.com/pms/api/external/request/flights/book/",
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([
'flightKey' => 'a1b2c3d4e5f6...',
'contactEmail' => 'traveller@example.com',
'contactPhone' => '08031234567',
'passengers' => [
[
'firstName' => 'Amina',
'lastName' => 'Ibrahim',
'title' => 'Mrs',
'dateOfBirth' => '1988-03-22',
'gender' => 'Female',
'passengerType' => 'Adult',
'nationality' => 'NGA',
'passportNumber' => 'A12345678',
'passportExpiryDate' => '2030-03-22',
'email' => 'amina.ibrahim@example.com',
'phoneNumber' => '08031234567'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"api-key: <api-key>",
"api-secret: <api-secret>"
],
]);
$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://api.payvessel.com/pms/api/external/request/flights/book/"
payload := strings.NewReader("{\n \"flightKey\": \"a1b2c3d4e5f6...\",\n \"contactEmail\": \"traveller@example.com\",\n \"contactPhone\": \"08031234567\",\n \"passengers\": [\n {\n \"firstName\": \"Amina\",\n \"lastName\": \"Ibrahim\",\n \"title\": \"Mrs\",\n \"dateOfBirth\": \"1988-03-22\",\n \"gender\": \"Female\",\n \"passengerType\": \"Adult\",\n \"nationality\": \"NGA\",\n \"passportNumber\": \"A12345678\",\n \"passportExpiryDate\": \"2030-03-22\",\n \"email\": \"amina.ibrahim@example.com\",\n \"phoneNumber\": \"08031234567\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("api-secret", "<api-secret>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.payvessel.com/pms/api/external/request/flights/book/")
.header("api-key", "<api-key>")
.header("api-secret", "<api-secret>")
.header("Content-Type", "<content-type>")
.body("{\n \"flightKey\": \"a1b2c3d4e5f6...\",\n \"contactEmail\": \"traveller@example.com\",\n \"contactPhone\": \"08031234567\",\n \"passengers\": [\n {\n \"firstName\": \"Amina\",\n \"lastName\": \"Ibrahim\",\n \"title\": \"Mrs\",\n \"dateOfBirth\": \"1988-03-22\",\n \"gender\": \"Female\",\n \"passengerType\": \"Adult\",\n \"nationality\": \"NGA\",\n \"passportNumber\": \"A12345678\",\n \"passportExpiryDate\": \"2030-03-22\",\n \"email\": \"amina.ibrahim@example.com\",\n \"phoneNumber\": \"08031234567\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/pms/api/external/request/flights/book/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["api-secret"] = '<api-secret>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"flightKey\": \"a1b2c3d4e5f6...\",\n \"contactEmail\": \"traveller@example.com\",\n \"contactPhone\": \"08031234567\",\n \"passengers\": [\n {\n \"firstName\": \"Amina\",\n \"lastName\": \"Ibrahim\",\n \"title\": \"Mrs\",\n \"dateOfBirth\": \"1988-03-22\",\n \"gender\": \"Female\",\n \"passengerType\": \"Adult\",\n \"nationality\": \"NGA\",\n \"passportNumber\": \"A12345678\",\n \"passportExpiryDate\": \"2030-03-22\",\n \"email\": \"amina.ibrahim@example.com\",\n \"phoneNumber\": \"08031234567\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Flight booked successfully",
"data": {
"reference": "FLT-A1B2C3D4E5F6",
"booking": {
"bookingId": "BK-20260820-98765",
"status": "BOOKED",
"airline": "Arik Air",
"flightNumber": "W3 204",
"origin": "LOS",
"destination": "ABV",
"departureTime": "2026-08-20T06:30:00",
"passengers": [
{
"firstName": "Amina",
"lastName": "Ibrahim",
"passengerType": "Adult"
}
]
}
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Flight Booking
Book a Flight
Confirm a flight booking with passenger details
POST
/
pms
/
api
/
external
/
request
/
flights
/
book
/
Book a Flight
curl --request POST \
--url https://api.payvessel.com/pms/api/external/request/flights/book/ \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-secret>' \
--data '
{
"flightKey": "a1b2c3d4e5f6...",
"contactEmail": "traveller@example.com",
"contactPhone": "08031234567",
"passengers": [
{
"firstName": "Amina",
"lastName": "Ibrahim",
"title": "Mrs",
"dateOfBirth": "1988-03-22",
"gender": "Female",
"passengerType": "Adult",
"nationality": "NGA",
"passportNumber": "A12345678",
"passportExpiryDate": "2030-03-22",
"email": "amina.ibrahim@example.com",
"phoneNumber": "08031234567"
}
]
}
'import requests
url = "https://api.payvessel.com/pms/api/external/request/flights/book/"
payload = {
"flightKey": "a1b2c3d4e5f6...",
"contactEmail": "traveller@example.com",
"contactPhone": "08031234567",
"passengers": [
{
"firstName": "Amina",
"lastName": "Ibrahim",
"title": "Mrs",
"dateOfBirth": "1988-03-22",
"gender": "Female",
"passengerType": "Adult",
"nationality": "NGA",
"passportNumber": "A12345678",
"passportExpiryDate": "2030-03-22",
"email": "amina.ibrahim@example.com",
"phoneNumber": "08031234567"
}
]
}
headers = {
"api-key": "<api-key>",
"api-secret": "<api-secret>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'api-key': '<api-key>',
'api-secret': '<api-secret>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
flightKey: 'a1b2c3d4e5f6...',
contactEmail: 'traveller@example.com',
contactPhone: '08031234567',
passengers: [
{
firstName: 'Amina',
lastName: 'Ibrahim',
title: 'Mrs',
dateOfBirth: '1988-03-22',
gender: 'Female',
passengerType: 'Adult',
nationality: 'NGA',
passportNumber: 'A12345678',
passportExpiryDate: '2030-03-22',
email: 'amina.ibrahim@example.com',
phoneNumber: '08031234567'
}
]
})
};
fetch('https://api.payvessel.com/pms/api/external/request/flights/book/', 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://api.payvessel.com/pms/api/external/request/flights/book/",
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([
'flightKey' => 'a1b2c3d4e5f6...',
'contactEmail' => 'traveller@example.com',
'contactPhone' => '08031234567',
'passengers' => [
[
'firstName' => 'Amina',
'lastName' => 'Ibrahim',
'title' => 'Mrs',
'dateOfBirth' => '1988-03-22',
'gender' => 'Female',
'passengerType' => 'Adult',
'nationality' => 'NGA',
'passportNumber' => 'A12345678',
'passportExpiryDate' => '2030-03-22',
'email' => 'amina.ibrahim@example.com',
'phoneNumber' => '08031234567'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"api-key: <api-key>",
"api-secret: <api-secret>"
],
]);
$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://api.payvessel.com/pms/api/external/request/flights/book/"
payload := strings.NewReader("{\n \"flightKey\": \"a1b2c3d4e5f6...\",\n \"contactEmail\": \"traveller@example.com\",\n \"contactPhone\": \"08031234567\",\n \"passengers\": [\n {\n \"firstName\": \"Amina\",\n \"lastName\": \"Ibrahim\",\n \"title\": \"Mrs\",\n \"dateOfBirth\": \"1988-03-22\",\n \"gender\": \"Female\",\n \"passengerType\": \"Adult\",\n \"nationality\": \"NGA\",\n \"passportNumber\": \"A12345678\",\n \"passportExpiryDate\": \"2030-03-22\",\n \"email\": \"amina.ibrahim@example.com\",\n \"phoneNumber\": \"08031234567\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("api-secret", "<api-secret>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.payvessel.com/pms/api/external/request/flights/book/")
.header("api-key", "<api-key>")
.header("api-secret", "<api-secret>")
.header("Content-Type", "<content-type>")
.body("{\n \"flightKey\": \"a1b2c3d4e5f6...\",\n \"contactEmail\": \"traveller@example.com\",\n \"contactPhone\": \"08031234567\",\n \"passengers\": [\n {\n \"firstName\": \"Amina\",\n \"lastName\": \"Ibrahim\",\n \"title\": \"Mrs\",\n \"dateOfBirth\": \"1988-03-22\",\n \"gender\": \"Female\",\n \"passengerType\": \"Adult\",\n \"nationality\": \"NGA\",\n \"passportNumber\": \"A12345678\",\n \"passportExpiryDate\": \"2030-03-22\",\n \"email\": \"amina.ibrahim@example.com\",\n \"phoneNumber\": \"08031234567\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/pms/api/external/request/flights/book/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["api-secret"] = '<api-secret>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"flightKey\": \"a1b2c3d4e5f6...\",\n \"contactEmail\": \"traveller@example.com\",\n \"contactPhone\": \"08031234567\",\n \"passengers\": [\n {\n \"firstName\": \"Amina\",\n \"lastName\": \"Ibrahim\",\n \"title\": \"Mrs\",\n \"dateOfBirth\": \"1988-03-22\",\n \"gender\": \"Female\",\n \"passengerType\": \"Adult\",\n \"nationality\": \"NGA\",\n \"passportNumber\": \"A12345678\",\n \"passportExpiryDate\": \"2030-03-22\",\n \"email\": \"amina.ibrahim@example.com\",\n \"phoneNumber\": \"08031234567\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Flight booked successfully",
"data": {
"reference": "FLT-A1B2C3D4E5F6",
"booking": {
"bookingId": "BK-20260820-98765",
"status": "BOOKED",
"airline": "Arik Air",
"flightNumber": "W3 204",
"origin": "LOS",
"destination": "ABV",
"departureTime": "2026-08-20T06:30:00",
"passengers": [
{
"firstName": "Amina",
"lastName": "Ibrahim",
"passengerType": "Adult"
}
]
}
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Headers
Your PayVessel public API key
Your PayVessel API secret
Available options:
application/json Body
application/json
⌘I
