Coupon Code Generator for Magento 2
Create unique, personal coupon codes from rules and deliver them straight to customers, so codes are not shared on coupon sites.
Why choose Coupon Code Generator?
Coupon Code Generator creates personal, single-use coupon codes instead of one shared code that ends up on coupon websites. Codes are generated from rules that use Magento's own cart price rule conditions, with your own code format, expiry and usage limits. They can be generated in bulk from the customer grid, sent automatically after a newsletter sign-up or an order, emailed to customers, and listed on a My Coupons page in the account.
Key features
- Coupon Generator Rules
- Custom Code Format
- Individual Expiration Dates
- Usage Limits
- Generate Coupons Page
- Bulk Generation from the Customers Grid
- Customer Coupon Codes Tab
- Admin New Order Coupons
- Automatic Newsletter Coupons
- Next Order Coupons
- Coupon Email
- Manage Coupon Codes Grid
- Rule Usage Statistics
- My Coupons Page
At a glance
| Module name | Mage2Expert_CouponGenerator |
|---|---|
| Composer package | mage2expert/module-coupon-generator |
| Settings | Stores › Configuration › Mage2Expert › Coupon Code Generator (14 options) |
| Admin menu | Marketing › Coupon Code Generator › Generate Coupons Marketing › Coupon Code Generator › Manage Coupon Codes Marketing › Coupon Code Generator › Manage Rules |
| Per store view settings | Yes |
| API | REST: 3 endpoints |
| PHP | 8.1, 8.2, 8.3, 8.4, 8.5 |
Installation
After purchasing on the Adobe Commerce Marketplace, install it with Composer using your Marketplace access keys:
composer require mage2expert/module-coupon-generator
bin/magento module:enable Mage2Expert_CouponGenerator
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
Skip setup:di:compile and static-content:deploy if your store runs in developer mode.
Configuration reference
All 14 options under Stores › Configuration › Mage2Expert › Coupon Code Generator, grouped as they appear in the admin.
General Settings 1
| Setting | Description |
|---|---|
| Enable Module | When disabled, the Coupon Code Generator menu is hidden, no coupons are generated automatically and coupons created by the generator can't be applied to the cart. |
Email Settings 3
| Setting | Description |
|---|---|
| Email Sender | |
| Email Template | Email template chosen based on theme fallback when "Default" option is selected. |
| Send Coupon Email Copy To | Comma-separated. Each address gets a blind copy (BCC) of every coupon email. |
Customer Account 2
| Setting | Description |
|---|---|
| Show "My Coupons" in Customer Account | Lists the coupons generated for the customer, with their discount, expiry date and status. |
| Include Used, Expired and Deactivated Coupons |
Coupon for Newsletter Subscribers 3
| Setting | Description |
|---|---|
| Generate Coupon on Subscription | Each new newsletter subscriber gets one personal coupon. A subscriber who unsubscribes and subscribes again doesn't get a second one. |
| Coupon Generator Rule | |
| Email the Coupon to the Subscriber |
Coupon for the Next Order 5
| Setting | Description |
|---|---|
| Generate Coupon After an Order | The customer gets one coupon per order once the order reaches one of the selected statuses. |
| Coupon Generator Rule | |
| Order Statuses | |
| Minimum Order Grand Total | In the base currency. 0 means any amount. |
| Email the Coupon to the Customer |
Developer reference
REST API
| Method | Endpoint |
|---|---|
POST | /rest/V1/mage2expert/coupongenerator/coupons/generate |
GET | /rest/V1/mage2expert/coupongenerator/coupons/:entityId |
GET | /rest/V1/mage2expert/coupongenerator/coupons |
Frequently asked questions
How much does Coupon Code Generator cost?
Which Magento and PHP versions are supported?
Where do I configure Coupon Code Generator?
Can I switch it off without uninstalling it?
Can the settings differ per store view?
Does it have an API?
Can it be customised for my store?
More Marketing
Related extensions
Reward Points
Reward customers with points for purchases and actions, redeemable as discounts on future orders.
Gift Card
A virtual gift card product type with balance management. Customers buy a gift card and spend the balance at checkout.
Coupon Suggestions
Show customers the coupons that are valid for their cart, right at the discount field on cart and checkout.
Have a Magento project in mind?
Tell me about your store and what you need. I reply to every enquiry within one business day.
Adobe Certified Expert
Adobe Commerce Developer certification, verified on Credly.
15+ years of Magento
From Magento 1 to Magento 2.4.x, Adobe Commerce and Hyvä.
62 Marketplace extensions
Each one reviewed and approved by Adobe.














