InPost Pay - Woocommerce (Widget 2.0) [ENG]

InPost Pay - Woocommerce (Widget 2.0) [ENG]

Introduction

Technical documentation of the InPost Pay plugin for Woocommerce with Widget 2.0 support.

The plugin adds functionality to Woocommerce store that allows to place orders through the InPost app by:

  • Adding an array in the database,

  • Adding the "Create basket with InPost Pay" button on the product card,

  • Adding the "Buy with InPost Pay" button on the basket page,

  • Adding the "Buy with InPost Pay" button on the order page,

  • Actions performed on standard hooks,

  • Adding a field on the order page,

  • Adding an administration section,

  • Providing access to REST API,

  • Attaching a JS file served from webserver and a file served from an external resource to the page.

 

Plugin: 10.02.2026 - 2.0.5.3

 

Changelog

  • 09.02.2026 - 2.0.5.3

    • Fix session creation for the InpostPay basket. Implement changes to ensure proper session generation for the InpostPay basket functionality.

    • Fix shipping form reading for Flexible Shipping (in case of no active cart). Optimize the logic for reading shipping forms to handle cases where no active cart is present.

    • A shipment filter for InPost Pay has been added

  • 18.12.2025 - 2.0.5.1

    • Fixed cart event emission and improved integration stability

    • Fixed a Breakdance Builder conflict by disabling InPost Pay initialization in edit mode

    • Fixed block registration issues (invalid paths and missing block.json)

    • Removed PHP warnings

    • Check email is enabled or disabled in woocomerce settings

    • Removed the "Array to string conversion" warning on the product page

  • 27.11.2025 - 2.0.5

    • Rebuilt user session handling to eliminate data retention from previous sessions

    • Implemented a new cart identifier management mechanism with full reset after session end

    • Unified session data storage logic across environments to prevent cart sharing between users

    • Introduced persistent session data mapping in the database to improve widget stability and security

    • Added race condition handling for concurrent cart writes and updates

    • Integrated session management with the central service container (Pimple) for consistent module operation

    • Optimized session logic and caching mechanisms to minimize database queries

    • Fixed a 404 console error by removing an obsolete script enqueue referencing a missing file.

    • Fixed an issue where the widget disappeared after an AJAX cart update.

    • Fixed an issue where the InPost widget did not appear on the product page due to outdated logic used to verify available shipping methods.

    • Fixed order alias handling by always storing the real order_id, eliminating the issue that prevented the app from processing orders.

    • Fixed WooCommerce order summary calculation by including surcharges from delivery_options (including COD) in the final order price.

    • Removed the Undefined array key 0 warning in WooDeliveryPrice that appeared in the cart footer when shipping methods were mapped.

    • Fixed the shipping cost calculation mechanism that under certain configurations incorrectly marked shipping as free after applying a discount code.

    • Added support for product attributes provided as strings, eliminating the 500 error when adding items to the cart.

    • Fixed an issue where the cart was not automatically unpaired after placing an order in the WooCommerce store.

    • Added full REST request handling in the plugin’s API to prevent HTML/CSS injection from other plugins and ensure correct JSON responses.

    • Removal of duplicate button display configuration from ‘Order page’ settings

    • Addition of a virtual payment method

    • E-mail delivery repair for orders processed via InPost Pay

  • 05.11.2025. - 2.0.4.1

    • Added automatic cart disconnection from the InPost Pay app upon user logout

    • Added a complete logging and export module for the plugin

    • Enabled downloading full diagnostic data as a ZIP archive directly from the admin panel

    • Added collection of WooCommerce logs for a selected day

    • Added export of full plugin configuration to the diagnostic report

    • Added collection of system environment information (WordPress, PHP, WooCommerce)

    • Extended the diagnostic report to include a list of installed and active plugins to simplify environment analysis during integration issues

    • Added fallback shortcode [inpost_thank_you] allowing to display the thank you page without modifying the theme

    • Added a settings field in InPost Pay for selecting the page to be rendered after order completion

    • Fixed logic for detecting digital products in the cart

    • Fixed an issue where APM and COURIER delivery methods were unavailable when digital products were in the cart

    • Modified shipping cost calculation - digital products no longer affect physical delivery pricing

  • 01.10.2025 - 2.0.4

    • Added support for WooCommerce block checkout - full compatibility with both block and classic cart/checkout

    • Added support for Gutenberg blocks - InPost Pay button available as a block for insertion on pages

    • Added error handling for basket binding with dead products (upsell/cross-sell)

    • Added new option in settings: “Refresh page after adding product to cart” - enabled by default; allows configuring page reload after adding products via the widget

    • Improved “Remove all” button behavior on Hot Products view - if no data is found via API, it also removes internal data to prevent errors

    • Simplified EAN field validation - checksum verification removed, only length (12-13 digits) and numeric format check remain

    • Fixed bug for logged-in users - plugin could create a new basket ID instead of using the existing one, causing desynchronization and empty carts

    • Fixed delivery methods detection - normalized rate identifiers to eliminate issues with suffixes

    • Changed package preparation for shipping calculation - full data is now passed (value, costs, coupons, user, address), ensuring compatibility with Flexible Shipping and other plugins

    • Resolved global JavaScript object name conflict to avoid overwriting by other plugins

    • Improved all translations in the settings panel and fixed issue with translations loading too quickly

    • Fixed shipping tax recording - tax_rate_id is now correctly assigned, enabling proper VAT mapping

 

  • 01.09.2025 - 2.0.3

    • Added per-zone sections in the admin panel and separate selects with methods only from the given zone

    • Added tabs "Unavailable Products" and "Unavailable Categories" working on the same principle as Hot Products, but used to exclude products and categories

    • Added currency change detection mechanism

    • Added support for digital products and electronic deliveries, along with detection of digital products in mixed orders

    • Added support for the EAN field in older WooCommerce versions (< 9.1) through a fallback to popular EAN meta fields, enabling InPost Pay to work also in older store.

    • Added the ability to block automatic loading of the InPost Pay widget before consent - script loading has been moved to a named method hooked into wp_enqueue_scripts, allowing merchants to easily disable widget initialization e.g. depending on the consent system

    • Added a switch Use modern response format (recommended), enabling a return to the previous mode; enabled by default

    • Added support for new coupon types: fixed_cart (cart discount), fixed_product (product discount by amount) and percent_product (product discount by percentage - backward compatible)

    • Added support for free shipping activated by coupon (free_shipping)

    • Changed the way responses are prepared in the cart and during order creation - modern WooCommerce-compliant format, better compatibility with store functions

    • Organized data structure and unified the transformation (mapping) process, increasing consistency and response quality

    • Fixed a bug: presence of a product other than simple caused the entire batch not to be saved; now simple products are added, while variable/grouped go to the rejected list

    • After switching to a currency other than PLN the cart is unlinked from the app: widget is hidden and detached without permanently overwriting identifiers

    • Implemented automatic re-linking of the cart after returning to PLN and sending updated data to the app

    • Blocked the possibility of overwriting the cart in the app when the store operates in a currency ≠ PLN

    • Fixed disappearing methods after login (different IDs of the same method in different zones) - only the method mapped for the current zone is returned

    • Organized recalculation of deliveries and prices - consistent list of methods and costs also when called from the mobile app (without an active session)

    • Improved the condition checking HTTP_ACCEPT header during widget script loading, adding isset() to avoid Undefined array key error in REST/API integrations without this header

    • Changed validation logic of products added to the cart - removed the restriction resulting from catalog visibility settings

    • Fixed a bug of overstated VAT amount in orders when the shipping method was set as non-taxable

    • Improved the column name in cart_session

    • Unified the logic of calculating free shipping thresholds in delivery and delivery_related_products objects

    • Added a temporary workaround for a bug on the Elementor Pro side, which caused an undefined alert to appear after adding a product to the cart

    • Removed logs related to registration of the virtual "Thank You Page"

  • 17.07.2025r - 2.0.2.1

    • Default address data has been added. If missing, they will always be filled in to correctly construct a response

    • The limit on the number of Hot Products has been removed from the plugin side - validation now occurs solely on the InPost Pay application side, and the limit is set on the InPost Pay mobile app side

    • EAN-13 validation has been added when adding products to the Hot Products list - products without a valid EAN are automatically removed or cannot be added; related metadata is also removed

    • Support for a custom nonce required by the BLPaczka plugin has been added, which eliminates the "Security check failed" error when creating an order in InPost Pay

    • Error handling has been changed - products are not saved locally if the limit is exceeded

    • Hot Products listing has been improved

    • The method of filtering delivery methods has been improved - instead of checking the full ID, we identify the delivery type based on the prefix

    • Integration with Polylang and WPML plugins has been added - the "InPost Thank You Page" is now correctly registered in all language versions

    • The registration of the "InPost Thank You Page" has been improved in cases where the shop uses a custom URL path

    • Fixed an error that allowed multiple associations of the same basket and order (basket_id and order_id) in the mobile application

    • Fixed an error of double VAT calculation for delivery - a tolerance of 0.5 pp has been added when matching VAT rates, preventing incorrect recalculations of shipping costs

    • Improved VAT assignment to shipping costs

    • Fixed an error causing incorrect operation of payment methods - removed duplication of the CASH_ON_DELIVERY option, which could block display or finalization of payments in the application

    • Added support for product_link in the /v1/izi/products API - the product link is now transmitted and updated automatically after changes in WooCommerce

    • Fixed the error "smallSize is marked non-null but is null" - only complete image data is now sent to additional_product_images, empty entries are omitted

    • Added support for grouped product types - resolved the error "Product cannot be purchased" when attempting to add a set to the cart from the application

  • 18.06.2025r - 2.0.2.1

  • 03.06.2025 -2.0.2

    • Added support for advertising analytics for `gclid`, `fbclid` and `client_id` (GA4) to orders created in InPost Pay. Detailed description in the article: InPost Pay - Analytics - Woocommerce

    • Added the transfer of information to the InPost Pay application about delivery method restrictions for individual products in the basket - this makes it possible to identify which products block specific options (e.g. APM)

    • Added ability to inform the app whether adding a related product will unlock free delivery

    • Added the ability to modify the appearance of the InPost Pay widget in Elementor - options are available to change the background color and button directly in the editor

    • Added ability to manually trigger selected WooCommerce hooks after order creation (e.g. for affiliate plugins)

    • Added support for order number aliases (e.g. Custom Order Numbers) in communication with InPost Pay

    • Fixed a bug preventing the display of a widget on a shopping basket page built with Gutenberg blocks - added support for new CSS classes

    • Fixed a bug that prevented placing an order for a Hot Product directly from the InPost Pay app – improved incorrect description caching, empty attribution and WooCommerce session-related errors

    • Fixed use of masked email address during shipment creation

    • Fixed email dispatch – customer now receives only one order confirmation

    • Removed a redundant component that was compromising security

    • Optimized communication with InPost API to reduce page load

  • 15.05.2025 - 2.0.1.2

    • Fixed the basket identifier (basket_id) when creating a new basket with Promoted Products

  • 14.05.2025 - 2.0.1.1

    • Added the ability to select specific coupons for transfer to the InPost Pay application

    • Fixed "divide by 0" error when creating an order. The error occurred when the order was eligible for free shipping

    • Fixed formatting of the order thank you page on selected templates. Added grid layout support and integration with Astra themes

    • Optimized and standardized the mechanism for launching basket sessions

    • Blocked the possibility of placing an order again using the same basket

    • Added support for reading an existing order in case of an error in its transfer to the InPost Pay application

    • Fixed a bug that prevented the increase of product quantity in the InPost Pay app after updating to version 2.0.1

  • 29.04.2025 - 2.0.1

    • Added new "Hot Products" functionality that allows to highlight products in the InPost Pay mobile app

    • Enhanced coupon support – dynamic visibility of coupons in the Inpost Pay app depending on basket contents and coupon conditions

    • Added integration with Elementor plugin - the Inpost Pay widget is now available in the Elementor editor and allows to easily add a button

    • Added support for LiteSpeed plugin - proper attributes have been introduced to prevent optimization and caching of critical Javascript scripts to ensure proper operation of the Inpost Pay application

    • Fixed formatting of the order thank you page on selected templates. Added grid layout support and integration with Astra themes

    • Added custom error message in Inpost Pay plugin settings, displayed above the "Save" button on each settings tab, in case of an incorrectly completed form

    • Fixed incorrect price values in order confirmation emails - WooCommerce's default email dispatch has been disabled for orders from the Inpost Pay app, with dispatch occurring only after the order is fully saved and the data is refreshed

    • Improved error handling during order finalization

    • Improved accessibility of the "Buy with Inpost Pay" button - added support for screen readers and keyboard navigation by automatically assigning ARIA attributes

    • Introduced validation of basket data when restoring from cache

    • Improved error handling when adding a product to the basket

  • 02.04.2025r - 2.0.0.1

  • 20.03.2025r - 2.0.0

    • Added Widget 2.0 integration

    • Introduced support for Omnibus Directive

    • Added new mapping of shipping methods and calculation of delivery costs

    • Added new "Merchant ID" field in plugin settings for correct connection with API

    • Resolved issues with pairing a widget with a different phone number

    • Fixed an issue where the widget was in a different language than the store page

    • Fixed validation of the InPostPay button on the product card

    • Fixed logic that caused the "Product has been added to the shopping basket" message to be displayed incorrectly after deleting a product

    • Refactored coupon handling – reported errors and standardized amounts

    • Removed duplicate consent links in the application after updating from an older version of the plugin

    • Fixed a bug that caused the InPostPay button to disappear when clicked on the basket tab

    • Reduced page refreshes to a minimum

    • Fixed errors related to adding a discount code

    • The "SSE delay time" field has been removed – the function has been replaced by direct communication of the new widget v2 with the Inpost API

    • Removed "Button width" and "Button height" fields from the "Button Appearance" tab

    • Introduced predefined widget sizes that replace manual settings - editable via the "Widget size" field in the "Button Appearance" tab

