Loyalty Module
In this section of the documentation, you will find resources to learn more about the Loyalty Module and how to use it in your application.
Note: The Loyalty Module is part of the Loyalty Plugin. It's compatible with Medusa v2.14.0+.
Looking for no-code docs? Refer to the Medusa Admin User Guide to learn how to manage gift cards using the dashboard.
Medusa has loyalty related features available through the Loyalty Module. A module is a standalone package that provides features for a single domain. Each of Medusa's commerce features are placed in Commerce Modules, such as this Loyalty Module.
Note: Learn more about why modules are isolated in this documentation.
Features#
- Gift Card Products: Create physical or digital gift cards as products that customers can purchase
- Gift Card Management: Issue, redeem, and track gift cards with unique codes
- Cart Integration: Apply gift cards as payment during checkout
How to Use the Loyalty Module#
1. Enable the Plugin#
The plugin is part of the MedusaGo repository. Import its package in the main.go file of your project to register it with the framework:
// Importing the package registers the plugin with the framework.
_ "github.com/hitkey-io/medusago/packages/plugins/loyalty/src"
Then add it to the Plugins of your configuration in medusa-config.go:
2. Run Migrations#
Run the migrations to create the plugin's tables in the database: