PHPackages                             malpka32/inpost-buy-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. malpka32/inpost-buy-sdk

ActiveLibrary

malpka32/inpost-buy-sdk
=======================

PHP client for InPost Buy (inpsa) API

0.7.5(1mo ago)018↑100%MITPHPPHP &gt;=8.1CI passing

Since Feb 11Pushed 1mo agoCompare

[ Source](https://github.com/malpka32/inpost-buy-sdk)[ Packagist](https://packagist.org/packages/malpka32/inpost-buy-sdk)[ RSS](/packages/malpka32-inpost-buy-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (16)Versions (8)Used By (0)

InPost Buy SDK (inpsa)
======================

[](#inpost-buy-sdk-inpsa)

PHP client for the **InPost Buy API** (inpsa) — sell your products through InPost's marketplace. Categories, offers, orders — all wrapped in a clean, type-safe interface.

[![CI](https://github.com/malpka32/inpost-buy-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/malpka32/inpost-buy-sdk/actions/workflows/ci.yml)[![PHP](https://camo.githubusercontent.com/4cc99e4b10627fa5bb11782e3a51e7daace17a2107820826c485fd66d8ebb2c9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e312d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php.net)[![PHPStan](https://camo.githubusercontent.com/022b70e6631d055205dfebf2aa7e53b3f63e7a3ea04a18e86429f279e29a29f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c25323031302d627269676874677265656e)](https://phpstan.org)[![Code style: PSR-12](https://camo.githubusercontent.com/ed7a67e3fd0f02b77d390d6dafcd2963065be52f2104059a5b83bc5cdd210987/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d5053522d2d31322d3161316132652e737667)](https://www.php-fig.org/psr/psr-12/)[![Packagist Version](https://camo.githubusercontent.com/7e18eb712e66b104793ff3fb558a7c15588469d5fd45a51a5312157221309bc1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616c706b6133322f696e706f73742d6275792d73646b)](https://packagist.org/packages/malpka32/inpost-buy-sdk)[![Maintained](https://camo.githubusercontent.com/5ca62441414bacaa54c6c6e5b68e46c76305947b6bf498c4949fc71c1b4b10dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642533462d7965732d677265656e2e737667)](https://github.com/malpka32/inpost-buy-sdk/graphs/commit-activity)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

---

What is InPost Buy?
-------------------

[](#what-is-inpost-buy)

InPost Buy (inpsa) lets merchants integrate their product catalog and orders with InPost's platform. You publish offers, receive orders, and update their status — all via REST API. This SDK handles authentication, serialization, and mapping so you focus on business logic.

Features
--------

[](#features)

- **Categories** — fetch product categories as a tree (read-only), with details and attributes
- **Accept-Language** — set response language (Polish `pl` or English `en`) via `Language` enum
- **Offers** — create single or batch offers with products, stock, and pricing; close/reopen; events; deposit types
- **Offer attachments** — list, upload, download, delete attachments (images etc.)
- **Orders** — list orders, fetch details, accept or refuse with status updates
- **OAuth2** — client credentials grant (default) with in-memory caching; **OAuth2 PKCE** (Authorization Code flow) for merchant integrations (e.g. PrestaShop modules)
- **Custom token provider** — use `InPostBuyClient::createWithTokenProvider()` with any `AccessTokenProviderInterface`
- **Typed DTOs** — `OfferDto`, `ProductDto`, `OrderDto` etc., no raw arrays in your code
- **Exceptions** — `NotFoundException`, `BadRequestException`, `ServerException` etc. with HTTP status and error details

---

Requirements
------------

[](#requirements)

- PHP 8.1+
- [Symfony HttpClient](https://symfony.com/doc/current/http_client.html) (or any PSR-18-compatible client via Symfony contracts)
- [ramsey/collection](https://github.com/ramsey/collection)

---

Installation
------------

[](#installation)

```
composer require malpka32/inpost-buy-sdk
```

---

Quick Start
-----------

[](#quick-start)

```
