Discount codes are now case-insensitive
Customers can now enter discount codes with any casing, for example blackfriday, BLACKFRIDAY, or blackFriday. The Paddle API no longer treats codes against the discount entity as case-sensitive.
What's new?
We've updated the Paddle platform so that discount codes are case-insensitive across the Paddle API and Paddle.js.
How it works
When creating a discount, you can set a discount code to let customers apply a discount at checkout easily.
Previously, discount codes were case-sensitive. For example, blackfriday, BLACKFRIDAY, and blackFriday were interpreted as different discount codes when creating a discount and when entered at checkout.
With this update, discount codes are now case-insensitive. This means discounts are applied when the correct code is entered, regardless of the casing. This makes for a better customer experience and reduces the likelihood of checkout abandonment.
Summary of changes
API
This is a summary of the changes to fields in the Paddle API and webhooks:
| Field | Change | Notes |
|---|---|---|
discount.code | Behavior change | Codes must be unique, |
Paddle.js
This is a summary of the changes to fields in the Paddle.js:
| Method | Field | Change | Notes |
|---|---|---|---|
Paddle.Checkout.open() | discountCode | Behavior change | Case not checked when applying a discount. |
Paddle.Checkout.updateCheckout() | discountCode | Behavior change | Case not checked when applying a discount. |
Next steps
This change is available now in version 1 of the Paddle API and in the latest version of Paddle.js. You don't need to do anything to get the latest version of Paddle.js — we serve the latest version automatically.
You shouldn't need to make any changes to your implementation. A small number of Paddle platform users had discounts that shared the same code with different casing. We reached out to those users directly.