WooCommerce Guides

WooCommerce REST API & Webhooks: 15 Integration Problems and How to Fix Them

Troubleshoot WooCommerce REST API and webhook integrations with practical guidance on retries, idempotency, HPOS, authentication, duplicate events, logging and recovery.

A WooCommerce API integration can look healthy while quietly losing data. Orders may reach an ERP twice, stock updates may arrive out of sequence, webhooks may disable themselves after repeated failures, or an integration may break after a WooCommerce update even though checkout still works normally.

In 2026, this matters more because WooCommerce integrations increasingly sit between stores, ERPs, CRMs, fulfillment platforms, marketplaces, analytics systems and automation services. WooCommerce 11.x also continues to evolve API behavior, while High-Performance Order Storage (HPOS) has changed assumptions that older integrations made about order data.

This guide explains how to build and troubleshoot reliable WooCommerce REST API and webhook integrations, with practical patterns for authentication, retries, idempotency, HPOS compatibility, logging and failure recovery.

REST API or webhooks: use each for the right job

The WooCommerce REST API and webhooks solve different parts of an integration.

The REST API is request-driven. Your application asks WooCommerce for data or sends a command: retrieve an order, update stock, create a product or change an order status. For new integrations, WooCommerce currently recommends the /wp-json/wc/v3/ API.

Webhooks are event-driven. WooCommerce sends a notification when something happens, such as an order being created or updated. That makes them useful when an external system needs to react quickly without polling the store every few minutes.

A robust architecture commonly uses both: webhooks notify the integration that something changed, and the REST API retrieves or updates authoritative data when necessary.

1. Start with a clear source of truth

Before writing endpoints, decide which system owns each field. This prevents the most common integration design failure: two systems continuously overwriting each other.

For example, an ERP might own SKU, stock and base price, while WooCommerce owns marketing descriptions, product galleries and merchandising categories. Orders may originate in WooCommerce but receive fulfillment status from the ERP.

If both systems can edit the same value, define an explicit conflict policy. “Latest update wins” sounds simple, but it can fail when queues are delayed or clocks differ.

For a broader architecture discussion, see our WooCommerce ERP integration guide.

2. Use the current WooCommerce REST API

WooCommerce’s current REST API is v3. New integrations should use the supported wc/v3 endpoints rather than building against the old Legacy REST API.

This is especially important for HPOS. WooCommerce has warned that the Legacy REST API is not compatible with HPOS, and the legacy path has already been separated from WooCommerce core into a dedicated extension.

If you inherit an old integration, identify the actual endpoints before changing anything. A system can appear to be a “WooCommerce API integration” while still calling legacy routes that were designed years ago.

3. Test REST API accessibility before debugging application code

If every API request fails, first verify that WordPress REST endpoints are reachable. Security plugins, custom code and hosting firewalls can restrict /wp-json/. WooCommerce also requires a permalink structure other than Plain for its REST API.

Check infrastructure before rewriting authentication code. A 403 generated by a firewall and a 401 generated by bad credentials are different problems and should not be debugged as if they were the same.

For production integrations, use HTTPS. API credentials grant meaningful access to store data and should not travel over an unencrypted connection.

4. Give API keys only the permissions they need

WooCommerce REST API keys can be configured for read, write, or read/write access. Avoid giving a reporting integration write access when it only reads orders. Likewise, avoid sharing one key between unrelated integrations.

Separate credentials make rotation and incident response easier. If a warehouse connector is compromised, you can revoke its key without taking down accounting, reporting and marketplace integrations at the same time.

Store secrets outside source code and never expose consumer secrets in frontend JavaScript.

5. Verify webhook signatures

WooCommerce webhooks can include a secret used to generate an HMAC-SHA256 signature of the request body. The receiving application should verify that signature before trusting the payload.

Do not treat a publicly reachable webhook URL as proof that a request came from WooCommerce. Anyone who discovers the endpoint can send HTTP requests to it.

