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 2w ago

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 57% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

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

2778d 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

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M114](/packages/jdorn-sql-formatter)[magento/community-edition

Magento 2 (Open Source)

12.1k53.0k12](/packages/magento-community-edition)[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8064.7M41](/packages/smile-elasticsuite)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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