---
title: "WT CDEK library PHP SDK for Joomla developers - WebTolk websites development, Joomla Extensions"
description: "A small native PHP Joomla library for working with the CDEK delivery service API v.2. The package consists of a plugin for storing settings, a PHP library and map widgets for selecting order pick-up points. The library is a client for authorization in the CDEK API via OAuth, working with some API methods: obtaining a number of data and calculating the cost of delivery. Joomla 4.2.7 and higher is supported."
url: "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers"
date: "2026-06-13T21:01:08+00:00"
language: "en-GB"
---

![WT CDEK library](https://web-tolk.ru/images/swjprojects/projects/89/en-GB/cover.webp)

---

# WT CDEK library

- **Category:** [Libraries](https://web-tolk.ru/en/dev/biblioteki)
- **Version:** 1.3.2
- **Date:** 10 June 2026

3772 5676 CTR 66% Pack Free

[Download](https://web-tolk.ru/en/get?element=pkg_lib_wtcdek)[Versions](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/versions)[Documentation](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation)[GitHub](https://github.com/WebTolk/WT-CDEK-Joomla-PHP-library)

A small native PHP Joomla library for working with the CDEK delivery service API v.2. The package consists of a plugin for storing settings, a PHP library and map widgets for selecting order pick-up points. The library is a client for authorization in the CDEK API via OAuth, working with some API methods: obtaining a number of data and calculating the cost of delivery. Joomla 4.2.7 and higher is supported.

![WT CDEK library](https://web-tolk.ru/images/swjprojects/projects/89/en-GB/icon.webp)

## Description

### Attention

This extension is intended for Joomla developers. They can use it as a dependency when developing their extensions for Joomla.

Pull Requests welcome from Joomla developers!

As part of the package

- WT CDEK library
- settings plugin for connecting to the CDEK API **System - WT Cdek**
- [official widget for choosing the type of delivery from CDEK on Yandex map](https://widget.cdek.ru)
- the tasks plugin of the standard Joomla task scheduler for copying and updating CDEK data to a local database

The library is a client for connecting to the CDEK API and several methods for working with it with preliminary verification of the data structure, as well as error handling during the request. To work with the library, you must have the official CDEK API documentation at hand.

[https://api-docs.cdek.ru](https://api-docs.cdek.ru)

### Connecting the library to your Joomla extension

Install the `pkg_lib_wtcdek` package as a regular Joomla extension. After installation, enable the `System - WT Cdek` plugin, fill in `client_id` and `client_secret`, and configure `scheduler:run` through CRON if you use the Joomla Scheduler.

## Quick start

```
<?php

use Webtolk\Cdekapi\Cdek;

\defined('_JEXEC') or die;

$cdek = new Cdek();
// or
$cdek = new Cdek(test_mode: true, client_id: 'your_client_id', client_secret: 'your_client_secret');
```

Authorization is handled automatically, and the access token is cached through Joomla.

## Main changes in 1.3.0

- the library was moved to an entity-based API with the `Cdek` facade
- API logic was split into dedicated entity classes
- new entities were added: `webhooks`, `prealert`, `photoDocument`, `reverse`, `passport`, `payment`, `print`, `check`, `intakes`, `oauth`
- installer script, `TarifflistField`, `TariffinfoField`, and updated assets were added
- `location()->suggestCities()` now supports the `country_code` parameter

#### Connecting the CDEK JavaScript widget

The javascript of the widget is designed as a **Joomla Web Asset**. In our code, we connect it using **WebAssetManager** as follows:

```
<?php
use Joomla\CMS\Factory;

defined('_JEXEC') or die('Restricted access');

$doc  = Factory::getApplication()->getDocument();

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $doc->getWebAssetManager();
$wa->useScript('cdek-widget-umd');
```

Otherwise, when setting up, follow the widget documentation.

#### Widget Service.php

The widget is a Yandex.map that receives a list of order pick-up points using ajax. To work with this library, when initializing the widget, specify the `servicePath` parameter - the url for the ajax request. By default, the file is included with the widget **service.php**, which is the entry point for the ajax request. In this library, the functionality of this file (getting a list of PVZ and calculating tariffs) has been transferred to the Joomla system plugin.

```
<?php
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Session\Session;

defined('_JEXEC') or die('Restricted access');

$service_url = new Uri(Uri::base());
$service_url->setPath('/index.php');
$service_url->setQuery([
    'option'                => 'com_ajax',
    'plugin'                => 'wtcdek',
    'group'                 => 'system',
    'format'               => 'raw',
    'city_code'          => $city_code, // CDEK area code to get a list of pick-up points only for the selected city
    Session::getFormToken() => 1
]);
// URL string
$service_url->toString();
```

For javascript, we use either **Joomla Script options** or `php echo`, depending on the structure of your extension.

## Joomla

 **Extension type:** Package **Package composition:** Library, Plugin **Joomla version:** 4.2.7, 5.2.1, 5.2.2, 6.0.3, 6.1.0, 6.1.1

## Gallery

![...](https://web-tolk.ru/en/dev/biblioteki/images/swjprojects/projects/89/en-GB/gallery/ZeTBpri3KTV.webp)

![...](https://web-tolk.ru/en/dev/biblioteki/images/swjprojects/projects/89/en-GB/gallery/uAv60FdNOKU.webp)

## What's new

 2026-06-10 10:35:51

Fixed

### City names with spaces

Fixed the search for SDEC cities by names with spaces, which was lost after refactoring.

---

## Related extensions

[!\[SM WT CDEK shipping addon for JoomShopping\](https://web-tolk.ru/images/swjprojects/projects/90/en-GB/icon.webp) SM WT CDEK shipping addon for JoomShopping](https://web-tolk.ru/en/dev/joomshopping/sm-wt-cdek-addon-dostavki-dlya-joomshopping)

## JSON-LD Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://web-tolk.ru/en",
                "name": "Home"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://web-tolk.ru/en/dev",
                "name": "Joomla extensions"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "/en/dev/biblioteki",
                "name": "Libraries"
            }
        },
        {
            "@type": "ListItem",
            "position": 4,
            "item": {
                "name": "WT CDEK library "
            }
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Organization",
            "@id": "https://web-tolk.ru/#/schema/Organization/base",
            "name": "WebTolk",
            "url": "https://web-tolk.ru/",
            "logo": {
                "@type": "ImageObject",
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo",
                "url": "images/webtolk-1080p.jpg",
                "contentUrl": "images/webtolk-1080p.jpg",
                "width": 1920,
                "height": 1080
            },
            "image": {
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo"
            },
            "sameAs": [
                "https://github.com/WebTolk",
                "https://github.com/sergeytolkachyov",
                "https://vk.com/web_tolk",
                "https://vk.com/webtolkru",
                "https://tenchat.ru/sergeytolkachyov",
                "https://t.me/sergeytolkachyov",
                "https://t.me/webtolkru"
            ]
        },
        {
            "@type": "WebSite",
            "@id": "https://web-tolk.ru/#/schema/WebSite/base",
            "url": "https://web-tolk.ru/",
            "name": "WebTolk websites development, Joomla Extensions",
            "publisher": {
                "@id": "https://web-tolk.ru/#/schema/Organization/base"
            }
        },
        {
            "@type": "WebPage",
            "@id": "https://web-tolk.ru/#/schema/WebPage/base",
            "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers",
            "name": "WT CDEK library PHP SDK for Joomla developers - WebTolk websites development, Joomla Extensions",
            "description": "A small native PHP Joomla library for working with the CDEK delivery service API v.2. The package consists of a plugin for storing settings, a PHP library and map widgets for selecting order pick-up points. The library is a client for authorization in the CDEK API via OAuth, working with some API methods: obtaining a number of data and calculating the cost of delivery. Joomla 4.2.7 and higher is supported.",
            "isPartOf": {
                "@id": "https://web-tolk.ru/#/schema/WebSite/base"
            },
            "about": {
                "@id": "https://web-tolk.ru/#/schema/SoftwareApplication/base"
            },
            "inLanguage": "en-GB",
            "breadcrumb": {
                "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17"
            }
        },
        {
            "@type": "SoftwareApplication",
            "name": "WT CDEK library ",
            "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers",
            "description": "A small native PHP Joomla library for working with the CDEK delivery service API v.2. The package consists of a plugin for storing settings, a PHP library and map widgets for selecting order pick-up points. The library is a client for authorization in the CDEK API via OAuth, working with some API methods: obtaining a number of data and calculating the cost of delivery. Joomla 4.2.7 and higher is supported.",
            "applicationCategory": "Libraries",
            "softwareVersion": "1.3.2",
            "downloadUrl": "https://web-tolk.ru/en/get?element=pkg_lib_wtcdek",
            "image": "https://web-tolk.ru/images/swjprojects/projects/89/en-GB/icon.webp",
            "operatingSystem": "ANY",
            "interactionStatistic": [
                {
                    "@type": "InteractionCounter",
                    "interactionType": "https://schema.org/DownloadAction",
                    "userInteractionCount": 3772
                },
                {
                    "@type": "InteractionCounter",
                    "interactionType": "https://schema.org/ViewAction",
                    "userInteractionCount": 5677
                }
            ],
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers"
            },
            "softwareRequirements": "Joomla",
            "applicationSubCategory": "1.3.2",
            "isAccessibleForFree": true,
            "keywords": [
                "joomla",
                " php",
                " php sdk",
                " cdek",
                " joomla cdek",
                " cdek php library for joomla"
            ]
        }
    ]
}
```
