DocumentationTypesInterfaces

Coupon

amerta


amerta / payload-types / Coupon

Interface: Coupon

Defined in: payload-types.ts:2977

This interface was referenced by Config's JSON-Schema via the definition "coupons".

Properties

applicability

applicability: "all" | "specific_customers" | "customer_groups"

Defined in: payload-types.ts:2998

Who can use this coupon


canCombineWithProductDiscounts

canCombineWithProductDiscounts: boolean

Defined in: payload-types.ts:3014

Allow this coupon to be combined with product discounts


code

code: string

Defined in: payload-types.ts:2982

Coupon code (e.g., SUMMER20)


createdAt

createdAt: string

Defined in: payload-types.ts:3040


customerGroups?

optional customerGroups: (string | CustomerGroup)[] | null

Defined in: payload-types.ts:3006

Select customer groups that can use this coupon


customers?

optional customers: (string | User)[] | null

Defined in: payload-types.ts:3002

Select specific customers who can use this coupon


description?

optional description: string | null

Defined in: payload-types.ts:2986

Internal description of the coupon


discountType

discountType: "fixed" | "percentage"

Defined in: payload-types.ts:2990

Type of discount


discountValue

discountValue: number

Defined in: payload-types.ts:2994

Discount amount (fixed currency) or percentage (0-100)


expiryDate?

optional expiryDate: string | null

Defined in: payload-types.ts:3038

Date when coupon expires (leave empty for no expiry)


id

id: string

Defined in: payload-types.ts:2978


minimumPurchase?

optional minimumPurchase: number | null

Defined in: payload-types.ts:3010

Minimum cart total to apply coupon (leave empty for no minimum)


startDate

startDate: string

Defined in: payload-types.ts:3034

Date when coupon becomes active


status

status: "active" | "inactive" | "expired"

Defined in: payload-types.ts:3030

Coupon status


timesUsed

timesUsed: number

Defined in: payload-types.ts:3026

Number of times this coupon has been used


updatedAt

updatedAt: string

Defined in: payload-types.ts:3039


usageLimit?

optional usageLimit: number | null

Defined in: payload-types.ts:3018

Total number of times coupon can be used (leave empty for unlimited)


usagePerCustomer?

optional usagePerCustomer: number | null

Defined in: payload-types.ts:3022

How many times a single customer can use this coupon