Create Flight Order
curl --request POST \
--url https://api.payvessel.com/vaas/api/v1/flight/orders \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-key>' \
--data '
{
"quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"passenger_details": [
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2023-12-25",
"phone_number": "<string>",
"address": "<string>",
"passport_number": "<string>",
"passport_expiry_date": "2023-12-25",
"passport_issuing_authority": "<string>",
"passport_issue_country_code": "<string>",
"email": "<string>",
"gender": "<string>",
"title": "<string>",
"city": "<string>",
"country": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
],
"webhook_url": "<string>"
}
'import requests
url = "https://api.payvessel.com/vaas/api/v1/flight/orders"
payload = {
"quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"passenger_details": [
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2023-12-25",
"phone_number": "<string>",
"address": "<string>",
"passport_number": "<string>",
"passport_expiry_date": "2023-12-25",
"passport_issuing_authority": "<string>",
"passport_issue_country_code": "<string>",
"email": "<string>",
"gender": "<string>",
"title": "<string>",
"city": "<string>",
"country": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
],
"webhook_url": "<string>"
}
headers = {
"api-key": "<api-key>",
"api-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'api-key': '<api-key>',
'api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quote_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reference: '<string>',
passenger_details: [
{
first_name: '<string>',
last_name: '<string>',
middle_name: '<string>',
date_of_birth: '2023-12-25',
phone_number: '<string>',
address: '<string>',
passport_number: '<string>',
passport_expiry_date: '2023-12-25',
passport_issuing_authority: '<string>',
passport_issue_country_code: '<string>',
email: '<string>',
gender: '<string>',
title: '<string>',
city: '<string>',
country: '<string>',
country_code: '<string>',
postal_code: '<string>'
}
],
webhook_url: '<string>'
})
};
fetch('https://api.payvessel.com/vaas/api/v1/flight/orders', 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/vaas/api/v1/flight/orders",
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([
'quote_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reference' => '<string>',
'passenger_details' => [
[
'first_name' => '<string>',
'last_name' => '<string>',
'middle_name' => '<string>',
'date_of_birth' => '2023-12-25',
'phone_number' => '<string>',
'address' => '<string>',
'passport_number' => '<string>',
'passport_expiry_date' => '2023-12-25',
'passport_issuing_authority' => '<string>',
'passport_issue_country_code' => '<string>',
'email' => '<string>',
'gender' => '<string>',
'title' => '<string>',
'city' => '<string>',
'country' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
]
],
'webhook_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>",
"api-secret: <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://api.payvessel.com/vaas/api/v1/flight/orders"
payload := strings.NewReader("{\n \"quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference\": \"<string>\",\n \"passenger_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"<string>\",\n \"address\": \"<string>\",\n \"passport_number\": \"<string>\",\n \"passport_expiry_date\": \"2023-12-25\",\n \"passport_issuing_authority\": \"<string>\",\n \"passport_issue_country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"gender\": \"<string>\",\n \"title\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n ],\n \"webhook_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("api-secret", "<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://api.payvessel.com/vaas/api/v1/flight/orders")
.header("api-key", "<api-key>")
.header("api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference\": \"<string>\",\n \"passenger_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"<string>\",\n \"address\": \"<string>\",\n \"passport_number\": \"<string>\",\n \"passport_expiry_date\": \"2023-12-25\",\n \"passport_issuing_authority\": \"<string>\",\n \"passport_issue_country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"gender\": \"<string>\",\n \"title\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n ],\n \"webhook_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/vaas/api/v1/flight/orders")
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-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference\": \"<string>\",\n \"passenger_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"<string>\",\n \"address\": \"<string>\",\n \"passport_number\": \"<string>\",\n \"passport_expiry_date\": \"2023-12-25\",\n \"passport_issuing_authority\": \"<string>\",\n \"passport_issue_country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"gender\": \"<string>\",\n \"title\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n ],\n \"webhook_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "<string>",
"merchant_reference": "<string>",
"order_reference": "<string>",
"quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency_code": "<string>",
"pricing": {
"currency_code": "<string>",
"base_price": 1,
"service_charge": 1,
"total_amount": 1,
"wallet_reward_on_success": 1
},
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"passengers": [
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"title": "<string>",
"gender": "<string>"
}
],
"completed_datetime": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Flight Booking
Create Flight Order
Charge the wallet and create a flight booking order
POST
/
vaas
/
api
/
v1
/
flight
/
orders
Create Flight Order
curl --request POST \
--url https://api.payvessel.com/vaas/api/v1/flight/orders \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-key>' \
--data '
{
"quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"passenger_details": [
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2023-12-25",
"phone_number": "<string>",
"address": "<string>",
"passport_number": "<string>",
"passport_expiry_date": "2023-12-25",
"passport_issuing_authority": "<string>",
"passport_issue_country_code": "<string>",
"email": "<string>",
"gender": "<string>",
"title": "<string>",
"city": "<string>",
"country": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
],
"webhook_url": "<string>"
}
'import requests
url = "https://api.payvessel.com/vaas/api/v1/flight/orders"
payload = {
"quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"passenger_details": [
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"date_of_birth": "2023-12-25",
"phone_number": "<string>",
"address": "<string>",
"passport_number": "<string>",
"passport_expiry_date": "2023-12-25",
"passport_issuing_authority": "<string>",
"passport_issue_country_code": "<string>",
"email": "<string>",
"gender": "<string>",
"title": "<string>",
"city": "<string>",
"country": "<string>",
"country_code": "<string>",
"postal_code": "<string>"
}
],
"webhook_url": "<string>"
}
headers = {
"api-key": "<api-key>",
"api-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'api-key': '<api-key>',
'api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quote_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reference: '<string>',
passenger_details: [
{
first_name: '<string>',
last_name: '<string>',
middle_name: '<string>',
date_of_birth: '2023-12-25',
phone_number: '<string>',
address: '<string>',
passport_number: '<string>',
passport_expiry_date: '2023-12-25',
passport_issuing_authority: '<string>',
passport_issue_country_code: '<string>',
email: '<string>',
gender: '<string>',
title: '<string>',
city: '<string>',
country: '<string>',
country_code: '<string>',
postal_code: '<string>'
}
],
webhook_url: '<string>'
})
};
fetch('https://api.payvessel.com/vaas/api/v1/flight/orders', 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/vaas/api/v1/flight/orders",
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([
'quote_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reference' => '<string>',
'passenger_details' => [
[
'first_name' => '<string>',
'last_name' => '<string>',
'middle_name' => '<string>',
'date_of_birth' => '2023-12-25',
'phone_number' => '<string>',
'address' => '<string>',
'passport_number' => '<string>',
'passport_expiry_date' => '2023-12-25',
'passport_issuing_authority' => '<string>',
'passport_issue_country_code' => '<string>',
'email' => '<string>',
'gender' => '<string>',
'title' => '<string>',
'city' => '<string>',
'country' => '<string>',
'country_code' => '<string>',
'postal_code' => '<string>'
]
],
'webhook_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>",
"api-secret: <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://api.payvessel.com/vaas/api/v1/flight/orders"
payload := strings.NewReader("{\n \"quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference\": \"<string>\",\n \"passenger_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"<string>\",\n \"address\": \"<string>\",\n \"passport_number\": \"<string>\",\n \"passport_expiry_date\": \"2023-12-25\",\n \"passport_issuing_authority\": \"<string>\",\n \"passport_issue_country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"gender\": \"<string>\",\n \"title\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n ],\n \"webhook_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("api-secret", "<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://api.payvessel.com/vaas/api/v1/flight/orders")
.header("api-key", "<api-key>")
.header("api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference\": \"<string>\",\n \"passenger_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"<string>\",\n \"address\": \"<string>\",\n \"passport_number\": \"<string>\",\n \"passport_expiry_date\": \"2023-12-25\",\n \"passport_issuing_authority\": \"<string>\",\n \"passport_issue_country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"gender\": \"<string>\",\n \"title\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n ],\n \"webhook_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/vaas/api/v1/flight/orders")
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-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reference\": \"<string>\",\n \"passenger_details\": [\n {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"phone_number\": \"<string>\",\n \"address\": \"<string>\",\n \"passport_number\": \"<string>\",\n \"passport_expiry_date\": \"2023-12-25\",\n \"passport_issuing_authority\": \"<string>\",\n \"passport_issue_country_code\": \"<string>\",\n \"email\": \"<string>\",\n \"gender\": \"<string>\",\n \"title\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"country_code\": \"<string>\",\n \"postal_code\": \"<string>\"\n }\n ],\n \"webhook_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "<string>",
"merchant_reference": "<string>",
"order_reference": "<string>",
"quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency_code": "<string>",
"pricing": {
"currency_code": "<string>",
"base_price": 1,
"service_charge": 1,
"total_amount": 1,
"wallet_reward_on_success": 1
},
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"passengers": [
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"title": "<string>",
"gender": "<string>"
}
],
"completed_datetime": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your PayVessel business API key.
Your PayVessel business API secret.
Body
application/json
Unique merchant order reference
Maximum string length:
64Minimum array length:
1Show child attributes
Show child attributes
Webhook URL for order status notifications
Maximum string length:
512⌘I