Signature verification should happen before the payload triggers business actions such as creating an invoice, reserving inventory or sending an order to fulfillment.

6. Make every write idempotent

Retries are unavoidable in distributed systems. Networks time out, workers restart and APIs temporarily return errors. Therefore, processing the same event twice must not create two invoices, two shipments or two ERP orders.

Use a stable external identifier or idempotency record. For an order export, this might combine the WooCommerce order ID with the operation type. Before creating the ERP order, check whether that operation has already completed.

Do not use “the webhook arrived once” as your deduplication strategy. Reliable systems assume duplicate delivery is possible.

7. Acknowledge webhooks quickly and process heavy work asynchronously

A webhook receiver should validate the request, persist enough information to process it safely, enqueue the job and respond quickly. Avoid performing a slow ERP transaction, generating documents and calling three external APIs before returning the HTTP response.

Long synchronous processing increases timeout risk. The sender may interpret a timeout as failure even if your application eventually completes the work, creating the conditions for duplicate processing.

A queue also gives you controlled retries, rate limiting and better visibility into failed jobs.

8. Understand WooCommerce webhook failure behavior

WooCommerce tracks webhook deliveries and stores recent delivery logs. Current WooCommerce documentation states that after five consecutive deliveries return a non-2xx HTTP response, the webhook is disabled.

This can produce a particularly confusing failure: the external service has recovered, but new events no longer arrive because WooCommerce stopped sending them.

When investigating missing events, check webhook status as well as application logs. A healthy receiver cannot process notifications that WooCommerce has already disabled.

9. Use retries with backoff, not infinite immediate loops

Retry transient failures such as timeouts, connection resets, rate limits and many 5xx responses. Do not blindly retry every 4xx response. A malformed request will remain malformed no matter how quickly you send it again.

Use exponential backoff with a maximum retry count. After the final attempt, move the job to a failed state or dead-letter queue and alert someone.

The retry record should contain the operation, object ID, attempt count, last error, next retry time and enough context to reproduce the failure safely.

10. Reconcile data even when webhooks are enabled

Webhooks are excellent for near-real-time updates, but they should not be the only mechanism protecting business-critical synchronization.

Run a scheduled reconciliation process. For example, compare orders modified during the previous 24 hours against the ERP and repair anything missing. For inventory, compare a controlled batch of SKUs or use a changed-since marker if the source system supports one.

This turns a missed webhook from permanent data loss into a recoverable delay.

11. Design for HPOS instead of querying WordPress posts directly

High-Performance Order Storage stores WooCommerce orders in dedicated tables. Custom integrations that bypass WooCommerce APIs and query or update wp_posts and wp_postmeta directly are therefore fragile.

WooCommerce 10.7 disabled HPOS “sync on read” by default. That change matters to older code that writes directly to posts tables and previously depended on WooCommerce to synchronize those writes back into HPOS.

Use WooCommerce CRUD APIs and supported REST endpoints for order operations. If an inherited plugin directly manipulates order posts, treat that as technical debt that needs an HPOS compatibility review.

12. Do not assume every numeric ID is an order

WooCommerce 10.8 tightened order endpoint validation. Updating /wc/v3/orders/{id} now returns HTTP 400 when the supplied ID is not actually a shop_order.

This fixes dangerous older behavior where integrations could accidentally send another post type, such as a subscription, through the order endpoint.

Integration code should therefore validate object type and use the endpoint belonging to that resource. A subscription is not simply an order with a different label.

13. Log enough to reconstruct a failure

“API error” is not an actionable log entry. For each integration operation, record a correlation ID, direction, resource type, WooCommerce ID, external ID where available, endpoint or operation name, HTTP status, attempt number and a sanitized response summary.

Never log secrets, complete authorization headers or unnecessary customer data.

Correlation IDs are especially useful when one order passes through several systems. They let you trace the same operation across WooCommerce, middleware and the ERP without searching by timestamps alone.

14. Monitor business outcomes, not only HTTP uptime