On this page:

Requirements

In order to function properly, the plugin requires:

  • Woocommerce version not older than 7.0.0

  • PHP version not older than 7.4


 

Installation / Update

Follow the steps below to install the plugin:

  1. Download the zipped Woocommerce plugin from the InPost website and do not unzip it

  2. Log in to the administration section of your store

  3. From the menu on the left, select "Plugins" and then "Add new"

    image-20250910-063239.png
  4. At the top of the page, select "Upload plugin to server" then "Select file" and locate the zipped plugin file downloaded in step 1

    image-20250910-063339.png
  5. Click "Install

  6. In the next window, click "Enable plugin"

    Follow the above steps to update the plugin. When updating the plugin, the settings will not be deleted.


Test Configuration

In this section, we describe the abbreviated configuration process needed to test the functioning of integration with InPost Pay. For the initial configuration, go to the administration section of the store and click "InPost Pay" in the menu on the left. Once clicked, a form that allows you to configure the plugin will be displayed. Fill in the fields according to the list below:

  1. Select the environment and display options
    a. Set the environment to "Sandbox" - this way you will test the shopping process on a test environment.
    b. Set show widget to "Testers" - this way the widget will be visible only to the people who are supposed to see it. Setting another option will display the widget, either operational or non-operational, to all visitors of your store. To display the widget in a web browser, type the address of your store with ?showIzi=true added at the end Example: https://mystore.pl?showIzi=true

    image-20250910-063519.png
  2. Fill in the API access credentials you received from InPost in the fields
    a. Client ID
    b. Client Secret

