WooCommerce Delivery Integration: API, Tracking, Pickup Points

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1250
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

WooCommerce Delivery Integration

Every day, online stores lose customers due to slow delivery calculation or missing a preferred carrier. Recently, a store with a catalog of 5,000 products approached us. They used a plugin that sent a request to the carrier's API on every cart change without caching. During a peak promotion (20% discount), server load increased 10x, and calculation time reached 40 seconds. We implemented a custom method with transient caching and fallback rates — time dropped to 150 ms, and checkout conversion increased by 17%. This situation is familiar to many: WooCommerce out of the box offers only three primitive shipping methods — flat rate, free shipping, and local pickup. For a real business, that's catastrophically insufficient. You need specific carrier rates, calculation by dimensions and weight, a tracking number in the customer account, and automatic status updates.

With over 5 years of experience in WooCommerce delivery integrations, we have completed more than 40 projects, helping clients reduce cart abandonment by an average of 30%. One client reported savings of $2,500 per month after integrating Nova Poshta and SDEK.

What Problems Does WooCommerce Delivery Integration Solve?

Typical problems: no real-time calculation, manual shipment creation, lost orders due to outdated rates, server load from uncached requests, inability to select a pickup point. Our integration solves all of them: calculates cost dynamically, creates a shipment when the order transitions to processing, caches results for 30–60 minutes, uses fallback rates on API failures, and embeds a pickup point widget at checkout. On one project, delivery automation reduced manual work by 80% and sped up order processing by 3x. Average logistics savings due to automation amount to 15–20% of turnover, and the integration cost pays for itself in an average of 3 months.

How Does Delivery Work in WooCommerce?

The delivery architecture is built on three layers: Shipping zones (geographic zones), Shipping methods (methods within a zone), and Shipping rates (tariffs). Each custom method extends the WC_Shipping_Method class. Here's a minimal implementation:

Click to view code
class My_Courier_Shipping_Method extends WC_Shipping_Method {
    public function __construct( $instance_id = 0 ) {
        $this->id                 = 'my_courier';
        $this->instance_id        = absint( $instance_id );
        $this->method_title       = 'MyCourier';
        $this->method_description = 'Delivery via MyCourier API';
        $this->supports           = [ 'shipping-zones', 'instance-settings' ];
        $this->init();
    }
    public function init(): void {
        $this->init_form_fields();
        $this->init_settings();
        $this->api_key = $this->get_option( 'api_key' );
        add_action( 'woocommerce_update_options_shipping_' . $this->id, [ $this, 'process_admin_options' ] );
    }
    public function calculate_shipping( $package = [] ): void {
        $rate = $this->get_rate_from_api( $package );
        if ( $rate ) {
            $this->add_rate([
                'id'    => $this->id . '_standard',
                'label' => 'Standard delivery (' . $rate['days'] . ' days)',
                'cost'  => $rate['price'],
                'meta_data' => [ 'courier_id' => $rate['service_id'] ],
            ]);
        }
    }
}

Register the method via a filter:

add_filter( 'woocommerce_shipping_methods', function( $methods ) {
    $methods['my_courier'] = My_Courier_Shipping_Method::class;
    return $methods;
});

We use the WooCommerce shipping method API to create custom calculations. This gives full control over rates and caching.

Why Is a Custom Shipping Method Better Than Ready-Made Plugins?

Ready-made plugins (e.g., for SDEK or Nova Poshta) often have limited settings and depend on plugin updates. A custom method gives full control over logic, caching, and error handling. For example, you can add a non-standard rate by product type or implement your own volumetric weight algorithm.

Parameter Plugin (SDEK, Nova Poshta) Custom Method
Implementation time 1–2 days 3–5 days
Configuration flexibility Limited by plugin settings Full control
Support for non-standard rates No Yes
Dependency on plugin updates High Low

How to Calculate Rates via the Carrier's API?

Most delivery services have a REST API for cost calculation. Example request to a fictional API (with caching):

private function get_rate_from_api( array $package ): ?array {
    $cache_key = 'courier_rate_' . md5( serialize( $package ) );
    $cached    = get_transient( $cache_key );
    if ( $cached !== false ) {
        return $cached;
    }

    $weight = 0;
    foreach ( $package['contents'] as $item ) {
        $product = $item['data'];
        $weight += (float) $product->get_weight() * $item['quantity'];
    }

    $response = wp_remote_post( 'https://api.cdek.ru/v2/calculate', [
        'timeout' => 10,
        'headers' => [
            'Authorization' => 'Bearer ' . $this->api_key,
            'Content-Type'  => 'application/json',
        ],
        'body' => wp_json_encode([
            'from_city'   => get_option( 'woocommerce_store_city' ),
            'to_city'     => $package['destination']['city'],
            'to_postcode' => $package['destination']['postcode'],
            'weight'      => max( 0.1, $weight ),
            'declared_value' => WC()->cart->get_cart_contents_total(),
        ]),
    ]);

    if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
        return null;
    }

    $rate_data = json_decode( wp_remote_retrieve_body( $response ), true );
    set_transient( $cache_key, $rate_data, 30 * MINUTE_IN_SECONDS );
    return $rate_data;
}

