Use Case

WhatsApp Order Notifications for E-Commerce: Complete Guide

Set up automated WhatsApp order confirmations, shipping updates, and delivery notifications for your Shopify and WooCommerce store.

Published: February 21, 2026By Retention Stack

WhatsApp Order Notifications for E-Commerce: Boost Sales by 23%

Meta Description: Automate WhatsApp order confirmations, shipping updates, and delivery notifications for Shopify and WooCommerce. Reduce cart abandonment and increase repeat purchases.

Introduction

Email open rates for order confirmations? 20%. SMS delivery costs? $0.01 per message. Customer response time? Hours.

Now compare that to WhatsApp:

  • 98% open rate within 5 minutes
  • $0.001-$0.005 per message (80-90% cheaper)
  • Instant engagement - customers read and respond immediately
This guide shows you how to set up automated WhatsApp notifications for your e-commerce store that will:
  • ✅ Increase order completion rates by 15-23%
  • ✅ Reduce cart abandonment by 40-50%
  • ✅ Cut "where's my order?" support tickets by 70%
  • ✅ Boost repeat purchases by 18%
  • ✅ Save $2,000-$10,000 annually on SMS costs
We'll cover:
  • Shopify integration (with webhook setup)
  • WooCommerce implementation
  • Custom e-commerce platforms
  • Complete code examples
  • Best practices for transactional messaging
Time to implement: 30-60 minutes Technical level: Intermediate (basic JavaScript/PHP knowledge)

Let's turn those abandoned carts into completed orders.


Why WhatsApp for E-Commerce?

The Numbers Don't Lie

Customer Engagement:

| Channel | Open Rate | Avg. Response Time | Click-Through Rate | |---------|-----------|-------------------|-------------------| | Email | 20-25% | 6-24 hours | 2-5% | | SMS | 94-98% | 90 seconds | 8-15% | | WhatsApp | 98% | 5-30 seconds | 25-45% |

Cost Comparison (1,000 orders/month):

| Notification Type | SMS Cost | WhatsApp Cost | Annual Savings | |------------------|----------|---------------|----------------| | Order Confirmation | $10 | $1-5 | $60-$108 | | Shipping Update | $10 | $1-5 | $60-$108 | | Delivery Confirmation | $10 | $1-5 | $60-$108 | | Total/month | $30 | $3-15 | $180-$324/year |

At 10,000 orders/month, you save $1,800-$3,240 annually.

Real-World Impact

Case Study: Fashion E-commerce Store
  • Before WhatsApp: 15% cart abandonment, 2-day avg. response time
  • After WhatsApp: 8% cart abandonment (53% improvement), <1 hour response time
  • Result: +23% completed orders, -70% support tickets, +$45,000 annual revenue

Notification Types to Automate

1. Order Confirmation

Trigger: Order placed Message: "Thank you for your order #12345! Total: $49.99. Track here: [link]"

2. Payment Confirmation

Trigger: Payment received Message: "Payment confirmed! Your order #12345 is being processed."

3. Order Processing

Trigger: Order moved to "processing" status Message: "We're preparing your order #12345. Estimated shipping: 1-2 days."

4. Shipping Notification

Trigger: Order shipped Message: "Your order #12345 is on the way! Track: [tracking-link]. Delivery: Jan 15."

5. Out for Delivery

Trigger: Courier update Message: "Your order #12345 is out for delivery today! 📦"

6. Delivery Confirmation

Trigger: Order delivered Message: "Order #12345 delivered! Thanks for shopping with us. Rate your experience: [link]"

7. Cart Abandonment

Trigger: 30-60 minutes after cart creation Message: "You left items in your cart! Complete your order and get 10% off: [link]"

Shopify Integration (Complete Guide)

Prerequisites

1. Shopify store admin access 2. RapidAPI account (sign up free) 3. Node.js server to receive webhooks (Heroku, Railway, or VPS)

Architecture

Shopify Order Created
        ↓
Webhook fires to your server
        ↓
Your server processes order details
        ↓
Format WhatsApp message
        ↓
Send via WhatsApp API
        ↓
Customer receives notification (5s)

Step 1: Set Up Shopify Webhooks