image-20240301-080259.png
  1. Fill in the POS ID field according to the value you received from InPost

image-20240301-080350.png
  1. Fill in the Merchant ID field according to the value received from InPost

    image-20250320-084348.png
  2. Enable payment option

    image-20250910-063701.png
  3. Select the order status that will be assigned to orders paid through InPost Pay and to cash on delivery orders.

    image-20251105-105307.png
  4. Check whether the order status glossary is consistent with what you actually present in your communications to customers. This section is used for stores that have an unusual shopping process. This section will be different in different stores because it represents the statuses in your store.

    image-20250910-063820.png
  5. Enter how many suggested products you want to present in the InPost app. A detailed description of how this mechanism works is described in the Suggested Products section.

    image-20250910-063850.png
  6. Add consents that will be required in your store. You can find a detailed description of each option in the Full Configuration section

    image-20250910-063948.png
  7. Specify which base shipping methods are supported by the shopping process of your store.

    image-20250910-064059.png
  8. Combine shipping by Courier with automated shipping. When you select a shipping method from the drop-down list, the same availability and pricing rules for the selected method will apply to shipping by Courier in the InPost app.

    image-20250910-064135.png
  9. You can skip this part in the basic configuration. It defines the prices of additional shipping options for the Courier option. See the Full Configuration section for a complete description.

    image-20250910-064204.png
  10. Combine shipping by APM with automated shipping. When you select a shipping method from the drop-down list, the same availability and pricing rules for the selected method will apply to shipping by APM in the InPost app.

    image-20250910-064246.png
  11. You can skip this part in the basic configuration. It defines the prices of additional shipping options for the APM option - Weekend Delivery and Cash on Delivery, as well as the days and hours between which these options will be available to your customers. For a full description, see Full configuration.

    image-20250910-064319.png
  12. You can skip this part in the basic configuration. It determines whether the availability of shipping methods should be additionally checked for products in the shopping basket based on the detailed settings of the InPost logistics plugin. Leave this option disabled if you are not using the official InPost logistics plugin.

    image-20250910-064350.png
  13. Specify where the widget should be available on your site. You can display it on the product card and in the shopping basket. For each display location, you can specify to which side the InPost Pay button will be aligned. For each location you can separately choose whether the background on the page is light or dark to ensure correct display of texts. For each location you can separately choose the display variant. The button can be black or yellow. The whole thing is configured in the "Button Appearance" tab.

    image-20250910-064416.png

 


 

