PHPackages                             vbdev/magento2-store-credit - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. vbdev/magento2-store-credit

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

vbdev/magento2-store-credit
===========================

Magento 2 Store Credit

1.0.1(2y ago)06OSL-3.0PHPPHP &gt;=8.1

Since Dec 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/viniciusgborges/magento2-store-credit)[ Packagist](https://packagist.org/packages/vbdev/magento2-store-credit)[ RSS](/packages/vbdev-magento2-store-credit/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)DependenciesVersions (3)Used By (0)

magento2-store-credit
=====================

[](#magento2-store-credit)

```
composer require vbdev/magento2-store-credit

```

Main Functionalities
--------------------

[](#main-functionalities)

- The module offers the possibility to create credits for the customer with rest API, this credit can be used in the store as a payment method.

Install
-------

[](#install)

### Type 1: Zip file

[](#type-1-zip-file)

- Unzip the zip file in `app/code/Vbdev`
- Enable the module by running `bin/magento module:enable Vbdev_StoreCredit`
- Apply database updates by running `bin/magento setup:upgrade`
- Flush the cache by running `bin/magento cache:flush`

### Type 2: Composer

[](#type-2-composer)

- Install the module composer by running `composer require vbdev/magento2-store-credit`
- enable the module by running `bin/magento module:enable Vbdev_StoreCredit`
- apply database updates by running `bin/magento setup:upgrade`
- Flush the cache by running `bin/magento cache:flush`

Manage store credits
--------------------

[](#manage-store-credits)

REST Endpoints:

**POST &lt;base\_url&gt;/rest/V1/store-credit/get**

- Returns the customer's store credit. If the customer ID is not found, it will be ignored and only those found will be returned. If none of the customer IDs are found, an empty array is returned.
- BODY EXAMPLE:

```
{
  "customerIds": [
    "94795",
    "94796",
    "94797"
  ]
}
```

**POST &lt;base\_url&gt;/rest/V1/store-credit/create**

- Create store credit for a customer. If any item has an invalid customer\_id, website\_id, or value, it will be marked as failed and deleted from the list, and an error message describing the problem will be returned. If there are no failed items during the update, an empty array is returned. If an error occurred during the update, an exception will be thrown.
- BODY EXAMPLE:

```
{
  "storeCredits": [
    {
      "customer_id": "94795",
      "website_id": "4",
      "amount": "234.12"
    },
    {
      "customer_id": "94796",
      "website_id": "12",
      "amount": "903.12"
    },
    {
      "customer_id": "94797",
      "website_id": "1",
      "amount": "200.12"
    }
  ]
}
```

- When making a request for a customer ID that does not have Store Credit, it will create a new one with the “amount” value entered and for that website entered.
- If a request is made for a customer ID that already has a Store Credit, it will be updated to the value entered in the "amount".
- There is also the possibility of adding the values, that is, if they already have a Store Credit, when making another request the credit will be added to the previous one and not replaced, for this use UPDATE:

**POST &lt;base\_url&gt;/rest/V1/store-credit/update**

- BODY EXAMPLE:
- Update customer's store credit. If any items will have invalid customer\_id, website\_id or amount, they will be marked as failed and excluded from update list and an error message describing the problem will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update, an exception will be thrown.

```
{
  "storeCredits": [
    {
      "customer_id": "94795",
      "website_id": "4",
      "amount": "4"
    },
    {
      "customer_id": "94796",
      "website_id": "1",
      "amount": "4"
    },
    {
      "customer_id": "94797",
      "website_id": "5",
      "amount": "4"
    }
  ]
}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~5 days

Total

2

Last Release

920d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3d3cddbc643d26f332159491c81b8d6e0d139ed49c609208f53729f9a3417bc?d=identicon)[viniciusgborges](/maintainers/viniciusgborges)

---

Top Contributors

[![ViniciusBorges1](https://avatars.githubusercontent.com/u/178296220?v=4)](https://github.com/ViniciusBorges1 "ViniciusBorges1 (14 commits)")

### Embed Badge

![Health badge](/badges/vbdev-magento2-store-credit/health.svg)

```
[![Health](https://phpackages.com/badges/vbdev-magento2-store-credit/health.svg)](https://phpackages.com/packages/vbdev-magento2-store-credit)
```

###  Alternatives

[silverstripe/upgrader

A tool to help upgrade your code to handle API changes in packages you used.

3910.0k3](/packages/silverstripe-upgrader)[ibrand/laravel-shopping-cart

Shopping cart for Laravel Application.

385.6k1](/packages/ibrand-laravel-shopping-cart)[microinginer/yii2-dropdown-action-column

1210.1k1](/packages/microinginer-yii2-dropdown-action-column)

PHPackages © 2026

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