Lemon Squeezy icon

Lemon Squeezy

Interact with Lemon Squeezy API

Discount → Get

AI-generated

Summary

Retrieves a single Lemon Squeezy discount by its ID. Returns the discount record, flattened by default or as raw JSON:API.

Inputs

  • discountId (required) — Numeric string ID of the discount to fetch (e.g. 12345).
  • simplifyOutput — Default true. Flattens JSON:API attributes to the top level alongside id and type. Disable to get the raw JSON:API structure with type, attributes and relationships.
  • retryOptions — Collection to tune retries of failed API requests. Max Retries (default 3, range 0–10; 0 disables) and Initial Delay in ms (default 1000, range 100–30000; doubles on each retry).

Output shape

One item per input item, containing the discount. With Simplify on, a flat object with id, type and the discount attributes. With Simplify off, the raw JSON:API response.

The source for the Get execution path was not shown in detail. The behavior described is inferred from the properties and the shared helpers. Failed requests surface as API errors once retries are exhausted. Retries cover rate limits (429) and 5xx or network errors.

Examples

Example 1: Check a discount's details before applying it to a checkout.

Resource: Discount, Operation: Get, Discount ID: 12345, Simplify: on.

Example 2: Get the raw JSON:API payload, including relationships, for a custom parser.

Discount ID from an earlier node via expression, Simplify: off.

Example 3: Fail fast with no retries in a time-sensitive workflow.

Discount ID: 12345, Retry Options > Max Retries: 0.

Links

Discussion