PHPackages                             vendic/magento2-stock-change-after-payment - 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. [Database &amp; ORM](/categories/database)
4. /
5. vendic/magento2-stock-change-after-payment

ActiveMagento2-module[Database &amp; ORM](/categories/database)

vendic/magento2-stock-change-after-payment
==========================================

Magento 2 module to decrease/increase product stock after invoice/creditmemo creation event

1.0.1(7y ago)4191[1 issues](https://github.com/Vendic/magento2-stock-change-after-payment/issues)MITPHPPHP ~7.0.0|~7.1.0|~7.2.0CI failing

Since Nov 7Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Vendic/magento2-stock-change-after-payment)[ Packagist](https://packagist.org/packages/vendic/magento2-stock-change-after-payment)[ RSS](/packages/vendic-magento2-stock-change-after-payment/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Magento 2: Stock Change After Payment
=====================================

[](#magento-2-stock-change-after-payment)

A simple Magento 2 extension that uses the `sales_order_invoice_pay` and `sales_order_creditmemo_refund` events to decrease/increase product quantity. It also adjusts the product stock status.

Default Magento 2
-----------------

[](#default-magento-2)

1. An order is placed
2. The product stock quantity is decreased with the ordered quantity
3. Payment is made or canceled.
4. Depending on this event it stays decreased (succesfull payment) or is added again (unsuccesfull payment)

Changes after using this module
-------------------------------

[](#changes-after-using-this-module)

1. An order is placed
2. The order is paid
3. The product stock quantity is decreased with the ordered quantity

Result: stock is not decreased (reserved) for unpaid orders.

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

[](#installation)

In vanilla Magento 2.2, the product stock is 'reserved' (substracted) when an order is placed, so we'll have to disable this system so we can replace it with our own.

1. Set 'Decrease Stock When Order is Placed' to 'No' to disable. You can find it here: Stores &gt; Inventory &gt; Stock Options
2. Install via composer:

```
comoser require vendic/magento2-stock-change-after-payment
```

### About Vendic

[](#about-vendic)

[Vendic - Magento 2](https://vendic.nl "Vendic Homepage") develops technically challenging e-commerce websites using Magento 2. Feel free to check out our projects on our website.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

2

Last Release

2729d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/459ec352617fd5a9f46070338b99ed03828fc902eb0a361aed717576e67bd2c4?d=identicon)[TjitseE](/maintainers/TjitseE)

---

Top Contributors

[![Tjitse-E](https://avatars.githubusercontent.com/u/14849044?v=4)](https://github.com/Tjitse-E "Tjitse-E (9 commits)")[![RickVendic](https://avatars.githubusercontent.com/u/30318060?v=4)](https://github.com/RickVendic "RickVendic (2 commits)")[![niekv](https://avatars.githubusercontent.com/u/19262684?v=4)](https://github.com/niekv "niekv (1 commits)")[![RGijsberts](https://avatars.githubusercontent.com/u/7312191?v=4)](https://github.com/RGijsberts "RGijsberts (1 commits)")

---

Tags

magento2magento2-modulephp7

### Embed Badge

![Health badge](/badges/vendic-magento2-stock-change-after-payment/health.svg)

```
[![Health](https://phpackages.com/badges/vendic-magento2-stock-change-after-payment/health.svg)](https://phpackages.com/packages/vendic-magento2-stock-change-after-payment)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
