Promotions

Discount coupons in Medusa

Coupons for a team that makes discounts every week and does not want to build them rule by rule. A creator in three steps, every coupon described in one sentence, warnings before saving and the results of every coupon: uses, discount given, order value and new customers. Each coupon is a plain Medusa promotion, so the cart, orders and invoices work with it as before.

See it in the demo admin
Coupons: The integration page in the Medusa admin, demo mode with sample data.
The integration page in the Medusa admin, demo mode with sample data.

What exactly
this integration does

  • A creator in three steps

    The type, for whom and the rules: percent or amount off the order, free delivery, percent off categories, buy X get Y. With a code or automatic, with dates, a use limit and an order minimum.

  • Every coupon in one sentence

    What it gives, on what, for whom and until when, in plain words. A preview shows the coupon as the customer sees it, on a sample cart.

  • Warnings before saving

    An automatic discount for everyone that also reaches customers with their own prices, two automatic coupons on the same part of the order, half price or more, a code that is taken.

  • What each coupon brought

    Uses, discount given, order value and new customers, counted from real orders, and the latest 25 orders of a coupon with a customer's first purchase marked.

  • Quick edits and copies

    Change the code, value, dates, limit and groups in the same form, pause with one click, and a copy gets a new code with every rule of the original.

  • Coupons where you work

    Cards on the order page (which coupons worked and what they gave), the customer (the codes used) and the product (the coupons that reach it).

How it guards
your data

  • Plain Medusa promotions

    The plugin has no tables of its own. Every coupon is a promotion of Medusa's module, written by its own workflows, so removing the plugin leaves every coupon in place.

  • The same checks twice

    The admin checks a coupon live while you build it, and the server checks it again before saving.

  • Nothing on the store side

    The plugin adds nothing to the Store API and reads nothing a shopper can set. Uses come from the adjustments Medusa writes on orders.

  • Writes from the admin only

    Changes are accepted only from the admin or a server, so a form on another site cannot create or change a coupon with a signed-in admin's session.

Setup
in three steps

The full list of options, events and API routes is in the package README on GitHub.

Paste it into Claude Code, Cursor or another AI assistant in your Medusa project: it installs and configures the integration, with writes off.

  1. 1
    Install the package from npm.
    npm install @koda-plus/medusa-plugin-coupons
  2. 2
    Add the plugin to medusa-config.ts.
                            plugins: [{
      resolve: "@koda-plus/medusa-plugin-coupons",
      options: {
        // Everything is optional.
        currencyCode: "pln",
        // Groups with their own prices: the creator warns when an automatic coupon reaches them.
        memberGroupIds: ["cusgroup_01EXAMPLEB2B"],
        codePrefix: "SHOP",
      },
    }]
                          
  3. 3
    Run the migrations and open the integration in the Medusa admin.
    npx medusa db:migrate
Free 15-minute call

Tell us about your project,
we'll tailor the rest to you

A 15-minute call is enough for us to know whether we are a fit for your project.
We start from what you need, not from an off-the-shelf solution.

See our demo

Contact us

Remigiusz in a navy shirt and glasses
I use iMessage I use WhatsApp
Adrian in a grey turtleneck and glasses
I use iMessage I use WhatsApp