The production-ready Medusa DTC Starter is outRead the announcement
L

Loyalty plugin

Medusa Plugin: Loyalty - Gift Cards

npm install @medusajs/loyalty-plugin
Category
Built by
Version
2.22.4
Last updated
7 hours ago
Monthly downloads
Loading downloads

Medusa logo

@medusajs/loyalty-plugin

Documentation | Website

Building blocks for digital commerce

Medusa is released under the MIT license. PRs welcome! Discord Chat Follow @medusajs

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
TypePlugin
ModulesLoyalty Module (), Store Credit Module ()
Registered by defaultNo
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:migrate

Configuration

OptionTypeDescriptionDefault
Prefix of generated gift card codes. For example, generates .
Number of 4-character sections in generated gift card codes. For example, generates .

Resources