Paddle Billing
Search

Hide the option to add a discount at checkout

Use a parameter or HTML data attribute when working with Paddle.js to hide the option to add a discount at checkout.

What's new?

We added a new parameter to the Paddle.Checkout.open() method and Paddle.Initialize() methods that you can use to hide the option to add a discount at checkout when working with Paddle.js:

settingsobject

Set general checkout settings.

showAddDiscountsboolean or null

Whether the option to add a discount is displayed at checkout. Defaults to true.

We also added a corresponding HTML data attribute:

data-show-add-discountsboolean

Whether the option to add a discount is displayed at checkout. Defaults to true.

How it works

Paddle Checkout includes an "Add Discount" option to let customers enter a discount code. Seeing the option to add a discount might make some customers reluctant to purchase if they don't have a code. You might also want to hide it if you don't generally offer discounts.

The new showAddDiscounts settings parameter and data-show-add-discounts HTML data attribute lets you hide the option to add a discount at checkout when working with Paddle.js.

You can pass settings for opened checkouts using either Paddle.Checkout.open() or Paddle.Initialize(). Settings passed to Paddle.Initialize() are default settings, applied to all checkouts opened on a page.

This change removes the option for customers to apply a discount themselves, but you can still prefill discounts when opening a checkout using discountCode and discountId parameters, or data-discount-code and data-discount-id HTML data attributes.

Examples

Next steps

This change is live in Paddle.js now, so you can start using showAddDiscounts or data-show-add-discounts when you're ready.

You don't need to do anything to get the latest version of Paddle.js — we serve the latest version automatically.

Learn more