Platform
Chatbot Builder Bulk Messaging Team Inbox Mini CRM API & Webhooks AI Integration WhatsApp Flows
Industries
E-commerce & D2C Real Estate Education Healthcare Finance & BFSI Logistics Hospitality Retail
Integrations
Learn
Learning Hub Help & Docs Connect Guides Automation Codex Blog Message Templates
Pricing Get Started →
HomeConnect › Connect WooCommerce to WhatsApp
WooCommerce Integration Guide · E-commerce

Connect WooCommerce to WhatsApp

Pull live order data from your WooCommerce store into a WhatsApp chatbot. When a customer sends their order number, your bot calls the WooCommerce REST API, retrieves the current status and total, and replies instantly, with no support agent required.

Published 22 June 2026  ·  8 min read  ·  E-commerce

Before following this guide, read the External API Request step foundation guide. It explains every field in the step interface so this guide can stay focused on WooCommerce-specific values.

Step 1: Generate your WooCommerce API keys

WooCommerce uses a Consumer Key and Consumer Secret pair for API access. These are generated inside your WordPress dashboard.

1
In your WordPress admin, go to WooCommerce > Settings > Advanced > REST API.
2
Click Add Key. Enter a description (e.g. "WA.Expert Integration"), select a WordPress user with order access, set Permissions to Read.
3
Click Generate API Key. You will see your Consumer Key (starts ck_) and Consumer Secret (starts cs_).
4
Copy both values now. The Consumer Secret is shown only once and cannot be retrieved again.
Consumer Secret shown once only

WooCommerce displays the Consumer Secret exactly once when you generate the key. If you navigate away before copying it, you must delete the key and generate a new one. Store both values in a password manager immediately.

Official docs

WooCommerce REST API Keys: developer.woocommerce.com/docs/apis/rest-api/authentication

Step 2: Fill in the External API Request step

In your WA.Expert chatbot flow, collect the customer's order ID (the numeric ID from their confirmation email, not the #1012 style number). Store it as {{order_id}}. Then add an External API Request step:

External API Request Step — WA.Expert
Select Method
GET
Request URL
https://yourstore.com/wp-json/wc/v3/orders/{{{{order_id}}}}
Select Auth Type
Basic Auth
Username: your Consumer Key (ck_...) | Password: your Consumer Secret (cs_...)
Header Parameters
Content-Typeapplication/json
Select Body Type
None (GET requests carry no body)
Choose Response Type
JSON

Field-by-field breakdown

FieldValueNotes
Select MethodGETReading an existing order.
Request URLhttps://yourstore.com/wp-json/wc/v3/orders/{{{order_id}}}Replace yourstore.com with your actual domain. {{{order_id}}} is the variable from the previous chatbot step.
Select Auth TypeBasic AuthWooCommerce uses HTTP Basic Authentication. WA.Expert's Basic Auth option Base64-encodes the key:secret pair automatically.
Username (Basic Auth)ck_xxxxxxxxxxxxxxxxYour Consumer Key, copied from WooCommerce > Settings > Advanced > REST API.
Password (Basic Auth)cs_xxxxxxxxxxxxxxxxYour Consumer Secret. Treat this like a password. Never share it or put it in client-side code.
Content-Typeapplication/jsonInclude on all WooCommerce API requests.
Select Body TypeNoneGET requests carry no body.
Choose Response TypeJSONWooCommerce returns structured JSON.
Order ID vs order number

