Skip to main content
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
}
'
{
  "status": "success",
  "message": "Order placed successfully",
  "data": {
    "id": 501,
    "orderStatus": "pending",
    "paymentStatus": "pending",
    "reference": "ORD-501-ABCDE"
  }
}
Places a new checkout order for customer purchases. This endpoint performs strict validation checks, including:
  1. Verifies that the customer’s name contains only letters and spaces (Zod regex validation).
  2. Validates that the customer’s phone number is a valid Nigerian format (supports prefix variants e.g. 080..., 234..., +234...).
  3. Checks product inventory levels (ensuring products or variants have sufficient stock).
  4. Records the customer details and updates inventory logs dynamically.

Authorizations

X-Shop-API-Key
string
required
Your Publishable Key (pk_live_... or pk_test_...) generated from the Developer settings in your dashboard.

Path Parameters

shopId
string
required
The unique UUID of the shop.

Request Body

customerName
string
required
Full name of the customer. Must contain only letters and spaces, at least 2 characters.
customerPhoneNumber
string
required
Contact phone number. Must be a valid Nigerian number format.
customerEmail
string
Email address.
customerAddress
string
required
Physical shipping address. Minimum 5 characters.
currencyId
number
required
Currency ID reference.
totalPrice
number
required
Total price in Kobo (e.g. 1200000 for ₦12,000.00).
orders
array
required
List of order items. Each item must contain productId, variantId (or null), and orderProductQty (min 1).
paymentChannel
string
required
Method used: bank_transfer, cash_on_delivery, or card.
saveCustomer
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"
  }
}