Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-dpd maintained by beziworld

Description
DPD Polska client for Laravel: DPDServices REST shipments, labels, protocols and courier pickups, InfoServices tracking and MyPudo pickup points.
Last update
2026/11/04 16:43 (dev-master)
License
Downloads
1

Comments
comments powered by Disqus

Laravel DPD

tests Latest Version License

DPD Polska client for Laravel:

  • shipments through the DPDServices REST API, with COD, declared value, DPD Pickup delivery and any DPD service
  • labels (PDF, ZPL, EPL; A4 or label printer) and handover protocols
  • courier pickup windows, ordering and cancellation; postal code routing check
  • tracking through DPD InfoServices (SOAP, without ext-soap)
  • DPD Pickup points from MyPudo

Polska wersja dokumentacji

Installation

composer require beziworld/laravel-dpd
php artisan vendor:publish --tag=dpd-config   # optional
DPD_LOGIN=...                  # DPDServices credentials configured by DPD
DPD_PASSWORD=...
DPD_MASTER_FID=...
DPD_PAYER_FID=                 # numkat; the master FID when empty
DPD_SANDBOX=false              # true = dpdservicesdemo.dpd.com.pl (test / thetu4Ee / 1495)

DPD_SENDER_COMPANY="ACME Sp. z o.o."
DPD_SENDER_NAME="Jan Nowak"
DPD_SENDER_ADDRESS="ul. Prosta 1"
DPD_SENDER_CITY=Warszawa
DPD_SENDER_POSTAL_CODE=00-001
DPD_SENDER_PHONE=500600700

DPD_TRACKING_LOGIN=...         # InfoServices: separate credentials and channel
DPD_TRACKING_PASSWORD=...
DPD_TRACKING_CHANNEL=...
DPD_PUDO_KEY=...               # MyPudo key from your DPD account manager

Send a package

use Beziworld\Dpd\Data\Address;
use Beziworld\Dpd\Data\Package;
use Beziworld\Dpd\Data\Parcel;
use Beziworld\Dpd\Facades\Dpd;

$package = Dpd::createPackage(new Package(
    receiver: new Address('ul. Długa 5/3', 'Kraków', '30-001', name: 'Anna Kowalska', phone: '600700800', email: 'anna@example.com'),
    parcels: [new Parcel(weight: 2.5, sizeX: 30, sizeY: 20, sizeZ: 10, content: 'Books')],
    ref1: 'ORDER-1',               // your order or invoice number, printed on the label
    codAmount: 149.99,
    services: ['B2C' => ['VALUE' => '10:00-13:00']],   // any DPD service with its attributes
));

$package->waybills;               // ['0000899447393Q']

$pdf = Dpd::labels($package->waybills);              // PDF for a label printer by default
$protocol = Dpd::protocol($package->waybills);       // handover protocol for the courier

Deliver to a DPD Pickup point with pickupPoint: 'PL11523'. createPackages() sends many packages in one session; with the IGNORE_ERRORS policy the valid ones are registered and each GeneratedPackage carries its own errors.

Courier, tracking and points

Dpd::courierAvailability('00-001');   // [['offset' => 360, 'range' => '09:00-17:00'], ...]
$order = Dpd::orderPickup('2026-11-05', '10:00', '15:00', parcelCount: 2, totalWeight: 5, maxWeight: 3);
Dpd::cancelPickup($order);            // keep $order->orderNumber and $order->checkSum

foreach (Dpd::tracking('0000899447393Q') as $event) {
    $event->code;          // six-digit business code, e.g. 190101 delivered
    $event->description;
    $event->occurredAt;
    $event->isDelivered();
}

Dpd::pickupPoints('Warszawa', '01-390');           // list<PickupPoint>
Dpd::pickupPointsNear(52.2277, 20.9894, 500);      // within 500 m
Dpd::pickupPoint('PL11523');

Errors

Exception When
ApiException DPD rejected the request: status() (e.g. INCORRECT_DATA), field errors(), httpStatus(), traceId() for DPD support
InvalidConfiguration missing credentials, sender, tracking channel or MyPudo key

Shipment registration is never retried automatically. DPD offers no API to cancel a registered shipment; unused waybills are simply not handed over.

Development

composer install
composer ci   # pint --test, phpstan (level 8), pest

Author

Created and maintained by Kamil Ćwiertnia, beziworld.eu.

Need a shipping integration for your shop? Get in touch through beziworld.eu.

Other packages by the author

laravel-inpost · laravel-dhl-parcel · laravel-orlen-paczka · laravel-furgonetka · laravel-apaczka

License

MIT. See LICENSE.md. This package is not affiliated with DPD.