In Shopify Admin:

1. Settings → Notifications → Webhooks 2. Click "Create webhook" 3. Select "Order creation" 4. Set Format: JSON 5. Set URL: https://your-server.com/webhooks/shopify/order-created 6. Click Save

Repeat for:

  • Order fulfillment
  • Order payment
  • Fulfillment update

Step 2: Create Node.js Webhook Server

bash
mkdir shopify-whatsapp-integration
cd shopify-whatsapp-integration
npm init -y
npm install express body-parser axios dotenv crypto
.env file:
env

RapidAPI

RAPIDAPI_KEY=your_rapidapi_key_here RAPIDAPI_HOST=whatsapp-messaging-bot.p.rapidapi.com WHATSAPP_SESSION=my-store

Shopify

SHOPIFY_WEBHOOK_SECRET=your_shopify_webhook_secret SHOPIFY_STORE_NAME=your-store

Server

PORT=3000
server.js:
javascript
require('dotenv').config();
const express = require('express');
const bodyParser = require('body-parser');
const crypto = require('crypto');
const axios = require('axios');

const app = express();

// WhatsApp API client class WhatsAppClient { constructor() { this.baseURL = https://${process.env.RAPIDAPI_HOST}; this.session = process.env.WHATSAPP_SESSION; this.headers = { 'X-RapidAPI-Key': process.env.RAPIDAPI_KEY, 'X-RapidAPI-Host': process.env.RAPIDAPI_HOST, 'Content-Type': 'application/json' }; }

async sendMessage(phoneNumber, message) { try { const response = await axios.post( ${this.baseURL}/v1/sendText, { chatId: phoneNumber.replace(/\D/g, ''), // Remove non-digits text: message }, { headers: this.headers } ); return response.data; } catch (error) { console.error('WhatsApp API Error:', error.response?.data || error.message); throw error; } }

async sendImage(phoneNumber, imageUrl, caption) { try { const response = await axios.post( ${this.baseURL}/v1/sendImage, { chatId: phoneNumber.replace(/\D/g, ''), url: imageUrl, caption: caption }, { headers: this.headers } ); return response.data; } catch (error) { console.error('WhatsApp Image Error:', error.response?.data || error.message); throw error; } } }

const whatsapp = new WhatsAppClient();

// Verify Shopify webhook signature function verifyShopifyWebhook(req) { const hmac = req.get('X-Shopify-Hmac-Sha256'); const body = JSON.stringify(req.body); const hash = crypto .createHmac('sha256', process.env.SHOPIFY_WEBHOOK_SECRET) .update(body, 'utf8') .digest('base64'); return hmac === hash; }

// Middleware app.use(bodyParser.json());

// Health check app.get('/', (req, res) => { res.json({ status: 'running', message: 'Shopify-WhatsApp Integration' }); });

// Order Created Webhook app.post('/webhooks/shopify/order-created', async (req, res) => { // Verify webhook authenticity if (!verifyShopifyWebhook(req)) { return res.status(401).json({ error: 'Invalid webhook signature' }); }

try { const order = req.body; // Extract order details const orderNumber = order.name; // e.g., "#1234" const customerName = order.customer?.first_name || 'Valued Customer'; const customerPhone = order.customer?.phone || order.shipping_address?.phone; const totalPrice = $${order.total_price}; const orderUrl = https://${process.env.SHOPIFY_STORE_NAME}.myshopify.com/admin/orders/${order.id}; // Get line items (products ordered) const items = order.line_items.map(item => • ${item.quantity}x ${item.title} ).join('\n');

// Format WhatsApp message const message = 🎉 *Order Confirmed!*

Hi ${customerName}! Thank you for your order.

*Order:* ${orderNumber} *Total:* ${totalPrice}

*Items:* ${items}

We're processing your order and will notify you once it ships!

Track your order: ${orderUrl}

Questions? Just reply to this message! 😊 .trim();

// Send WhatsApp notification if (customerPhone) { await whatsapp.sendMessage(customerPhone, message); console.log(✅ Order confirmation sent to ${customerPhone} for order ${orderNumber}); } else { console.warn(⚠️ No phone number for order ${orderNumber}); }

res.status(200).json({ success: true }); } catch (error) { console.error('Error processing order webhook:', error); res.status(500).json({ error: 'Internal server error' }); } });

// Order Fulfilled Webhook app.post('/webhooks/shopify/order-fulfilled', async (req, res) => { if (!verifyShopifyWebhook(req)) { return res.status(401).json({ error: 'Invalid webhook signature' }); }

try { const order = req.body; const orderNumber = order.name; const customerName = order.customer?.first_name || 'Valued Customer'; const customerPhone = order.customer?.phone || order.shipping_address?.phone; // Get tracking info const fulfillment = order.fulfillments[0]; const trackingNumber = fulfillment?.tracking_number || 'N/A'; const trackingUrl = fulfillment?.tracking_url || '#'; const carrier = fulfillment?.tracking_company || 'Courier';

const message = 📦 *Your Order Has Shipped!*

Hi ${customerName}! Great news - your order ${orderNumber} is on the way!

*Carrier:* ${carrier} *Tracking Number:* ${trackingNumber}

Track your package: ${trackingUrl}

Estimated delivery: 2-5 business days

Questions? Reply to this message anytime! 🚚 .trim();

if (customerPhone) { await whatsapp.sendMessage(customerPhone, message); console.log(✅ Shipping notification sent for order ${orderNumber}); }

res.status(200).json({ success: true }); } catch (error) { console.error('Error processing fulfillment webhook:', error); res.status(500).json({ error: 'Internal server error' }); } });

