Fetches a paginated list of discounts from the Paddle API. By default, only active discounts are returned.
paddle_list_discounts(
id = NULL,
code = NULL,
status = NULL,
mode = NULL,
after = NULL,
order_by = NULL,
per_page = NULL
)
Character vector of discount IDs (e.g., `"dsc_xxx"`). Optional.
Character vector of discount codes. Optional.
Character vector of discount statuses (one of `"active"`, `"archived"`). Optional.
Character. Filter discounts by mode (one of `"standard"`, `"custom"`). Optional.
Character. Return entities after the specified Paddle ID (used for pagination). Optional.
Character. Ordering string (e.g., `"id[ASC]"` or `"created_at[DESC]"`). Optional.
Integer. Number of results per page (max 200). Optional, defaults to 50.
A list containing discount data and pagination metadata.
if (FALSE) { # paddle_has_token()
set_paddle_mode("sandbox")
result <- paddle_list_discounts()
}