# tpay/magento2

> Tpay payments module

`composer require tpay/magento2`

Canonical URL: https://packagento.com/tpay/magento2

## At a glance

- **Vendor**: tpay (https://packagento.com/tpay.md)
- **Latest version**: 2.8.0 — released 2026-06-09
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/tpay/magento2 and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require tpay/magento2:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Tpay payments module

## README

#### [Polish version of README](https://github.com/tpay-com/tpay-magento2-basic/blob/master/README_PL.md)

#### Basic information

The official module for quick online payments via Tpay on the Magento 2 platform.

#### Functions

- Many payment methods: e-transfer, BLIK, card payments, installments and buy now pay later.
- The highest security standards: PCI DSS Level 1, TLS encryption, KIP status
- Returns made from the admin store panel
- Support for currencies other than PLN via payment cards
- Possibility to use a Sandbox account (from module version: 2.0.0)

#### Requirements

- Shop with available currency: Polish Zloty (PLN)
- Composer on the server
- Active account at [Tpay.com](https://tpay.com)
- Account access to Open API enabled

##### Module version from 2.0.0

- Magento version from 2.3.0
- PHP version compliant with the requirements of the sales platform

##### Module version up to 2.0.0

- Magento version from 2.0.0
- PHP version compliant with the requirements of the sales platform

#### Module installation via Composer

1. Download the Tpay module. In the main Magento folder, enter the command:

   ```
   composer require tpaycom/magento2basic
   ```

2. Turn on the Tpay module. In the main Magento folder, enter the command:

   ```
   php bin/magento module:enable Tpay_Magento2
   php bin/magento setup:upgrade
   php bin/magento setup:di:compile
   php bin/magento setup:static-content:deploy
   ```

3. Configure module in admin panel: Stores -> Configuration -> Payment Methods -> tpay.com.

#### [Payment gateway configuration](https://support.tpay.com/pl/developer/addons/magento/instrukcja-konfiguracji-wtyczki-tpay-dla-magento-2)

#### [Configuration of returns from the administration panel](https://support.tpay.com/pl/developer/addons/magento/instrukcja-realizacji-zwrotow-za-pomoca-wtyczki-tpay-dla-magento-2)

#### [Configuration of support for currencies other than PLN](https://support.tpay.com/pl/developer/addons/magento/instrukcja-obslugi-wielu-walut-we-wtyczce-tpay-dla-magento-2)

#### GraphQL support

It is possible to integrate this solution with our plugin. You can find the repository
[here](https://github.com/tpay-com/tpay-magento2-graphql).


#### Hyvä Checkout support

If you are using Hyvä Checkout additional compatybility module is required.
You can find the repository [here](https://github.com/tpay-com/tpay-hyva-checkout)

#### Technical assistance

If you have additional questions, please contact the Tpay Customer Service Department at this
[link](https://tpay.com/kontakt)

#### [Changelog](https://github.com/tpay-com/tpay-magento2-basic/releases)

## Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### 2.8.0

#### Added

- New order status `pending_payment_tpay` assigned to newly created orders with Tpay payment methods.
- Ability to click "Pay with Tpay" in customer order details view (for orders in status `pending_payment_tpay`)
- Ability to send payment reminders from adminhtml order details view (for orders in status `pending_payment_tpay`)

### 2.7.1

#### Added

- ClientId in userAgent suffix

### 2.7.0

#### Added

- Notification amount validation
- Test notification detection

### 2.6.3

#### Added

- Admin private IP warning

### 2.6.2

#### Changed

- New SDK notifications support

### 2.6.1

#### Changed

- Prevents sending too short address optional field values to API that would cause validation based rejection

### 2.6.0

#### Changed

- Removed OrderRepository override that provided loadByIncrementId method, loading order details using OrderRepository::get

### 2.5.3

#### Added

- Validation for notification request

### 2.5.2

#### Fixed

- Validation for IPv6

### 2.5.1

#### Changed

- Enforced length limit (trimming) on UserAgent field sent to payment gateway

### 2.5.0

#### Changed

- Compliance with Magento Coding Standards:
  - Stop using superglobals
  - Securing use of serialize/unserialize
  - Escaping unsescaped output
  - Removed installers and provided declarative schema definitions
  - Improved version detection and registration of dependend libraries

### 2.4.2

#### Changed
- Increased callback urls length

### 2.4.1

#### Fixed

- Issue creating multiple returns for single transaction
- Preventing non-digits from being entered into BLIK code input

### 2.4.0

#### Added

- Feature: new block added to success page, for BLIK payments will show message "confirm in bank payment app" and allow to retry payment if BLIK payment fails

#### Changed

- updated payment icons

### 2.3.2

#### Added

- Feature: based on number of days in setting scheduled tasks cancel orders with overdue payment

### 2.3.1

#### Fixed

- Resolves DI compilation issue on Magento 2.4.8+

### 2.3.0

#### Changed

- Streamlined IPN processing
- Moved to Tpay OpenAPI SDK 2.0

### 2.2.2

#### Fixed

- Streamlined payment processing when there are no paywall redirects

### 2.2.1

#### Fixed

- Cache in multistore settings could store data from improper context

### 2.2.0

#### Added

- Proper use of CSP nonceProvider in checkout for PCI DSS 4.0 compliance

#### Fixed

- Origin Card API not respecting Sandbox setting
- Origin API not logging
- Improved caching of Open API token and group/channels list
- Changed API selection logic to prioritize Open API

### 2.1.7

#### Added

- Module version bump to be adequate to github tag

### 2.1.6

#### Added

- Blik one click payment variant

### 2.1.5

#### Fixed

- Remove unnecessary tos input

### [2.1.4]

#### Fixed

- Language improvements

### [2.1.3]


#### Added

- Adding minimum amount validation

#### Fixed

- Performance improvements

### [2.1.1]

#### Fixed

- CSP configuration
- Partial refund

### [2.1.0]

#### Added

- Adding version information in the Tpay configuration view

### [2.0.9]

#### Fixed

- Fixed refund scope

### [2.0.8]

#### Fixed

- Fixed admin scope config

### [2.0.7]

#### Added

- Added regulations in english

#### Fixed

- Fixed card notification

### [2.0.6]

#### Fixed

- Fixed currency validation

### [2.0.5]

#### Added

- Readme file

---

#### Fixed

- Fixed channels and groups collision

### [2.0.4]

#### Fixed

- Casting in additional data
- Regulations checkbox

### [2.0.3]

#### Fixed

- Fixed logging

### [2.0.2]

#### Fixed

- Performance improvements

### [2.0.1]

#### Added

- Changes required for tpay-com/tpay-magento2-graphql

### [2.0.0]

#### Added

_(Changelog truncated for .md surface. Full history on https://packagento.com/tpay/magento2.)_

## Recent Versions

| Version | Released |
|---|---|
| 2.8.0 | 2026-06-09 |
| 2.7.1 | 2026-05-08 |
| 2.7.0 | 2026-03-27 |
| 2.6.3 | 2026-03-26 |
| 2.6.2 | 2026-03-19 |
| 2.6.1 | 2026-03-13 |
| 2.6.0 | 2026-02-24 |
| 2.5.3 | 2025-12-11 |
| 2.5.2 | 2025-11-05 |
| 2.5.1 | 2025-10-27 |

Showing 10 of 68 versions. Full release history on https://packagento.com/tpay/magento2.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| composer-runtime-api | ^2.0 |
| ext-json | * |
| php | >=7.1 |
| psr/simple-cache | ^1 |
| tpay-com/tpay-openapi-php | ^2.4.5 |
| tpay-com/tpay-php | ^2.4.7 |

### Require (dev)

| Package | Constraint |
|---|---|
| php-cs-fixer/shim | ^3.92 |
| php-parallel-lint/php-parallel-lint | ^1.4 |
| phpstan/phpstan | ^2.1 |
| squizlabs/php_codesniffer | * |
| tpay-com/coding-standards | ^1.1 |
| vimeo/psalm | ^5.15.0 |

### Suggest

| Package | Constraint |
|---|---|
| tpay-com/magento2-graphql | Additional GraphQL endpoints to use in PWA checkout applications |
| tpay-com/module-hyva-checkout | Compatybility module for Hyvä Checkout |

## Quality

Latest release (2.8.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 133 | 133 warnings (ruleset: Magento2) — 2 auto-fixable with phpcbf |
| PHPMD | Warning | 27 | 27 rule violations (UnusedFormalParameter:10, CyclomaticComplexity:3, NPathComplexity:3, ExcessiveClassComplexity:3, UnusedLocalVariable:2) |
| Cpd | Pass | 0 |  |
| Composer validate | Pass | 0 |  |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 98 | 98 | – | – |
| 2.4.8 | – | 98 | 98 | – |
| 2.4.9 | – | – | 98 | 98 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["tpay/magento2"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

tpay is a Magento 2 vendor on Packagento. See https://packagento.com/tpay.md for their full catalogue.

