Apply non-catalog discounts to a transaction

Pass a discount object when creating or updating a transaction to apply a one-off discount without adding it to your catalog.

What's new?

We updated the Paddle API so you can create, update, or preview a transaction with a discount that isn't in your catalog.

How it works

Discounts can be applied to transactions to reduce the amount a customer has to pay. You can create discounts as part of promotions, or as a way to incentivize customers to upgrade or buy more.

Previously, you could only apply a discount from your catalog to transactions by providing the discount_id of that discount. Now, you can apply a non-catalog discount to a transaction by passing a discount object directly to the transaction when creating, updating, or previewing a transaction.

The discount object accepts a selection of the same fields used to create a catalog discount. If you provide a type of flat or flat_per_seat, you must also provide a currency_code on the transaction that specifies the currency for both the transaction and the discount.

discountobject

The non-catalog discount to apply to a transaction.

typestring

Type of discount (flat, flat_per_seat, or percentage).

amountnumber

Amount to discount by.

descriptionstring

Internal description for the discount.

recurboolean

Whether the discount repeats for subscription billing periods.

maximum_recurring_intervalsinteger or null

Number of future subscription billing periods the discount repeats for. null for unlimited.

restrict_toarray[string] or null

Product or price IDs to limit the discount to.

custom_dataobject

Custom key-value data attached to the discount.

Listing discounts won't return any non-catalog discounts. However, you can fetch non-catalog discounts individually through the API. Non-catalog discounts have a mode of custom.

When to use non-catalog discounts

Non-catalog discounts are one-off, non-transferable discounts which won't be listed in your discounts catalog. They're useful for when you have targeted discounts only valid for a specific customer on a specific transaction.

If your discount isn't intended to be broadly distributed and used, or you don't need to have a record of the discount to manage or track its performance, you should apply a non-catalog discount. For example, you might offer a discounted price on a high-profile customer's next transaction to prevent churn.

Examples

POSThttps://api.paddle.com/transactions

Request

This example creates a transaction with a non-catalog discount applied directly to the transaction. It includes a currency_code on the transaction because the discount type is flat.

Response

If successful, the response includes the new transaction entity. It includes the discount_id of the non-catalog discount applied to the transaction, and the amount discounted in details.totals.discount.

This discount won't show when you list discounts but can be fetched individually using the discount_id.

Summary of changes

Fields

This is a summary of the changes to fields in the Paddle API and webhooks:

FieldChangeNotes
transaction.discountNew fieldProvide an object with the details of the non-catalog discount you want to apply to the transaction.

Next steps

This change is available in version 1 of the Paddle API.

It's a non-breaking change, meaning it doesn't impact existing integrations.

Read more on discounts, non-catalog discounts, and how to apply discounts to transactions.

Related pages