Coupons
Create global coupon codes as a percentage or a fixed amount, scope them to funnels, and control how they stack with recall-email offers.
Coupons let you offer percentage or fixed-amount discounts that customers apply at checkout. Each coupon is scoped to your installation and tracked independently.
Creating a coupon
Go to Settings → Coupons and click New coupon. Fill in:
| Field | Description |
|---|---|
| Name | Internal label, shown only in the admin UI (e.g., “Welcome 10% Off”) |
| Code | The string customers type — stored and matched case-insensitively |
| Type | PERCENTAGE or FIXED_AMOUNT |
| Value | Percentage points (e.g., 10 for 10%) or a fixed amount in your currency |
| Min order amount | Optional subtotal floor; coupon is rejected below this amount |
| Usage limit | Optional cap on total redemptions; leave blank for unlimited |
| Expires at | Optional expiry date |
Codes are stored as uppercase. Customers can type in any case.
Applying coupons on the storefront
There are three ways a coupon can be applied:
URL parameter — append ?coupon=CODE to any storefront URL. On page load, the coupon is validated and applied automatically.
CouponInput component — a standalone Puck component you can place anywhere on the page. The customer types a code and clicks Apply.
OrderSummary built-in field — the OrderSummary Puck component includes an inline coupon entry field.
When a coupon is applied or removed, the browser dispatches the following custom events so other components can react:
// Coupon applied
window.addEventListener('autonnel:couponApplied', (e) => {
console.log(e.detail.code, e.detail.discount);
});
// Coupon removed
window.addEventListener('autonnel:couponRemoved', () => {});
How validation works
When a customer enters a coupon code on the checkout page, autonnel validates it and applies the discount automatically. Codes are checked again at order submission to prevent expired or modified codes from being honored. You don’t need to wire anything up — just create the coupon in Settings → Coupons and it works.
Managing coupons
The Settings → Coupons list shows all coupons with their current usage counts. You can edit any field after creation, including the code. To stop accepting a coupon without deleting it, set Active to off.
The admin CRUD API is at /api/settings/coupons and requires the settings.coupon feature permission.
Caveats
- Coupon codes are unique within your store. The same code string can exist in two separate autonnel installations without conflict.
- Only one coupon per order. Stacking is not supported. If
?coupon=Ais in the URL and the customer types codeB, the last one applied wins. - Discount floor. The calculated discount is capped so the remaining subtotal is at least 1 cent, because payment processors require a positive charge amount.
Related
- Recall — recall emails can optionally attach a coupon to each interval.
- Puck editor — for placing the
CouponInputorOrderSummarycomponent.