paddle_list_discounts: Retrieve Paddle Discounts

View source: R/discounts.R

paddle_list_discountsR Documentation

Retrieve Paddle Discounts

Description

Fetches a paginated list of discounts from the Paddle API. By default, only active discounts are returned.

Usage

paddle_list_discounts(
  id = NULL,
  code = NULL,
  status = NULL,
  mode = NULL,
  after = NULL,
  order_by = NULL,
  per_page = NULL
)

Arguments

id

Character vector of discount IDs (e.g., '"dsc_xxx"'). Optional.

code

Character vector of discount codes. Optional.

status

Character vector of discount statuses (one of '"active"', '"archived"'). Optional.

mode

Character. Filter discounts by mode (one of '"standard"', '"custom"'). Optional.

after

Character. Return entities after the specified Paddle ID (used for pagination). Optional.

order_by

Character. Ordering string (e.g., '"id[ASC]"' or '"created_at[DESC]"'). Optional.

per_page

Integer. Number of results per page (max 200). Optional, defaults to 50.

Value

A list containing discount data and pagination metadata.

Examples


set_paddle_mode("sandbox")
result <- paddle_list_discounts()


paddleR documentation built on June 24, 2025, 9:07 a.m.