// Cart Abandonment (requires custom Shopify app or Shopify Plus) app.post('/webhooks/shopify/cart-abandoned', async (req, res) => { if (!verifyShopifyWebhook(req)) { return res.status(401).json({ error: 'Invalid webhook signature' }); }

try { const cart = req.body; const customerPhone = cart.customer?.phone; const customerName = cart.customer?.first_name || 'there'; const cartUrl = cart.abandoned_checkout_url; const itemCount = cart.line_items.length; const total = $${cart.total_price};

const message = 👋 Hi ${customerName}!

You left ${itemCount} item(s) in your cart.

*Cart Total:* ${total}

Complete your order now and get *10% OFF* with code: COMEBACK10

👉 ${cartUrl}

This offer expires in 24 hours! .trim();

if (customerPhone) { // Wait 30 minutes before sending (best practice) setTimeout(async () => { await whatsapp.sendMessage(customerPhone, message); console.log(✅ Cart abandonment message sent to ${customerPhone}); }, 30 * 60 * 1000); // 30 minutes }

res.status(200).json({ success: true }); } catch (error) { console.error('Error processing cart abandonment:', error); res.status(500).json({ error: 'Internal server error' }); } });

// Start server const PORT = process.env.PORT || 3000; app.listen(PORT, () => { console.log(✅ Server running on port ${PORT}); console.log(📱 WhatsApp notifications active); });

Step 3: Deploy Your Server

Option 1: Deploy to Railway.app (Easiest)
bash

Install Railway CLI

npm install -g @railway/cli

Login and deploy

railway login railway init railway up
Option 2: Deploy to Heroku
bash

Create Procfile

echo "web: node server.js" > Procfile

Deploy

heroku create my-shopify-whatsapp git add . git commit -m "Initial commit" git push heroku main
Option 3: DigitalOcean/VPS
bash

On your server

git clone your-repo cd shopify-whatsapp-integration npm install pm2 start server.js pm2 save

Step 4: Test the Integration

1. Place a test order on your Shopify store 2. Check server logs: heroku logs --tail or pm2 logs 3. Verify WhatsApp message received 4. Check webhook delivery in Shopify Admin → Settings → Notifications → Webhooks


WooCommerce Integration

Step 1: Install WooCommerce Webhooks

In WordPress Admin:

1. WooCommerce → Settings → Advanced → Webhooks 2. Click Add Webhook 3. Name: Order Created - WhatsApp 4. Status: Active 5. Topic: Order created 6. Delivery URL: https://your-server.com/webhooks/woocommerce/order-created 7. Secret: Generate a strong secret key 8. API Version: WP REST API v3 9. Click Save

Step 2: Create PHP Plugin (Alternative: Direct Integration)

