Create Discount
paddle.create_discount
ActionBusiness appsconnection required
Calls the Paddle API with the connection's credentials.
Create a discount coupon customers can redeem at checkout.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Paddle
- Secret shape
- the Paddle API key (pdl_…), or {"api_key": "…"}
- Config it needs
- environment, base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
12 fields, 3 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
description Internal description of the discount, up to 500 characters. | string | Yes | — | ≤ 500 characters | — |
type percentage takes a share off, flat takes a fixed amount off. | string | Yes | — | one of "percentage", "flat", "flat_per_seat" | — |
amount 0.01 to 100 for a percentage, else the lowest denomination of the currency. | string | Yes | — | — | — |
code Redemption code; Paddle generates one when this is left empty. | string | No | — | — | — |
currency_code Three-letter currency; Paddle requires it for a flat discount. | string | No | — | 3–3 characters | — |
enabled_for_checkout Whether customers may type the code at checkout; Paddle defaults to true. | boolean | No | — | — | — |
recur Whether the discount applies past the first billing period. | boolean | No | — | — | — |
maximum_recurring_intervals How many billing periods a recurring discount keeps applying for. | number | Conditional | — | ≥ 1; only with recur | — |
usage_limit How many times in total the discount may be redeemed. | number | No | — | ≥ 1 | — |
restrict_to JSON array of product or price ids the discount may be used on. | array | No | — | array of string | — |
expires_at RFC 3339 date the discount stops working; empty means it never expires. | string | No | — | — | — |
custom_data Your own key-value data to store on the discount (JSON). | object | No | — | — | — |
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The discount id, prefixed dsc_. | string | — |
code The redemption code customers type at checkout, or null. | string | — |
type flat, flat_per_seat or percentage. | string | — |
amount The discount value, as a string. | string | — |
currency_code Currency of a flat discount, or null. | string | — |
status active or archived. | string | — |
enabled_for_checkout Whether customers may redeem it at checkout. | boolean | — |
recur Whether it applies to more than the first billing period. | boolean | — |
usage_limit How many times it may be redeemed in total, or null. | number | — |
times_used How many times it has been redeemed so far. | number | — |
expires_at RFC 3339 expiry, or null when it never expires. | string | — |
{
"amount": "",
"code": "",
"currency_code": "",
"enabled_for_checkout": false,
"expires_at": "",
"id": "",
"recur": false,
"status": "",
"times_used": 0,
"type": "",
"usage_limit": 0
}See Create Discount run in a workflow.
In a technical demo we add the Paddle connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.