Production Configuration

After the correct test configuration and making sure that the integration in the Sandbox environment works, you should make InPost Pay available to all users.

Go to the module list and click "Configure" next to the InPost Pay module. Once clicked, a form that allows you to configure the plugin will be displayed.

Change the configuration according to the list below:

  1. Select the environment and display options a. Set the environment to "Production" - this way, production payments will be made when placing orders b. Set show widget to "Everyone" - this way the widget will be visible to all customers of the store.

    image-20250910-064501.png
  2. Fill in the Client ID, Client Secret, POS ID and Merchant ID fields with values taken from the merchant panel. Full instructions for generating API access credentials for a production environment can be found here.

 


Promoted products

Functionality withdrawn from the InPost Pay service.


Suggested products

When you shop with InPost Pay, the InPost app suggests products to add to your basket according to WooCommerce's built-in Related Products system.

How to display suggested products in the app?

In order to display suggested products, you need to complete the Related Products section in the WooCommerce product configuration.

For this purpose:

  1. Go to edit the product in your store.

  2. In the Product Data panel, select the "Related Products" section.

  3. Fill in the "pu-sell" or "cross-sell" section - products from both sections will be visible in the app.

image-20250910-065026.png

 

Why do I see suggested products on the website and not in the app?

It is possible that your store presents related products in a non-standard way. This happens, for example, because of how your template or one of the installed plugins works. If your store presents suggested products and you do not see them in the InPost App, make sure that Related Products are configured according to the instructions in the paragraph above.


