Create eSIM Order
curl --request POST \
--url https://api.payvessel.com/vaas/api/v1/esim/orders \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-key>' \
--data '
{
"reference": "<string>",
"package_code": "<string>"
}
'import requests
url = "https://api.payvessel.com/vaas/api/v1/esim/orders"
payload = {
"reference": "<string>",
"package_code": "<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({reference: '<string>', package_code: '<string>'})
};
fetch('https://api.payvessel.com/vaas/api/v1/esim/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/esim/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([
'reference' => '<string>',
'package_code' => '<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/esim/orders"
payload := strings.NewReader("{\n \"reference\": \"<string>\",\n \"package_code\": \"<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/esim/orders")
.header("api-key", "<api-key>")
.header("api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"<string>\",\n \"package_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/vaas/api/v1/esim/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 \"reference\": \"<string>\",\n \"package_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"provider_order_no": "<string>",
"package_code": "<string>",
"package_slug": "<string>",
"package_name": "<string>",
"location": "<string>",
"currency_code": "<string>",
"quantity": 123,
"amount_usd": 123,
"amount_naira": 123,
"error_message": "<string>",
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z",
"completed_datetime": "2023-11-07T05:31:56Z",
"profiles": [
{
"esim_tran_no": "<string>",
"order_no": "<string>",
"imsi": "<string>",
"iccid": "<string>",
"sms_status": 123,
"msisdn": "<string>",
"ac": "<string>",
"qr_code_url": "<string>",
"short_url": "<string>",
"smdp_status": "<string>",
"eid": "<string>",
"active_type": 123,
"data_type": 123,
"activate_time": "<string>",
"installation_time": "<string>",
"expired_time": "<string>",
"total_volume": 123,
"total_duration": 123,
"duration_unit": "<string>",
"order_usage": 123,
"esim_status": "<string>",
"pin": "<string>",
"puk": "<string>",
"apn": "<string>",
"ip_export": "<string>",
"support_top_up_type": 123,
"fup_policy": "<string>",
"packages": [
{
"package_code": "<string>",
"package_name": "<string>",
"slug": "<string>",
"duration": 123,
"volume": 123,
"location_code": "<string>",
"create_time": "<string>"
}
]
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}eSIM
Create eSIM Order
Create an eSIM order and charge the merchant wallet
POST
/
vaas
/
api
/
v1
/
esim
/
orders
Create eSIM Order
curl --request POST \
--url https://api.payvessel.com/vaas/api/v1/esim/orders \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-key>' \
--data '
{
"reference": "<string>",
"package_code": "<string>"
}
'import requests
url = "https://api.payvessel.com/vaas/api/v1/esim/orders"
payload = {
"reference": "<string>",
"package_code": "<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({reference: '<string>', package_code: '<string>'})
};
fetch('https://api.payvessel.com/vaas/api/v1/esim/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/esim/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([
'reference' => '<string>',
'package_code' => '<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/esim/orders"
payload := strings.NewReader("{\n \"reference\": \"<string>\",\n \"package_code\": \"<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/esim/orders")
.header("api-key", "<api-key>")
.header("api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"<string>\",\n \"package_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/vaas/api/v1/esim/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 \"reference\": \"<string>\",\n \"package_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"provider_order_no": "<string>",
"package_code": "<string>",
"package_slug": "<string>",
"package_name": "<string>",
"location": "<string>",
"currency_code": "<string>",
"quantity": 123,
"amount_usd": 123,
"amount_naira": 123,
"error_message": "<string>",
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z",
"completed_datetime": "2023-11-07T05:31:56Z",
"profiles": [
{
"esim_tran_no": "<string>",
"order_no": "<string>",
"imsi": "<string>",
"iccid": "<string>",
"sms_status": 123,
"msisdn": "<string>",
"ac": "<string>",
"qr_code_url": "<string>",
"short_url": "<string>",
"smdp_status": "<string>",
"eid": "<string>",
"active_type": 123,
"data_type": 123,
"activate_time": "<string>",
"installation_time": "<string>",
"expired_time": "<string>",
"total_volume": 123,
"total_duration": 123,
"duration_unit": "<string>",
"order_usage": 123,
"esim_status": "<string>",
"pin": "<string>",
"puk": "<string>",
"apn": "<string>",
"ip_export": "<string>",
"support_top_up_type": 123,
"fup_policy": "<string>",
"packages": [
{
"package_code": "<string>",
"package_name": "<string>",
"slug": "<string>",
"duration": 123,
"volume": 123,
"location_code": "<string>",
"create_time": "<string>"
}
]
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your PayVessel business API key.
Your PayVessel business API secret.
Body
application/json
⌘I
