Tracepos Developer HubTracepos Developer Hub
Home
Guide
POS & Integrations
API Reference
Webhooks
Postman Collection
Home
Guide
POS & Integrations
API Reference
Webhooks
Postman Collection
  • POS Terminals & Hardware

    • Smart POS Terminal Integration Guide
  • Platform Integrations

    • E-Commerce & Omnichannel Storefronts
    • Payment Gateways & Settlement Reconciliation
    • Offline & Edge POS Synchronization

E-Commerce & Omnichannel Storefronts

Build custom online storefronts (Next.js, Nuxt, React, Shopify, WooCommerce) powered by real-time inventory and pricing from your Tracepos warehouse branches.


Omnichannel Architecture

When integrating an online storefront with physical retail stores, the biggest challenges are:

  1. Preventing Out-of-Stock Overselling: An in-store customer buys the last item 5 seconds before an online buyer checks out.
  2. Unified Customer Balances: Loyalty points, store credits, and order history must sync between online accounts and brick-and-mortar stores.
  3. Automated Order Dispatch: Online orders should immediately populate fulfillment queues and delivery dispatch screens.

Omnichannel Real-Time Order & Inventory Synchronization


4-Step Omnichannel Flow

1. Fetch Live Products for Online Display

Retrieve items that belong to the active fulfillment warehouse:

curl -X GET "https://app.tracepos.net/api/v1/public/products?limit=50" \
  -H "X-Tracepos-Public-Key: YOUR_PUBLIC_KEY" \
  -H "X-Tracepos-Secret-Key: YOUR_SECRET_KEY" \
  -H "Accept: application/json"

Filter products by category_id or search term to render category and product detail pages.

2. Verify Stock Before Checkout

Before charging the customer's card, verify stock availability:

curl -X GET "https://app.tracepos.net/api/v1/public/products/prod_123" \
  -H "X-Tracepos-Public-Key: YOUR_PUBLIC_KEY" \
  -H "X-Tracepos-Secret-Key: YOUR_SECRET_KEY"

Verify that current_stock >= requested_quantity.

3. Create or Match Customer

Find the customer by phone/email or create a new profile:

curl -X POST "https://app.tracepos.net/api/v1/public/customers" \
  -H "X-Tracepos-Public-Key: YOUR_PUBLIC_KEY" \
  -H "X-Tracepos-Secret-Key: YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Chidinma Okafor",
    "email": "[email protected]",
    "phone": "+2348012345678",
    "address": "Lekki Phase 1, Lagos"
  }'

4. Commit Order & Process Online Payment

Once online payment is confirmed (e.g. via Paystack or Stripe), push the sale to Tracepos:

curl -X POST "https://app.tracepos.net/api/v1/public/sales" \
  -H "X-Tracepos-Public-Key: YOUR_PUBLIC_KEY" \
  -H "X-Tracepos-Secret-Key: YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": 105,
    "order_date": "2026-09-30",
    "invoice_number": "WEB-ORD-88192",
    "shipping": 2500.00,
    "product_items": [
      {
        "product_id": 45,
        "quantity": 1,
        "unit_price": 45000.00
      }
    ],
    "all_payments": [
      {
        "amount": 47500.00,
        "payment_mode_id": 2
      }
    ]
  }'

Real-Time Inventory Sync via Webhooks

Configure a webhook listener for product.updated and sales.created. When an in-store cashier completes a sale, Tracepos emits an event containing the new current_stock. Your storefront updates its cache immediately, preventing overselling.

Next
Payment Gateways & Settlement Reconciliation