Lemon Squeezy icon

Lemon Squeezy

Interact with Lemon Squeezy API

Discount → Bulk Create

AI-generated

Summary

Creates multiple Lemon Squeezy discount codes in a store from a single JSON array of discount definitions.

Inputs

  • Store (required) — Store the discounts are created in. Pick from the list or set an ID with an expression.
  • Discount Codes (required) — JSON array of discount objects. Each needs name, code, amount and amount_type ("percent" or "fixed"). Optional: duration, duration_in_months, max_redemptions, starts_at, expires_at. For fixed discounts, amount is in cents.
  • Simplify — On by default. Flattens JSON:API attributes to the top level. Turn off to get the raw type, attributes and relationships.
  • Retry Options — Retry settings for failed API requests. Max Retries defaults to 3 (0 to 10; 0 disables retries). Initial Delay (Ms) defaults to 1000 (100 to 30000) and doubles on each retry.

Output shape

Returned discount data for the created codes, flattened to id, type and attribute fields when Simplify is on.

The source pack shows the bulk-create execution only as stripped stubs, so the exact output shape (one item per discount or a single combined item) and the handling of per-item failures are not confirmed. Shared validation helpers check percent amounts (0 to 100) and fixed amounts (positive integers), but whether bulk create calls them is not visible.

Examples

Example 1: Generate a batch of holiday promo codes for a store

Store: select the store. Discount Codes: [{"name":"Holiday 10%","code":"HOLIDAY10","amount":10,"amount_type":"percent"},{"name":"Welcome $5","code":"WELCOME5","amount":500,"amount_type":"fixed"}]. Simplify on.

Example 2: Create limited-time codes from upstream data with extra retry tolerance

Discount Codes set by an expression that builds the array from a previous node, including max_redemptions and expires_at. Retry Options: Max Retries 5, Initial Delay 2000.

Links

Discussion