An endpoint returning HTTP 200 does not prove that synchronization is correct. Monitor business-level signals such as orders waiting too long for export, products with stale stock timestamps, jobs repeatedly retried, webhook status changes and discrepancies found during reconciliation.

This distinction catches “green but broken” integrations where the infrastructure responds successfully while data is incomplete or mapped incorrectly.

15. Test WooCommerce upgrades against the integration

API behavior evolves. For example, WooCommerce 10.8 changed order ID validation, WooCommerce 10.7 changed HPOS sync behavior, and WooCommerce 11.1 introduced another REST API endpoint for refund calculations.

Before major WooCommerce upgrades, test the integration on staging with representative orders, products, refunds, variations and failure scenarios. Confirm both outbound webhooks and inbound API calls.

Do not limit testing to “can I fetch an order?” A real integration test should cover create/update flows, duplicate delivery, authentication failure, temporary remote failure, delayed jobs and recovery.

A reliable WooCommerce integration architecture

For a typical WooCommerce-to-ERP integration, a practical flow looks like this:

  1. WooCommerce emits an order webhook.
  2. The receiver verifies the HMAC signature.
  3. The event is recorded with an idempotency key.
  4. The receiver returns a successful response quickly.
  5. A background worker loads the authoritative order data.
  6. The order is transformed into the ERP schema.
  7. The worker sends it to the ERP.
  8. The external ID and synchronization result are stored.
  9. Transient failures retry with backoff.
  10. A scheduled reconciliation job detects anything missed.

The same architecture works for CRM, warehouse, accounting and fulfillment integrations with different mapping rules.

Common symptoms and where to look first

Orders stopped reaching the external system

Check whether the webhook is still active, inspect recent delivery responses, then check the receiver queue. Repeated non-2xx responses can disable the webhook.

Every order appears twice

Check for duplicate webhook registrations and missing idempotency. Also verify that a scheduled poller is not independently exporting the same orders without a shared synchronization record.

The REST API returns 401 or 403

Verify credentials and permissions, but also check security plugins, reverse proxies and server firewalls. Determine which layer generated the response before changing application code.

Integration broke after enabling HPOS

Audit for direct access to wp_posts or wp_postmeta and for legacy API dependencies. Migrate order access to WooCommerce CRUD or supported REST APIs.

Stock keeps reverting

You probably have conflicting ownership or two synchronization paths. Identify every process that can write stock and choose one authoritative source.

FAQ

What WooCommerce REST API version should a new integration use?

WooCommerce currently recommends REST API v3 under /wp-json/wc/v3/ for new integrations.

Are WooCommerce webhooks guaranteed to arrive only once?

Do not design around that assumption. Receivers should be idempotent so a repeated event cannot duplicate a business action.

Should I use polling or webhooks?

Use webhooks for timely event notification and scheduled polling or reconciliation as a safety net. For business-critical synchronization, the combination is generally more resilient than either approach alone.

Why did my WooCommerce webhook stop automatically?

WooCommerce can disable a webhook after repeated failed deliveries. Check its status and delivery logs, fix the receiving endpoint, then re-enable it.

Does HPOS break the WooCommerce REST API?

No. Supported WooCommerce APIs abstract order storage. Problems usually occur in custom code or old integrations that directly read or write WordPress post tables or depend on legacy behavior.

Build integrations for recovery, not perfect networks

A dependable WooCommerce integration is not one that never encounters an error. It is one that detects errors, retries the right failures, prevents duplicates, reconciles missed data and gives developers enough evidence to diagnose what happened.

If your store needs an ERP, CRM, fulfillment or custom API workflow, see our WooCommerce development services. For larger B2B and manufacturing architectures, our WooCommerce for manufacturers guide covers the surrounding catalog and operational decisions.

Need a WooCommerce workflow that off-the-shelf plugins do not cover?

We build custom WooCommerce integrations, catalog logic, admin workflows and business-specific automation.

Explore custom WooCommerce development