Skip to main content

Promotions & Discount Codes

Time: ~10 minutes | Difficulty: Intermediate Use the Node SDK to define promotions (automatic or code-based discounts) with rules (when they apply) and actions (what they do). Attach human-readable promotion codes so customers can enter coupons at checkout.
Promotions are scoped to a store (storeId). Amounts in money fields are typically in the smallest currency unit (e.g. cents for USD) unless noted otherwise in your dashboard.

Prerequisites


Initialize and (optional) create a target product

Line-item discounts often reference a product id. For a store-wide percentage off, you can skip this.
5000 in currencyOptions = $50.00 when the currency is USD (cents).

Create a percentage order discount (20% off)

Apply a percentage to the whole order with OrderAdjustment and adjustmentType: 'percentage'.
automatic: true means the promotion can apply without a coupon when your rules (if any) are satisfied. Set automatic: false when you only want it to apply via a promotion code.

Create a fixed line-item discount ($10 off a specific product)

Use LineItemAdjustment with adjustmentType: 'amount' and adjustmentAmount in the full currency object shape (not just { USD: 1000 }).
adjustmentAmount format: each currency key maps to { amount, rate, lock, date }. Use an ISO date string (or timestamp) for date as required by your environment. rate, lock, and date participate in currency conversion and locking behavior on the platform.

Conditional promotion: free shipping over $30

Combine OrderAmountMinimum in rules with ShippingAdjustment in actions.

Create a promotion code (coupon)

Link a reusable code to an existing promotion. Customers enter the code at checkout; the promotion’s rules and actions then apply.
Create the promotion first, then call promotionCodes.create with its promotionId. You can attach multiple codes to the same promotion if your workflow allows it.

List, retrieve, update, and delete promotions

List

Retrieve

storeId is required for a reliable lookup in multi-store accounts.

Update

Updates are wrapped in a data object alongside id.

Delete

Pass an array of ids and storeId.
Some API responses nest the resource under promotion or promotionCode. When creating resources, read result.id or result.promotion?.id depending on the payload shape.

Promotion rules reference


Promotion actions reference


SDK methods: tagada.promotions


SDK methods: tagada.promotionCodes


Currency amount shape

Whenever the API expects a currency map (e.g. adjustmentAmount, minimumAmount), use:
Repeat keys (EUR, GBP, …) for multi-currency stores as needed.

Next steps

Merchant Quick Start

Store, product, funnel, and checkout session setup

Upsell & Downsell Funnel

Post-purchase offers and conditional funnel routing

Custom Checkout

Advanced checkout flows with the Node SDK

API Reference

Full REST API documentation