--- title: "Automatically apply discount codes in overlay checkout" slug: "automatically-apply-discount-codes-in-overlay-checkout" description: "Boost conversions by automatically applying discount codes in overlay checkouts. Enhance guest experience and reduce drop-off with seamless promotions." tags: ["Setup"] updated: 2026-06-16T15:34:38Z published: 2026-06-16T15:34:38Z canonical: "mysupport.roller.software/automatically-apply-discount-codes-in-overlay-checkout" --- > ## Documentation Index > Fetch the complete documentation index at: https://mysupport.roller.software/llms.txt > Use this file to discover all available pages before exploring further. # Automatically apply discount codes in overlay checkout > [!NOTE] > This is entirely controlled via script injection, and dev involvement is required. This is consistent with how all other overlay parameters currently work. You can now automatically apply a discount code when launching an overlay checkout from your website. This means if a guest taps a promotional button or CTA, the discount is already applied — no need to type anything in. Whether you want to boost bookings with a “Buy More, Save More” offer or reward specific promotions, you can now pass a code like **SUMMER25** directly through the overlay experience. This helps increase conversion rates, reduces drop-off and ensures that your guests don’t miss out on deals you’re offering. To use it, your developer just needs to include the code when triggering the overlay checkout. ## Create a discount code You'll need to create or choose a discount code to add to the overlay. Check out [Discount codes in ROLLER](/v1/docs/get-started-with-discount-codes) to see discount code options and learn how to create one. ## Add a discount code to overlay checkout Your dev team must modify the script tag used to load the overlay checkout. They inject the discount code using the `RollerCheckout.show()` method with the `discountCode` parameter. Example: `onClick="RollerCheckout.show({ productId: '15292', date: '2025-08-20', discountCode: 'SUMMER25' })"` > [!WARNING] > This is an **optional parameter** and does not change the way the overlay script is added to the site. It simply provides an enhancement for applying discount codes dynamically at launch. ## Related - [Add overlay checkout experience to websites](/add-the-overlay-checkout-experience-to-your-website.md) - [Share a discount with a checkout link](/share-a-discount-with-a-checkout-link.md) - [Track discount code usage](/track-discount-code-usage.md)