{"id":2500,"date":"2024-12-31T20:22:33","date_gmt":"2024-12-31T20:22:33","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/how-to-auto-apply-coupon-code-in-magento-2-step-wise-process\/"},"modified":"2026-03-31T10:01:12","modified_gmt":"2026-03-31T04:31:12","slug":"magento-2-auto-apply-coupon-code","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/magento-2-auto-apply-coupon-code\/","title":{"rendered":"How to Auto Apply Coupon Code in Magento 2? &#8211; Step-wise Process"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Running a sales campaign? Make it even more effective by automatically applying a discount code in Magento 2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Imagine you\u2019re promoting holiday discount offers in your store. You\u2019ll need to create a coupon code that customers can apply to claim the offer. But what if we automate the later part of this process? The customers can automatically claim the discount offer and happily complete their purchase.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, we\u2019ll explore the step-by-step process on Magento 2 auto apply coupon code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Auto Apply Coupon Codes in Magento 2?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To auto-apply coupon code in Magento 2, you\u2019ll need the&nbsp;<a href=\"https:\/\/meetanshi.com\/magento-2-coupon-code-link.html\">Magento 2 Coupon Code Link<\/a>&nbsp;extension. It helps you generate links you can share with your customers, following which the discount code is automatically applied.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can use this extension to generate links that you can add to your website, social media, and distribute it across other channels. Additionally, if you are running your store in the EU, it is important to <a href=\"https:\/\/meetanshi.com\/blog\/how-to-display-lowest-price-in-30-days-in-magento-2\/\">display the lowest price in 30 days<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Configure Auto Apply Coupon Code Settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In your Magento 2 admin, go to&nbsp;<strong>Coupon Code Link &gt; Configure<\/strong>&nbsp;to set up the extension.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2024\/04\/1-configure-magento-2-coupon-code-link-extension.png\" alt=\"configure magento 2 coupon code link extension\" class=\"wp-image-50898\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the extension configuration, set&nbsp;<strong>Coupon Code Link<\/strong>&nbsp;to \u201c<strong>Enable<\/strong>.\u201d You can also enable and customize success &amp; error messages to show on the page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2024\/04\/2-enable-magento-2-coupon-code-link-extension.png\" alt=\"enable magento 2 coupon code link extension\" class=\"wp-image-50901\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Customize the success &amp; error messages like the one shown below. You can add images, widgets, or even custom HTML code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2024\/04\/3-customize-success-message.png\" alt=\"customize success message\" class=\"wp-image-50902\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The extension also supports sharing the coupon code links directly on social media platforms and via email. You can configure the optional Facebook ID and email settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once done, click the \u201c<strong>Save Config<\/strong>\u201d button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-and-share-links-for-coupon-codes\">Step 2: Create &amp; Share Links for Coupon Codes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In your Magento admin left menu, navigate to&nbsp;<strong>Coupon Code Link &gt; Manage Coupon Code Links<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2024\/04\/4-manage-coupon-code-links.png\" alt=\"manage coupon code links\" class=\"wp-image-50903\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This grid will display all the links to auto apply coupon codes in Magento 2 that you\u2019ve created.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click the&nbsp;<strong>Update&nbsp;<\/strong>button as shown below to update the grid with all the coupon codes that you\u2019ve created in your store.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2024\/04\/5-update-copon-code-links.png\" alt=\"update copon code links\" class=\"wp-image-50906\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, click the coupon code that you want to generate a link for and enter the&nbsp;<strong>Redirect URL<\/strong>&nbsp;(i.e. the page where you want to redirect the customer on clicking the link. For e.g., a category page.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The extension will generate a coupon code link with redirection, as shown below. Copy the link.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2024\/04\/6-copy-coupon-code-link-964x249-1.png\" alt=\"copy coupon code link\" class=\"wp-image-50909\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Optionally, you can also use the other options in the grid to email the link to customers or share it on social media.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"add-coupon-code-links-to-your-pages\">Step 3: Add Coupon Code Links to Your Pages<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you can promote the copied links on your website via banners or CTAs to auto apply coupon codes in Magento 2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the following example, I have added the coupon code link to a product page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2024\/04\/7-add-auto-apply-coupon-code-link-to-magento-2-964x526-1.png\" alt=\"add auto apply coupon code link to magento\" class=\"wp-image-50910\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The link takes the user to the set redirect page (which is the product page in this example.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The discount offer code is automatically applied once they add the products to the cart. And the success message is displayed as configured in the backend.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2024\/04\/8-magento-2-auto-apply-coupon-code.png\" alt=\"magento auto apply coupon code\" class=\"wp-image-50911\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">See how the&nbsp;Magento 2 Coupon Code Link extension&nbsp;enabled automatic discount on cart\/checkout in Magento 2. You can also use the extension to share the coupon code links on social media channels and make it easy for your customers to claim the discounts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><div class=\"meetanshi-cta\">\r\n<div class=\"cta-content-wrapper\">\r\n<span>Magento 2 Coupon Code Link<\/span>\r\n<p>Convert coupon codes to links that apply discounts directly at the checkout page.<\/p>\r\n<a href=\"https:\/\/meetanshi.com\/magento-2-coupon-code-link.html\" target=\"_blank\" class=\"btn-primary\">Covert Now<\/a>\r\n<\/div>\r\n<div class=\"cta-image-new\">\r\n<img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/11\/coupon-code-link.png\" alt=\"Magento 2 Coupon Code Link\">\r\n<\/div>\r\n<\/div><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"bonus-tips-to-increase-sales-using-coupon-code-links\">Bonus Tips to Increase Sales Using Coupon Code Links in Magento 2<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In Magento 2, auto applying coupon codes via links can help you improve customer\u2019s journey with the store. The above tutorial demonstrates how you can do that using our Magento 2 Coupon Code Link extension.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the coupon code link in Magento 2 to improve your sales in a number of ways. Here are some:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Distribute the code links to your existing customers via newsletters<\/li>\n\n\n\n<li>Run social media campaigns to promote the sales discount offers<\/li>\n\n\n\n<li>Place CTAs on your website pages and announcement bars with buttons<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Running a sales campaign? Make it even more effective by automatically applying a discount code in Magento 2. Imagine you\u2019re promoting holiday discount offers in&#8230;<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-2500","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=2500"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2500\/revisions"}],"predecessor-version":[{"id":26286,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2500\/revisions\/26286"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=2500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=2500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=2500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}