VulCode

WooCommerce integration with ERP, Allegro and couriers

WooCommerce orders reach the ERP and warehouse, stock and prices flow back to the store, and invoices go to KSeF. Through the REST API and webhooks, and where it makes sense, through a custom plugin in the store.

E-commerce platforms
A WooCommerce order's way in the integration panel: webhook, queue, the Subiekt document, the KSeF invoice and the PDF in the customer account
The order in the shop's customer account on a phone, with the invoice and its KSeF number

The REST API from outside or a plugin inside the store

WooCommerce offers both routes. The choice depends on where the logic should run.

Your server
WordPress with WooCommerce
WooCommerce
cartordersdelivery methods

Orders in HPOS, the default in new stores from version 8.2.

WooCommerce hooks

A custom WooCommerce plugin

Sees: the cart, order fields, delivery methods and rules you cannot set from outside

When to take it
  • The change should show in the store itself: cart, order fields, delivery methods.
  • You need rules that cannot be set from outside.

A plugin built on WooCommerce hooks, with code in a repository and tests before updates. We write it on the WooCommerce order API, never with direct table queries.

/wp-json/wc/v3REST API and webhooks

An integration through the REST API

Sees: orders, products, stock and prices through the API, with a consumer key

When to take it
  • Data flows to a system outside the store: ERP, warehouse, B2B panel.
  • You want WordPress updates to leave the integration alone.
  • The integration should run even when the store is under load.

A service next to the store: the REST API for reads and writes, webhooks for events. A consumer key and secret over HTTPS, separate for the integration and with minimal permissions.

  • ERP
  • Warehouse
  • B2B panel

A WooCommerce webhook you can trust

WooCommerce signs every webhook. This is its way through the receiver before it changes anything in the ERP.

Where it drops out and why

Delivery from WooCommerce

the order.created webhook
  • Stops: An answer other than 2xx, 301 or 302

    It counts as failed. After more than five in a row WooCommerce disables the webhook, so monitoring checks that it is active.

Signature

X-WC-Webhook-Signature

HMAC-SHA256 of the raw body, keyed with the webhook secret, in Base64, compared in constant time.

  • Stops: A signature mismatch

    We reject it. Such a webhook changes nothing in the ERP.

Reply and queue

the integration

The 200 reply goes at once, and the event waits in a queue.

  • Takes another way: Handled in the background

    Writing to the ERP does not delay the reply, so the delivery never counts as failed.

Written to the ERP

e.g. Subiekt nexo PRO

The event from the queue becomes an order in the ERP.

    At the end

    The order in the ERP

    Nobody retypes orders into the ERP.

    A big catalogue, a slow store

    Integrations with big WooCommerce stores often slow them down more than customer traffic. We guard against that.

    Stock from Subiekt to WooCommerce in the integration panel: changes only, batch requests of 100 products and a control read with the total headers

    One request is one WordPress boot

    One by one286

    286 requests for 286 changed products

    In batches4

    4 requests: 100, 100 and 80 products and 6 variants

    • Changes onlyA full catalogue import every hour loads the database. Only what changed goes to the store.
    • Batches of 100Batch operations take up to 100 objects by default, so stock and prices go in batches of 100.
    • Totals from headersThe read sets per_page and reads X-WP-Total and X-WP-TotalPages instead of guessing the page count.

    What we connect WooCommerce to

    The most common connections. Each has its own page.

    WooCommerce

    REST API and webhooks

    Subiekt GT and nexo

    Both ways
    • Documents, stock and prices.
    • Orders arrive with the order.created webhook and status changes.
    • Stock comes back after a warehouse document, in batches of up to 100 products per request.

    Comarch Optima

    Both ways
    • Orders and settlements.
    • Prices after a price list change in the ERP.
    • Products and variants after a new item in the catalogue.

    Allegro

    Both ways
    • Shared stock and orders.
    • The ERP runs stock, and the store and Allegro receive it.

    Couriers

    Both ways
    • Points, labels, statuses.
    • The status and tracking number come back to the order after goods out and dispatch.

    Payments

    Into WooCommerce
    • Gateway plugins or a custom integration.

    KSeF

    Out of WooCommerce
    • Invoices from orders.
    • The invoice with its KSeF number reaches the shop customer account as a PDF.

    How we will do it: WooCommerce with Subiekt and Allegro

    The rollout, step by step.

    Starting point
    Store
    WooCommerce with a few thousand products
    ERP
    Subiekt nexo PRO with a warehouse
    Channels
    The store and Allegro
    1. PZ 118/2026 in Subiekt
      WKR-18V-2A: 23 → 47
      store: 47, Allegro: 47

      One source of stock

      Subiekt runs stock. The store and Allegro only receive it.

    2. order.created, signature valid
      ZK 386/2026 in Subiekt

      Orders from webhooks

      New orders arrive by signed webhook and reach Subiekt through a queue.

    3. POST products/batch: 100
      POST products/batch: 100
      POST products/batch: 80
      POST products/1840/variations/batch: 6

      Stock in batches

      We collect stock changes and send them in batches of 100 so the store stays fast.

    4. FS 1093/2026 accepted in KSeF
      A PDF with the KSeF number in the customer account

      Invoices to the customer

      The Subiekt invoice, with its KSeF number, appears in the customer's shop account.

    Result: The store and Allegro sell from one warehouse, and nobody retypes orders into Subiekt.

    Common questions about WooCommerce

    Answers about plugins, store speed, updates and the quote.

    What should your WooCommerce connect to?

    Tell us your ERP, channels and couriers and how many products the store has. We will reply within an hour with questions and a quote.