L
Loyalty plugin
Medusa Plugin: Loyalty - Gift Cards
@medusajs/loyalty-plugin
Documentation | Website
Building blocks for digital commerce
Loyalty Plugin for Medusa: adds gift cards and store credit to a Medusa application, including gift card products, redeeming gift cards and store credit at checkout, and store credit accounts for customers. It provides the Loyalty Module and Store Credit Module, Admin and Store API routes, workflows, and Medusa Admin pages. It isn't registered by default: install it and add it to in (Medusa v2.14.0+).
At a glance
| Package | |
| Type | Plugin |
| Modules | Loyalty Module (), Store Credit Module () |
| Registered by default | No |
| Import from | , |
Features
- Gift card products: sell physical or digital gift cards; a gift card with a generated code is created for each one purchased when the order is placed.
- Checkout: apply gift cards and store credit to a cart as payment (, ).
- Store credit accounts: credit, debit, and view transactions (), and let customers view and claim accounts ().
- Admin API routes: manage gift cards under . Store API routes: look up a gift card with .
- Workflows such as , , and , plus hooks into Medusa's cart completion, payment refresh, and order credit line flows.
- Medusa Admin: Gift Cards, Gift Card Products, and Store Credits pages, and widgets on the customer, order, and sales channel details pages.
Installation
Usage
Register the plugin in :
Then run the migrations:
npx medusa db:migrateConfiguration
| Option | Type | Description | Default |
|---|---|---|---|
| Prefix of generated gift card codes. For example, generates . | |||
| Number of 4-character sections in generated gift card codes. For example, generates . |