Caching with transients is a simple way to reduce load. In our project, caching cut the number of API requests from 5,000 per hour to 50, saving server resources and speeding up checkout.

Sending Orders to the Delivery Service

After an order is confirmed, create a shipment. The woocommerce_order_status_processing hook fires when the order transitions to "Processing":

add_action( 'woocommerce_order_status_processing', function( int $order_id ) {
    $order = wc_get_order( $order_id );
    foreach ( $order->get_shipping_methods() as $shipping_item ) {
        if ( strpos( $shipping_item->get_method_id(), 'my_courier' ) === false ) {
            continue;
        }
        $result = courier_create_shipment( $order );
        if ( $result['tracking_number'] ) {
            $order->update_meta_data( '_courier_tracking_number', $result['tracking_number'] );
            $order->update_meta_data( '_courier_shipment_id', $result['shipment_id'] );
            $order->save();
            $order->add_order_note(
                'Shipment created. Tracking: ' . $result['tracking_number'],
                true
            );
        }
    }
});

How to Automatically Update Delivery Status?

Implement WooCommerce webhook delivery or use periodic cron polling. The webhook from the carrier updates the order status automatically:

add_action( 'courier_sync_tracking', function() {
    $orders = wc_get_orders([
        'meta_key'     => '_courier_tracking_number',
        'meta_compare' => 'EXISTS',
        'status'       => [ 'wc-processing', 'wc-shipped' ],
        'limit'        => 50,
    ]);

    foreach ( $orders as $order ) {
        $tracking = $order->get_meta( '_courier_tracking_number' );
        $status   = courier_api_get_status( $tracking );

        if ( $status === 'delivered' && $order->get_status() !== 'completed' ) {
            $order->update_status( 'completed', 'Delivered per carrier data.' );
        }
    }
});

if ( ! wp_next_scheduled( 'courier_sync_tracking' ) ) {
    wp_schedule_event( time(), 'twohourly', 'courier_sync_tracking' );
}

WooCommerce order tracking is enabled via API: the tracking number is displayed in customer account and emails.

Deliverables

  1. Audit – current logistics analysis, plugin evaluation, API key collection.
  2. Custom shipping method – WC_Shipping_Method class, API integration, caching, fallback.
  3. Tracking setup – number display in emails and account, automatic status update via webhook.
  4. Pickup point widget – selection at checkout, saved in order meta.
  5. Documentation – architecture description, instructions for adding new carriers.
  6. Training – one-hour session for your team on managing the integration.
  7. Access – we handle API keys and credentials setup.
  8. Support – 30-day warranty after delivery.

Implementation Timeline

Integration with one carrier via a ready-made plugin (SDEK, DHL, Nova Poshta): 1–2 days. Custom method with full cycle — calculation, shipment creation, tracking, webhook: 3–5 days. Adding a pickup point widget + email customization: plus 1–2 days. Integration of multiple carriers with a unified management interface: 1–2 weeks.

Typical Integration Mistakes

  • No caching of API requests — server overload.
  • Incorrect volumetric weight calculation for large-dimension products.
  • Ignoring fallback rates when API is unavailable.
  • No tracking number for the buyer — increased support requests.

Get in Touch

Over the course of our practice, we have completed more than 40 delivery integrations for WooCommerce stores. This allowed our clients to reduce cart abandonment by an average of 30%. Get a consultation on delivery integration for your store — write to us, and we will send you a proposal within one business day. Contact us to discuss your project.

How does shipping service integration affect conversion?

Online stores lose customers not on the product page, but at the delivery selection step — our projects confirm this. Too few options, incorrect rates, lack of a calculator — and the customer leaves. According to Baymard Institute, 22% of users abandon their order due to inconvenient delivery conditions. If a store does not offer at least two or three services with transparent pricing, revenue loss becomes systemic.

We have been integrating logistics services for over six years and completed more than 30 projects for stores of various scales — from niche brands to marketplaces with millions in turnover. Integration is not just about 'displaying a list of pickup points.' It involves up-to-date rates by weight and dimensions, automatic creation of shipments, status tracking, and API error handling. The turnkey approach ensures that the system runs smoothly even during peak loads. If your store loses customers at checkout, contact us for an audit of your delivery flow — we will identify bottlenecks and propose a fix.

What problems does delivery setup solve?

Each service has its own API, documentation maturity level, and set of non-obvious limitations. Let's break down the three most common difficulties.

CDEK API v2 is the most mature among Russian carriers. OAuth 2.0 authorization (token lives 24 hours, refresh logic needed), REST JSON. Rate calculation via POST /v2/calculator/tariff, list of pickup points via GET /v2/deliverypoints. Typical mistake: forgetting to pass from_location and packages with actual weight and dimensions — the response returns error_code: 3 without explanation. Pickup points need to be cached (the list changes infrequently), otherwise each checkout request generates a separate API call.

Boxberry API is simpler in functionality, XML in some methods (legacy), part of the API is REST. Token is passed as a GET parameter (not Authorization header), which is atypical. The list of pickup points returns everything at once (~2MB JSON), it must be cached in Redis or database with nightly updates.

Russian Post API is the most complex among Russian carriers. SOAP + REST hybrid, requires a contract and setup in the personal account. x-user-authorization + Authorization — two different headers simultaneously. Standard shipments, EMS, 1st class — different rate groups. Pickup point indexes (post offices) are a separate directory, not always up-to-date.

DHL Express API is for international shipping. XML-based API (DHL XML Services), though there is a newer MyDHL+ API. Requires a registered account number. Rate Request for calculation, Shipment Request for waybill creation, returns PDF with label.

Why is caching pickup points and rates mandatory?

Caching is not an option but a necessity. CDEK API has a limit of 1000 requests per minute, Boxberry — 300. Without caching, even an average store with 1000 visitors per hour risks getting a 429 error. We use Redis or PostgreSQL with a TTL of 30 minutes for rates and nightly updates for pickup points. This reduces API load by 70–80% and speeds up page display. Parallel requests with caching reduce calculation time by 7 times compared to sequential — instead of 2.8 seconds, the customer gets rates in 380 ms. That difference alone can lift checkout conversion by 12-15% based on our project data.

What deliverables can you expect?

Each integration project includes:

  • Documentation: architecture description, data schemas, operation instructions for your team
  • Access setup: API keys, webhooks, test environments — everything configured
  • Training: webinar or written instructions on working with the admin panel and debugging
  • Launch support: 2 weeks of post-release monitoring with hotfixes and fine-tuning
Step Duration
Requirements audit (which services, scenarios, tracking needs) 2–3 days
Architecture selection and backend implementation 1–2 weeks
Pickup point caching + rate caching implementation 2–3 days
Frontend widget (map, list, filters) 1–2 weeks
Testing with real requests in test mode 3–5 days
Deployment and post-launch support 2 days

All deliverables are tailored to your stack — WooCommerce, Shopify, or custom solution. Schedule a free consultation to get a detailed scope for your store.

How we build integration

Abstraction over providers

No store uses one delivery service forever. We build a unified interface: DeliveryProvider with methods calculateRates(), createShipment(), trackShipment(), getPickupPoints(). Each service is a separate implementation. Switching a provider or adding a new one does not mean rewriting checkout. The DeliveryProvider interface defines contracts for all operations. Each carrier has its own class, e.g., CdekProvider implements DeliveryProvider. The constructor receives configs (keys, URLs, cache settings). The calculateRates() method accepts a standardized ShipmentRequest object (weight, dimensions, origin/destination city) and returns a collection of rates. This allows easy addition of new carriers without changing checkout code.

Caching pickup points

Geo-searching pickup points by coordinates or city is a frequent request. Pulling from the API every time is impossible (limits, latency). Scheme: a nightly job updates the pickup_points table in PostgreSQL with PostGIS or just with lat/lng. Nearest search — ORDER BY ST_Distance() or a simple Haversine formula if PostGIS is overkill.

Frontend widget

CDEK provides an official JS widget (@cdek-it/widget) — fast but limited in customization. For non-standard designs, a custom widget: map (Yandex.Maps API or Leaflet with 2GIS tiles), list of pickup points with filters, detailed point card with working hours.

Status tracking

Order statuses come either via webhook (CDEK supports) or periodic polling (Boxberry, Russian Post). For polling, a job queue (Laravel Queue, Bull for Node.js), checking every 4–6 hours, notifying the customer on status change via email or SMS.

Case: multi-carrier for WooCommerce

A sports nutrition store: CDEK + Boxberry + pickup from 3 physical stores. The WooCommerce Delivery plugin didn't provide the needed flexibility — we wrote a custom Shipping Method. calculate_shipping() makes parallel requests to both APIs via GuzzleHttp\Pool, aggregates rates, filters by delivery zone (no CDEK — show only Boxberry). Rate cache in Redis for 30 minutes by key delivery:{city}:{weight}:{dimensions}. Calculation time: was 2.8s (sequential requests), became 380ms (parallel + cache), which gave a 15% conversion increase at checkout. Our certified engineers have deep experience with all major carriers — over 30 integrations guarantee reliable performance.

Process and timelines

Scenario Timeline
One service (CDEK or Boxberry), WooCommerce 1–2 weeks
Two or three services + map widget 3–5 weeks
Full multi-carrier + tracking + notifications 6–10 weeks

Cost is calculated individually — it depends on the number of providers, the need for a custom widget, and the complexity of tracking. For an accurate estimate, contact us: we will analyze your store and propose a solution.

Typical mistakes when setting up independently

  • Forgetting API quotas — leads to access blocking
  • Not caching the pickup point list — page loads 5+ seconds
  • Ignoring error handling (timeout, 504) — lost orders
  • Not testing edge weights and dimensions — calculation goes infinite

Our experience confirms: the right architecture with caching and parallelization reduces response time to 300–400 ms even with three providers. Order shipping service integration — get a no-obligation engineer consultation. Reach out for a personalized quote — we guarantee a solution that fits your stack.