Submit Checkout Order
curl --request POST \
--url https://api.sabivendor.com/api/v1/storefront/shop/{shopId}/orders \
--header 'Content-Type: application/json' \
--header 'X-Shop-API-Key: <x-shop-api-key>' \
--data '
{
"customerName": "<string>",
"customerPhoneNumber": "<string>",
"customerEmail": "<string>",
"customerAddress": "<string>",
"currencyId": 123,
"totalPrice": 123,
"orders": [
{}
],
"paymentChannel": "<string>",
"saveCustomer": true
}
'import requests
url = "https://api.sabivendor.com/api/v1/storefront/shop/{shopId}/orders"
payload = {
"customerName": "<string>",
"customerPhoneNumber": "<string>",
"customerEmail": "<string>",
"customerAddress": "<string>",
"currencyId": 123,
"totalPrice": 123,
"orders": [{}],
"paymentChannel": "<string>",
"saveCustomer": True
}
headers = {
"X-Shop-API-Key": "<x-shop-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Shop-API-Key': '<x-shop-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerName: '<string>',
customerPhoneNumber: '<string>',
customerEmail: '<string>',
customerAddress: '<string>',
currencyId: 123,
totalPrice: 123,
orders: [{}],
paymentChannel: '<string>',
saveCustomer: true
})
};
fetch('https://api.sabivendor.com/api/v1/storefront/shop/{shopId}/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.sabivendor.com/api/v1/storefront/shop/{shopId}/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([
'customerName' => '<string>',
'customerPhoneNumber' => '<string>',
'customerEmail' => '<string>',
'customerAddress' => '<string>',
'currencyId' => 123,
'totalPrice' => 123,
'orders' => [
[
]
],
'paymentChannel' => '<string>',
'saveCustomer' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Shop-API-Key: <x-shop-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.sabivendor.com/api/v1/storefront/shop/{shopId}/orders"
payload := strings.NewReader("{\n \"customerName\": \"<string>\",\n \"customerPhoneNumber\": \"<string>\",\n \"customerEmail\": \"<string>\",\n \"customerAddress\": \"<string>\",\n \"currencyId\": 123,\n \"totalPrice\": 123,\n \"orders\": [\n {}\n ],\n \"paymentChannel\": \"<string>\",\n \"saveCustomer\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Shop-API-Key", "<x-shop-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.sabivendor.com/api/v1/storefront/shop/{shopId}/orders")
.header("X-Shop-API-Key", "<x-shop-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerName\": \"<string>\",\n \"customerPhoneNumber\": \"<string>\",\n \"customerEmail\": \"<string>\",\n \"customerAddress\": \"<string>\",\n \"currencyId\": 123,\n \"totalPrice\": 123,\n \"orders\": [\n {}\n ],\n \"paymentChannel\": \"<string>\",\n \"saveCustomer\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sabivendor.com/api/v1/storefront/shop/{shopId}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Shop-API-Key"] = '<x-shop-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerName\": \"<string>\",\n \"customerPhoneNumber\": \"<string>\",\n \"customerEmail\": \"<string>\",\n \"customerAddress\": \"<string>\",\n \"currencyId\": 123,\n \"totalPrice\": 123,\n \"orders\": [\n {}\n ],\n \"paymentChannel\": \"<string>\",\n \"saveCustomer\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Order placed successfully",
"data": {
"id": 501,
"orderStatus": "pending",
"paymentStatus": "pending",
"reference": "ORD-501-ABCDE"
}
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"customerPhoneNumber"
],
"message": "Invalid Nigerian phone number. Use format: 08012345678, 2348012345678, or +2348012345678"
},
{
"path": [
"customerName"
],
"message": "Full name can only contain letters and spaces"
}
]
}
Orders & Checkout
Submit Checkout Order
POST
/
api
/
v1
/
storefront
/
shop
/
{shopId}
/
orders
Submit Checkout Order
curl --request POST \
--url https://api.sabivendor.com/api/v1/storefront/shop/{shopId}/orders \
--header 'Content-Type: application/json' \
--header 'X-Shop-API-Key: <x-shop-api-key>' \
--data '
{
"customerName": "<string>",
"customerPhoneNumber": "<string>",
"customerEmail": "<string>",
"customerAddress": "<string>",
"currencyId": 123,
"totalPrice": 123,
"orders": [
{}
],
"paymentChannel": "<string>",
"saveCustomer": true
}
'import requests
url = "https://api.sabivendor.com/api/v1/storefront/shop/{shopId}/orders"
payload = {
"customerName": "<string>",
"customerPhoneNumber": "<string>",
"customerEmail": "<string>",
"customerAddress": "<string>",
"currencyId": 123,
"totalPrice": 123,
"orders": [{}],
"paymentChannel": "<string>",
"saveCustomer": True
}
headers = {
"X-Shop-API-Key": "<x-shop-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Shop-API-Key': '<x-shop-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerName: '<string>',
customerPhoneNumber: '<string>',
customerEmail: '<string>',
customerAddress: '<string>',
currencyId: 123,
totalPrice: 123,
orders: [{}],
paymentChannel: '<string>',
saveCustomer: true
})
};
fetch('https://api.sabivendor.com/api/v1/storefront/shop/{shopId}/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.sabivendor.com/api/v1/storefront/shop/{shopId}/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([
'customerName' => '<string>',
'customerPhoneNumber' => '<string>',
'customerEmail' => '<string>',
'customerAddress' => '<string>',
'currencyId' => 123,
'totalPrice' => 123,
'orders' => [
[
]
],
'paymentChannel' => '<string>',
'saveCustomer' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Shop-API-Key: <x-shop-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.sabivendor.com/api/v1/storefront/shop/{shopId}/orders"
payload := strings.NewReader("{\n \"customerName\": \"<string>\",\n \"customerPhoneNumber\": \"<string>\",\n \"customerEmail\": \"<string>\",\n \"customerAddress\": \"<string>\",\n \"currencyId\": 123,\n \"totalPrice\": 123,\n \"orders\": [\n {}\n ],\n \"paymentChannel\": \"<string>\",\n \"saveCustomer\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Shop-API-Key", "<x-shop-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.sabivendor.com/api/v1/storefront/shop/{shopId}/orders")
.header("X-Shop-API-Key", "<x-shop-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerName\": \"<string>\",\n \"customerPhoneNumber\": \"<string>\",\n \"customerEmail\": \"<string>\",\n \"customerAddress\": \"<string>\",\n \"currencyId\": 123,\n \"totalPrice\": 123,\n \"orders\": [\n {}\n ],\n \"paymentChannel\": \"<string>\",\n \"saveCustomer\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sabivendor.com/api/v1/storefront/shop/{shopId}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Shop-API-Key"] = '<x-shop-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerName\": \"<string>\",\n \"customerPhoneNumber\": \"<string>\",\n \"customerEmail\": \"<string>\",\n \"customerAddress\": \"<string>\",\n \"currencyId\": 123,\n \"totalPrice\": 123,\n \"orders\": [\n {}\n ],\n \"paymentChannel\": \"<string>\",\n \"saveCustomer\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Order placed successfully",
"data": {
"id": 501,
"orderStatus": "pending",
"paymentStatus": "pending",
"reference": "ORD-501-ABCDE"
}
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"customerPhoneNumber"
],
"message": "Invalid Nigerian phone number. Use format: 08012345678, 2348012345678, or +2348012345678"
},
{
"path": [
"customerName"
],
"message": "Full name can only contain letters and spaces"
}
]
}
Places a new checkout order for customer purchases. This endpoint performs strict validation checks, including:
- Verifies that the customer’s name contains only letters and spaces (Zod regex validation).
- Validates that the customer’s phone number is a valid Nigerian format (supports prefix variants e.g.
080...,234...,+234...). - Checks product inventory levels (ensuring products or variants have sufficient stock).
- Records the customer details and updates inventory logs dynamically.
Authorizations
string
required
Your Publishable Key (
pk_live_... or pk_test_...) generated from the Developer settings in your dashboard.Path Parameters
string
required
The unique UUID of the shop.
Request Body
string
required
Full name of the customer. Must contain only letters and spaces, at least 2 characters.
string
required
Contact phone number. Must be a valid Nigerian number format.
string
Email address.
string
required
Physical shipping address. Minimum 5 characters.
number
required
Currency ID reference.
number
required
Total price in Kobo (e.g.
1200000 for ₦12,000.00).array
required
List of order items. Each item must contain
productId, variantId (or null), and orderProductQty (min 1).string
required
Method used:
bank_transfer, cash_on_delivery, or card.boolean
default:"false"
Toggles whether this profile should be added to the customer database.
{
"status": "success",
"message": "Order placed successfully",
"data": {
"id": 501,
"orderStatus": "pending",
"paymentStatus": "pending",
"reference": "ORD-501-ABCDE"
}
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"customerPhoneNumber"
],
"message": "Invalid Nigerian phone number. Use format: 08012345678, 2348012345678, or +2348012345678"
},
{
"path": [
"customerName"
],
"message": "Full name can only contain letters and spaces"
}
]
}
⌘I