Unavailable Products and Categories

What are Unavailable Products and Unavailable Categories?

The excluded products functionality in InPost Pay is a new tab in the plugin, available from the admin panel. It allows you to exclude selected products or categories in order to limit their delivery availability in the InPost Pay mobile app.

How to exclude products?

Excluding products means disabling specific delivery methods for them.
To exclude products in the InPost Pay mobile app, follow these steps:

  1. Go to InPost Pay → Unavailable Products in the WooCommerce admin panel.

image-20250910-065210.png
  1. Click the Select products button.

    image-20250910-065254.png
  2. In the newly opened window, select a product category — after expanding the category, you will see the available products.

    image-20250910-065336.png
  3. Tick the delivery methods for a given product that you want to exclude in the app and click Save.

    image-20250910-065416.png
  4. You can edit the delivery exclusions for a product by deselecting them in the Unavailable products list.
    Removing exclusions for all delivery methods means that the product will also be removed from the Unavailable products list.

    image-20250910-065507.png

How to exclude categories?

Excluding categories means disabling specific delivery methods for all products assigned to that category.
To exclude entire categories in the InPost Pay mobile app, follow these steps:

  1. Go to InPost Pay → Unavailable Categories in the WooCommerce admin panel.

    image-20250910-065612.png
  2. You will see a paginated list of categories.

    image-20250910-065642.png
  3. Tick the delivery methods for the given category that you want to exclude in the app.
    The changes are saved automatically.

 


