Skip to content

InPost integration (Paczkomaty)

The InPost module integrates WooCommerce with the ShipX API. Generate labels, let customers choose a Paczkomat on the map and track shipments from the admin panel.

Go to WooCommerce > Settings > Polski PRO > InPost.

SettingDescription
API tokenAuthorization token from the InPost Manager panel
Organization IDOrganization identifier in the InPost system
Sandbox modeUses the ShipX API test environment

The API token is passed in the Authorization: Bearer {token} header with every ShipX API request. The token should have permissions for creating shipments and generating labels.

After configuring the API, create a new shipping method:

  1. Go to WooCommerce > Settings > Shipping > Shipping zones
  2. Edit the “Poland” zone
  3. Click “Add shipping method”
  4. Select “InPost Paczkomat” or “InPost Courier”
Method settingDefault valueDescription
Method title”InPost Paczkomat”Name displayed to the customer
Cost0Shipping cost (0 = free)
Free shipping from""Order amount from which shipping is free
Default parcel sizeASize: A, B, C
InsuranceNoAdd insurance to the shipment

On the checkout page, after selecting the “InPost Paczkomat” shipping method, an interactive map widget is displayed allowing the customer to select a Paczkomat.

The widget offers:

  • Map with Paczkomat pins
  • City search - type a city name to center the map
  • Coordinate search - automatic geolocation (with user consent)
  • Postal code search - find nearest Paczkomaty
  • Paczkomat list - sorted from nearest
  • Point details - address, opening hours, available locker sizes

The widget sends a request to the ShipX API endpoint:

GET /v1/points?type=parcel_locker&city={city}&per_page=25

Results are cached for 24 hours in WordPress transients to minimize the number of API requests.

When the customer consents to geolocation:

GET /v1/points?type=parcel_locker&relative_point={lat},{lng}&per_page=10
/**
* Filtruje listę punktów odbioru InPost.
*
* @param array $points Tablica punktów odbioru z API
* @param string $city Wyszukiwane miasto
* @param array $coords Współrzędne [lat, lng] lub pusta tablica
*/
apply_filters('polski_pro/inpost/points', array $points, string $city, array $coords): array;

Example - excluding temporarily unavailable points:

add_filter('polski_pro/inpost/points', function (array $points, string $city, array $coords): array {
$excluded_points = ['KRA123', 'WAW456']; // Tymczasowo wyłączone
return array_filter($points, function (array $point) use ($excluded_points): bool {
return ! in_array($point['name'], $excluded_points, true);
});
}, 10, 3);

On the order edit page, the InPost panel provides the following options:

  1. Generate label - creates a shipment in the ShipX API and generates a PDF label
  2. Download label - downloads the generated label
  3. Print label - opens a print preview

On the orders list, select multiple orders and choose the bulk action “Generate InPost labels”. Labels are generated asynchronously - after completion, a notification with a link to download the ZIP file appears.

The label is generated based on:

FieldSourceDescription
SenderStore settingsAddress and company data from WooCommerce
RecipientOrder dataFirst name, last name, phone, email
Pickup pointCustomer selectionPaczkomat ID selected at checkout
Parcel sizeMethod settingOr override in the order
COD amountCOD orderOnly for cash on delivery orders
/**
* Filtruje dane przesyłki przed wysłaniem do API ShipX.
*
* @param array $shipment_data Dane przesyłki
* @param \WC_Order $order Zamówienie WooCommerce
*/
apply_filters('polski_pro/inpost/shipment_data', array $shipment_data, \WC_Order $order): array;

Example - adding order reference:

add_filter('polski_pro/inpost/shipment_data', function (array $shipment_data, \WC_Order $order): array {
$shipment_data['reference'] = sprintf('ORDER-%s', $order->get_order_number());
return $shipment_data;
}, 10, 2);

After a label is generated, the module automatically checks the shipment status every 2 hours (WP-Cron). Statuses are mapped to WooCommerce order statuses:

InPost statusWooCommerce statusDescription
createdprocessingShipment created
dispatched_by_senderprocessingDispatched by sender
collected_from_sendershippedCollected from sender
out_for_deliveryshippedOut for delivery
ready_to_pickupshippedReady for pickup at Paczkomat
deliveredcompletedDelivered / picked up

The customer receives an email with a tracking link to the InPost tracking page. The tracking link is added to:

  • “Order processing” email
  • “My Account > Orders > Details” page
  • Order notes (visible to the customer)
/**
* Akcja wywoływana po aktualizacji statusu przesyłki.
*
* @param int $order_id ID zamówienia
* @param string $tracking_number Numer śledzenia
* @param string $old_status Poprzedni status InPost
* @param string $new_status Nowy status InPost
*/
do_action('polski_pro/inpost/status_updated', int $order_id, string $tracking_number, string $old_status, string $new_status);

Example - SMS notification about pickup readiness:

add_action('polski_pro/inpost/status_updated', function (
int $order_id,
string $tracking_number,
string $old_status,
string $new_status
): void {
if ($new_status === 'ready_to_pickup') {
$order = wc_get_order($order_id);
$phone = $order->get_billing_phone();
send_sms($phone, sprintf(
'Twoja paczka %s czeka w Paczkomacie. Kod odbioru w e-mailu.',
$tracking_number
));
}
}, 10, 4);
SizeDimensions (cm)Max weight
A8 x 38 x 6425 kg
B19 x 38 x 6425 kg
C41 x 38 x 6425 kg

The parcel size can be set globally, per shipping method or overridden manually in the order.

Paczkomat map does not load Check if the API token is valid and active. Check the browser console for CORS or JavaScript errors. Make sure the polski-pro-inpost-map.js script is loaded.

Label generation error “Unauthorized” The API token has expired or does not have permissions for creating shipments. Generate a new token in the InPost Manager panel.

Shipment status does not update Check if WP-Cron is working properly. Run manually: wp cron event run polski_pro_inpost_tracking.

This page is for informational purposes only and does not constitute legal advice. Consult a lawyer before implementation. Polski for WooCommerce is open source software (GPLv2) provided without warranty.