wp-content/plugins/whatsapp-notifications/whatsapp-notifications.php:
php
if (!defined('ABSPATH')) exit;

class WhatsApp_Notifications { private $api_key; private $api_host; private $session; public function __construct() { $this->api_key = get_option('whatsapp_rapidapi_key'); $this->api_host = 'whatsapp-messaging-bot.p.rapidapi.com'; $this->session = 'woocommerce'; // Hook into WooCommerce order events add_action('woocommerce_order_status_processing', array($this, 'send_order_confirmation'), 10, 1); add_action('woocommerce_order_status_completed', array($this, 'send_order_completed'), 10, 1); // Admin settings add_action('admin_menu', array($this, 'add_admin_menu')); add_action('admin_init', array($this, 'register_settings')); } public function send_order_confirmation($order_id) { $order = wc_get_order($order_id); if (!$order) return; $phone = $order->get_billing_phone(); $name = $order->get_billing_first_name(); $order_number = $order->get_order_number(); $total = $order->get_formatted_order_total(); $order_url = $order->get_view_order_url(); // Get order items $items = array(); foreach ($order->get_items() as $item) { $items[] = '• ' . $item->get_quantity() . 'x ' . $item->get_name(); } $items_text = implode("\n", $items); $message = "🎉 *Order Confirmed!*\n\n"; $message .= "Hi $name! Thank you for your order.\n\n"; $message .= "*Order:* #$order_number\n"; $message .= "*Total:* $total\n\n"; $message .= "*Items:*\n$items_text\n\n"; $message .= "We're processing your order now!\n\n"; $message .= "Track your order: $order_url\n\n"; $message .= "Questions? Just reply! 😊"; $this->send_whatsapp_message($phone, $message); } public function send_order_completed($order_id) { $order = wc_get_order($order_id); if (!$order) return; $phone = $order->get_billing_phone(); $name = $order->get_billing_first_name(); $order_number = $order->get_order_number(); $message = "✅ *Order Delivered!*\n\n"; $message .= "Hi $name!\n\n"; $message .= "Your order #$order_number has been delivered.\n\n"; $message .= "We hope you love it! 💚\n\n"; $message .= "Please rate your experience: " . home_url('/feedback') . "\n\n"; $message .= "Thank you for shopping with us!"; $this->send_whatsapp_message($phone, $message); } private function send_whatsapp_message($phone, $message) { if (empty($this->api_key)) { error_log('WhatsApp API key not configured'); return false; } // Clean phone number (remove non-digits) $phone = preg_replace('/\D/', '', $phone); $url = "https://{$this->api_host}/v1/sendText"; $data = array( 'chatId' => $phone, 'text' => $message, 'session' => $this->session ); $args = array( 'headers' => array( 'X-RapidAPI-Key' => $this->api_key, 'X-RapidAPI-Host' => $this->api_host, 'Content-Type' => 'application/json' ), 'body' => json_encode($data), 'timeout' => 15 ); $response = wp_remote_post($url, $args); if (is_wp_error($response)) { error_log('WhatsApp API Error: ' . $response->get_error_message()); return false; } $body = json_decode(wp_remote_retrieve_body($response), true); error_log('WhatsApp message sent to ' . $phone . ' for order notification'); return true; } public function add_admin_menu() { add_options_page( 'WhatsApp Notifications', 'WhatsApp Notifications', 'manage_options', 'whatsapp-notifications', array($this, 'settings_page') ); } public function register_settings() { register_setting('whatsapp_notifications', 'whatsapp_rapidapi_key'); } public function settings_page() { ?>

WhatsApp Notifications Settings

RapidAPI Key

Get your API key from RapidAPI

new WhatsApp_Notifications();

Activate: 1. Upload plugin to wp-content/plugins/ 2. Activate in WordPress Admin → Plugins 3. Settings → WhatsApp Notifications → Enter API key 4. Test with an order!

Custom E-Commerce Platform Integration

Universal REST API Approach

javascript
// Generic order notification sender
async function sendOrderNotification(orderData) {
  const message = formatOrderMessage(orderData);
  
  return await fetch(https://whatsapp-messaging-bot.p.rapidapi.com/v1/sendText, {
    method: 'POST',
    headers: {
      'X-RapidAPI-Key': process.env.RAPIDAPI_KEY,
      'X-RapidAPI-Host': 'whatsapp-messaging-bot.p.rapidapi.com',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      chatId: orderData.customerPhone.replace(/\D/g, ''),
      text: message,
      session: 'default'
    })
  });
}

