Magento_CustomerBalance (Store Credit) (Hyvä Checkout)
Magento Modules:
- Magento_CustomerBalance
Adobe Commerce Packages
- magento/module-customer-balance
Repository
Note: this repo is only accessible with a Hyvä Enterprise license or as a contributor.
For more details, see: https://www.hyva.io/hyva-enterprise.html.
https://gitlab.hyva.io/hyva-enterprise/commerce/magento2-ee-hyva-enterprise-checkout
Features
All points are rated according to priority as P1 (critical), P2 (important), P3 (minor).
-
basic - does not break layout/design -
All built-in checkout layouts supported (default, one page, mobile)
Note: this issue is for features related to the checkout only. See #23 for details on Hyvä Theme compatibility.
Note: the below features all assume store credit is enabled in 'Stores > Configuration' (
customer/magento_customerbalance/is_enabled
). It is also recommended that 'Zero Subtotal Checkout' payment method is enabled in order for the full order amount to be covered by store credit (solely or alongside other discounts). It also assumes the customer is checking out as a logged in user and has a positive store credit balance.
Order Summary Panel
-
[P1] A store credit section should sit under/alongside the existing coupon code section (if enabled) - This should be collapsed/unfolded on page load (like coupons) with the heading 'Apply Store Credit' (this is slightly different to Luma, but adds better consistency with other features like coupon codes and gift cards)
-
[P2] Add a 'Stores > Configuration' setting within the Hyvä Checkout section to hide/show the store credit section - Again, see coupon code functionality for replication
-
[P1] The customers current store credit balance should be displayed -
[P1] The available credit can be applied by clicking/tapping the 'Use Store Credit' button -
[P1] Once applied the store credit displays as a discount row in the totals along with a success message - This displays the amount, along with a 'Remove' link (note this is a button in Luma, either is fine so long as consistent with other removable totals - gift cards/reward points)
- Success message: 'Your store credit was successfully applied.'
- The original store credit section (with balance/use button) is hidden
-
[P1] If the store credit balance is less than the remaining order total, then the full balance is applied -
[P1] If the store credit balance is more than the remaining order total, then the value of the remaining order is applied -
[P1] Store credit can be removed by clicking the 'Remove' link alongside the total and displays a success message - The original store credit section (with balance/use button) is re-instated (no longer hidden)
- Success message: 'The store credit payment has been removed from shopping cart.'
Future enhancement / UX consideration: don't hide the store credit section when applied, but persist and update the button so store credit can removed from the same place. This means the 'remove' link could be removed from the totals.
Store Credit Section (unapplied)

Store Credit Applied (with message & totals)

Store Credit Message (removed)

Payment Method Section
Note: it is not expected any customisations are needed here, but is rather included for testing/thoroughness.
-
[P1] If the store credit total (with or without other discounts) covers the cost of the entire order then the 'Zero Subtotal Checkout' method should replace all other methods
Order Placement
Note: it is not expected any customisations are needed here, but is rather included for testing/thoroughness.
-
[P1] The order is placed with the applied store credit and the amounts are correctly applied to the grand total -
[P1] The customers' store credit balance is updated correctly
Contributors
Voting
Use