Logistics plugin

InPost provides a dedicated plugin to integrate with InPost for WooCommerce customers. This plugin allows for a fully automated shopping process that assigns a tracking number and sends it to your customers via the InPost app in the InPost Pay shopping process.

Download the plugin from: https://wordpress.org/plugins/inpost-for-woocommerce/

Documentation: [PL] WooCommerce

How to send a parcel if I have the InPost logistics plugin?

The shipping method, address and APM ID will automatically be transferred to the logistics plugin. You do not need to know the customer's data. You need to send the parcel according to the instructions provided by the plugin.

How to send a parcel if I do not have the InPost logistics plugin?

The page of the order placed through InPost Pay contains information about the shipping method and the APM number in the form of a box. Copy that information and follow your standard parcel dispatch process.

image-20250910-065855.png

Support for Digital Products and Electronic Deliveries

The plugin supports handling digital products and orders containing downloadable items

  • Virtual products:
    For orders containing virtual products (e.g., codes, online access), no physical delivery method is generated. The merchant must handle the delivery manually (e.g., by sending the code/license to the customer’s email address, visible in the order details on the right side of the WooCommerce admin panel).

  • Downloadable products:
    If the order includes downloadable products, the files will be automatically sent to the email address provided by the customer as the digital delivery address.

  • Mixed orders:
    In the case of mixed orders (physical + digital products), the plugin will automatically detect the presence of digital products and adjust the order processing accordingly.

image-20250910-070053.png

Full configuration

The configuration is divided into sections that allow you to customize the plugin's operation to suit your store's needs.

After installing the plugin, you will see a new "InPost Pay" menu on the left side of the admin section. Once clicked, a form that allows you to configure the plugin will be displayed.

API settings

In this section you set the access credentials to the system, the types of supported payment methods and the information exchanged between InPost Pay and the store.

You will get the access credentials to the sandbox environment by writing an e-mail to integracjapay@inpost.pl or by filling out the contact form in the For Business options and the Sandbox tab.

You will receive production data after signing the contract for the InPost Pay service and generate it through the Merchant panel according to the instructions.

 

Description of available options:

Environment

image-20250910-070222.png

 

What is its purpose:

How to configure it:

It determines whether the store sends data to the test or production environment

When you are testing the integration, set the Sandbox environment. If testing was successful and you want to enable the ability to make purchases through InPost Pay, set the Production environment.

 

Show widget

image-20250910-070253.png

 

What is its purpose:

How to configure it:

During testing, we do not want the InPost Pay widget to be displayed to all customers. Regardless of what environment you set, you can temporarily hide the widget and only show it to selected people. To display the widget in tester-only mode, go to the store's home page and add ?showIzi=true to the end of the url

For example: https://outofthebox.pl?showIzi=true

When you are configuring the integration, select Testers. In order to show the widget to everyone after configuration testing has been successfully completed, select Everyone.

Client ID

image-20250910-070355.png

 

What is its purpose:

How to configure it:

API access detail that allows the plugin to work.

According to the data received from InPost.

Client Secret

image-20250910-070426.png

What is its purpose:

How to configure it:

API access detail that allows the plugin to work.

According to the data received from InPost.

 

POS ID

image-20250910-070509.png

What is its purpose:

How to configure it:

API access detail

According to the data received from InPost.

 

Merchant ID