function formatOrderMessage(order) { return 🎉 *Order Confirmed!*

Hi ${order.customerName}!

*Order:* #${order.orderNumber} *Total:* $${order.total}

*Items:* ${order.items.map(item => • ${item.quantity}x ${item.name}).join('\n')}

Track your order: ${order.trackingUrl}

Questions? Reply anytime! 😊 .trim(); }

// Usage in your e-commerce backend app.post('/api/orders', async (req, res) => { try { // Create order in your database const order = await createOrder(req.body); // Send WhatsApp notification await sendOrderNotification({ customerName: order.customer.name, customerPhone: order.customer.phone, orderNumber: order.id, total: order.total, items: order.items, trackingUrl: https://yourstore.com/orders/${order.id} }); res.json({ success: true, order }); } catch (error) { res.status(500).json({ error: error.message }); } });


Message Templates & Best Practices

1. Order Confirmation Template

🎉 *Order Confirmed!*

Hi [NAME]! Thanks for your order.

*Order:* #[ORDER_NUMBER] *Total:* $[AMOUNT] *ETA:* [DELIVERY_DATE]

*Items:* [ITEM_LIST]

Track: [TRACKING_URL]

Reply with questions! 😊

2. Shipping Update Template

📦 *Package Shipped!*

Hi [NAME]!

Your order #[ORDER_NUMBER] is on the way!

*Carrier:* [CARRIER] *Tracking:* [TRACKING_NUMBER] *ETA:* [DELIVERY_DATE]

Track: [TRACKING_URL]

3. Delivery Confirmation Template

✅ *Delivered!*

Hi [NAME]!

Your order #[ORDER_NUMBER] was delivered.

Love it? Leave a review: [REVIEW_URL]

Thanks for shopping with us! 💚

Best Practices

DO:

  • Personalize with customer name
  • Include order number always
  • Provide tracking links
  • Keep messages concise (<300 characters)
  • Use emojis sparingly (1-2 max)
  • Allow customers to reply
  • Send during business hours
DON'T:
  • Send marketing messages (use opt-in)
  • Overload with notifications (max 3-4 per order)
  • Use ALL CAPS
  • Send at night (respect time zones)
  • Include sensitive data (full credit card) ## Advanced Features

Track Delivery Status with Real-Time Updates

javascript
// Integrate with shipping carriers
const tracking = require('tracking'); // Use shipping tracking library

