How to get customer reward points programmatically in Magento 2?

How to get customer reward points programmatically in Magento 2

Hello Devs, In this tutorial we will see how to get customer reward points balance programmatically in Magento 2.

In Magento 2, reward points are a powerful feature designed to encourage customer loyalty and engagement. They provide an incentive for customers to make repeat purchases and actively participate in your online store. Reward points can be earned by customers through various actions and can be redeemed for discounts, free products, or other incentives.

You can load reward points information of customers by rewardFactory using Magento\Reward\Model\RewardFactory class.

Here is an example of how you can retrieve customer reward points balance programmatically.

As shown in the above example you can retrieve the customer’s reward points balance and some other information mentioned like customer id, website id, reward id, balance, etc.

You may also like this :

How to assign a customer to a company programmatically in Magento 2 B2B?

Get Company using Customer ID programmatically Magento 2 B2B

How to delete file in magento 2 programmatically

That’s it for this tutorial. Happy Coding !!

Leave a Reply

Your email address will not be published. Required fields are marked *