The API URL takes a numeric order ID (e.g. 1547), not the customer-facing order number (#1012). To look up by the human-readable number, search first: GET /wp-json/wc/v3/orders?number=1012 and extract the id field from the result.

Pretty permalinks required

The WooCommerce REST API only works when WordPress pretty permalinks are enabled. Go to WordPress Settings > Permalinks and choose any option other than Plain. Default (plain) permalinks return a 404 on API routes.

Step 3: Map the response to WhatsApp variables

A successful WooCommerce order response looks like this:

WooCommerce REST API v3 — GET /wp-json/wc/v3/orders/{id} response (abbreviated)
{
  "id": 1547,
  "number": "1012",
  "status": "processing",
  "date_created": "2026-06-20T10:30:00",
  "total": "1299.00",
  "currency": "INR",
  "billing": {
    "first_name": "Priya",
    "last_name": "Sharma",
    "phone": "9820000001",
    "city": "Mumbai"
  },
  "line_items": [
    {
      "name": "Classic Cotton Kurta",
      "quantity": 2,
      "total": "1299.00"
    }
  ],
  "shipping_lines": [
    {
      "method_title": "Free Shipping"
    }
  ]
}

Map these response paths to variables in the External API Request step:

Variable nameResponse pathExample value
order_numbernumber1012
order_statusstatusprocessing
order_totaltotal1299.00
customer_namebilling.first_namePriya
item_nameline_items[0].nameClassic Cotton Kurta
item_qtyline_items[0].quantity2
shipping_methodshipping_lines[0].method_titleFree Shipping

WooCommerce order status values: pending, processing, on-hold, completed, cancelled, refunded, failed. Map these to human-readable labels in your bot reply.

Keep the WhatsApp reply in the free service window

If the customer messaged you first within the last 24 hours, your reply is a free service conversation. Send the order status in that window. If initiating a proactive update (e.g. dispatch alert), use an approved Utility template at Rs. 0.115 per message.

Worked example: order status chatbot

Chatbot flow — WooCommerce order lookup
1. Bot: "Please send your WooCommerce order ID.
   You can find it in your confirmation email. It is a number like 1547."

2. Customer replies: 1547

3. Bot stores value as {{order_id}}

4. External API Request step fires:
   GET https://yourstore.com/wp-json/wc/v3/orders/1547
   Auth: Basic ck_xxx:cs_xxx

5. Response mapped:
   order_number   = "1012"
   order_status   = "processing"
   order_total    = "1299.00"
   customer_name  = "Priya"
   item_name      = "Classic Cotton Kurta"

6. Bot replies:
   "Hi Priya, here is your order update:
   Order #1012
   Status: Processing
   Item: Classic Cotton Kurta
   Total: Rs. 1,299.00

   Your order is being prepared. You will get
   a dispatch notification shortly."

Troubleshooting

SymptomLikely causeFix
401 UnauthorizedWrong Consumer Key or SecretRe-check both values. The ck_ and cs_ must match the same key pair. Generate a new key if the secret was lost.
404 Not Found on /wp-json/wc/v3/Pretty permalinks disabledGo to WordPress Settings > Permalinks, choose any option other than Plain, save.
404 on /orders/{id}Order ID does not existConfirm the customer sent a numeric ID, not the # order number. Add a fallback branch for empty responses.
'Consumer key is missing' errorServer not parsing Authorization headerAdd keys as query string instead: ?consumer_key=ck_xxx&consumer_secret=cs_xxx
403 ForbiddenKey has insufficient permissionThe key was created with Read-only but the endpoint needs more. For order lookup, Read is sufficient. Check you are not accidentally calling a write endpoint.
ModSecurity 501 errorServer firewall blockingContact your host to whitelist the REST API path, or switch to query string auth.

Common questions

Where do I find my WooCommerce API keys?
+
Go to WooCommerce > Settings > Advanced > REST API. Click Add Key, give it a description, select a WordPress user with order access, set permission to Read, then click Generate API Key. The Consumer Key and Consumer Secret appear once. Copy both before leaving the page.
What WooCommerce permission level do I need for order lookup?
+
Read permission is sufficient for order status lookup. If you also need to update order status (e.g. mark as processing after payment), you need Read/Write permission. Never grant Write access unless the integration genuinely needs it.
Why does WooCommerce use Basic Auth and not a single token like Shopify?
+
WooCommerce uses the WordPress REST API infrastructure, which implements HTTP Basic Authentication. Your Consumer Key acts as the username and Consumer Secret as the password. WA.Expert's Basic Auth option handles the Base64 encoding automatically.
The customer gives me an order number like #1012. Does that work in the URL?
+
No. The WooCommerce REST API uses a numeric order ID (e.g. 1547), not the human-readable order number (#1012). Search first: GET /wp-json/wc/v3/orders?number=1012 to get the numeric ID, then fetch /orders/{id}.
Will this work on any WordPress hosting?
+
It works on any host where pretty permalinks are enabled (Settings > Permalinks: choose any option other than Plain). Some ModSecurity-protected servers block certain methods but GET requests work fine. If you see 'Consumer key is missing', add keys as query string parameters instead.
Does this incur extra WA.Expert charges?
+
The External API Request step counts as one automation action per lookup. On the Complete plan this is included. On Starter, extra action packs apply from Rs. 49 per 1,000 actions. The WooCommerce REST API is free with no per-call charges.

Build your WooCommerce order bot today

Free trial, no credit card required. And if you ever get stuck, we are the only platform in India that answers you live on WhatsApp.

Start Free Trial → Book a Demo
1