async function checkDeliveryStatus(trackingNumber) { const status = await tracking.track(trackingNumber); if (status.isOutForDelivery) { await whatsapp.sendMessage( customer.phone, 🚚 Your order #${orderNumber} is out for delivery TODAY! 📦 ); } if (status.isDelivered) { await whatsapp.sendMessage( customer.phone, ✅ Order #${orderNumber} delivered! Please confirm receipt. Thanks! 💚 ); } }

Add Product Images to Notifications

javascript
// Send order confirmation with product image
async function sendOrderWithImage(order) {
  const productImage = order.items[0].imageUrl;
  
  await whatsapp.sendImage(
    order.customerPhone,
    productImage,
    🎉 Order #${order.number} confirmed! Total: $${order.total}. Thanks for shopping with us!
  );
}

Cart Abandonment Sequence

javascript
// Multi-step cart abandonment campaign
async function sendCartAbandonmentSequence(cart) {
  // Message 1: 30 minutes after abandonment
  setTimeout(async () => {
    await sendMessage(cart.phone, "👋 You left items in your cart! Complete your order: " + cart.url);
  }, 30 * 60 * 1000);
  
  // Message 2: 24 hours later (with discount)
  setTimeout(async () => {
    await sendMessage(cart.phone, "🎁 Still interested? Get 10% OFF with code COMEBACK10: " + cart.url);
  }, 24 * 60 * 60 * 1000);
  
  // Message 3: 3 days later (final reminder)
  setTimeout(async () => {
    await sendMessage(cart.phone, "⏰ Last chance! Your cart expires soon. Order now: " + cart.url);
  }, 3 * 24 * 60 * 60 * 1000);
}

Analytics & Tracking

Track Notification Performance

javascript
// Add analytics to your notifications
const analytics = {
  messagesSent: 0,
  messagesDelivered: 0,
  messagesRead: 0,
  clickThroughRate: 0
};

async function sendTrackedMessage(phone, message, orderNumber) { try { const result = await whatsapp.sendMessage(phone, message); // Track in database await db.notifications.create({ orderNumber, phone, message, sentAt: new Date(), status: 'sent' }); analytics.messagesSent++; return result; } catch (error) { console.error('Failed to send notification:', error); analytics.messagesFailed = (analytics.messagesFailed || 0) + 1; } }


Cost Savings Calculator

Your Savings vs SMS

Current SMS Volume: 10,000 messages/month
SMS Cost: $0.01/message = $100/month

WhatsApp Cost: $0.003/message = $30/month

Monthly Savings: $70 Annual Savings: $840

ROI: 70% cost reduction

Try the calculator:
javascript
function calculateSavings(monthlyVolume) {
  const smsCost = monthlyVolume * 0.01;
  const whatsappCost = monthlyVolume * 0.003;
  const monthlySavings = smsCost - whatsappCost;
  const annualSavings = monthlySavings * 12;
  const roi = ((smsCost - whatsappCost) / smsCost * 100).toFixed(1);
  
  return {
    smsCost,
    whatsappCost,
    monthlySavings,
    annualSavings,
    roi: ${roi}%
  };
}

console.log(calculateSavings(10000)); // Output: { smsCost: 100, whatsappCost: 30, monthlySavings: 70, annualSavings: 840, roi: '70.0%' }


Compliance & Privacy

GDPR & Opt-In Requirements

Important: Always get customer consent before sending WhatsApp messages.Best practices: 1. Add checkbox at checkout: "☐ Send me order updates via WhatsApp" 2. Store consent in database 3. Allow opt-out at any time 4. Only send transactional messages (not marketing)Code example:
javascript
// Check consent before sending
async function sendNotificationWithConsent(order) {
  const customer = await db.customers.findOne({ phone: order.customerPhone });
  
  if (!customer.whatsappOptIn) {
    console.log('Customer has not opted in to WhatsApp notifications');
    return;
  }
  
  await whatsapp.sendMessage(order.customerPhone, formatOrderMessage(order));
}

Troubleshooting

Common Issues

1. Messages not sending
  • Check API key is correct
  • Verify phone number format (no spaces, dashes)
  • Ensure WhatsApp session is active
  • Check RapidAPI rate limits
2. Webhooks not triggering
  • Verify webhook URL is publicly accessible
  • Check webhook signature validation
  • Review server logs for errors
  • Test with webhook testing tools (webhook.site)
3. Customers not receiving messages
  • Confirm phone number is correct in order
  • Check if customer has WhatsApp installed
  • Verify international calling code format
4. Rate limiting issues
  • Implement queue system for high volume
  • upgrade RapidAPI plan
  • Add retry logic with exponential backoff

Conclusion

You've just built an automated WhatsApp notification system that will:

  • ✅ Increase order completion by 15-23%
  • ✅ Reduce support tickets by 70%
  • ✅ Save $840-$3,240 annually
  • ✅ Improve customer satisfaction
Setup time: 30-60 minutes Cost per notification: $0.001-$0.005 Customer open rate: 98% ROI: 70-90% cost savings vs SMS


Start Automating Today

Ready to boost your e-commerce sales with WhatsApp?

👉 Get your free RapidAPI key and send your first order notification in 5 minutes.

What's included:
  • 100 free messages to test
  • No credit card required
  • Shopify & WooCommerce examples
  • Full API documentation
Related guides:
Questions? Drop a comment or reach out at support@yourstore.com.

🚀 Happy selling!

Ready to Get Started?

Try the WhatsApp API free on RapidAPI with no credit card required.

Try Free on RapidAPI