Loyalty Plugin Options

In this guide, you'll learn about the options you can pass to the Loyalty Plugin.

Options Example#

medusa-config.js
1module.exports = defineConfig({2  // ...3  plugins: [4    {5      resolve: "@medusajs/loyalty-plugin",6      options: {7        prefix: "GC",8        sections: 3,9      },10    },11  ],12})

All Options#

OptionDescriptionRequiredDefault

prefix

A string indicating the prefix added to auto-generated gift card codes. For example, setting prefix to GC generates codes in the format GC-XXXX-XXXX-XXXX-XXXX. (Available since v2.17.2)

No

GIFT

sections

A number indicating how many 4-character sections the generated gift card code contains. For example, setting sections to 3 generates codes in the format GIFT-XXXX-XXXX-XXXX. (Available since v2.17.2)

No

4

Was this page helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Medusa MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break