Skip to content

basalt / subscriptions/src / CouponRecord

Interface: CouponRecord ​

Defined in: subscriptions/src/coupon.ts:111

Extends ​

Properties ​

amountOff? ​

> optional amountOff?: number

Defined in: subscriptions/src/coupon.ts:21

Fixed amount off in minor units. Requires currency. Mutually exclusive with percentOff.

Inherited from ​

Coupon.amountOff


code ​

> code: string

Defined in: subscriptions/src/coupon.ts:17

Human code entered at checkout, e.g. LAUNCH20. Unique.

Inherited from ​

Coupon.code


currency? ​

> optional currency?: string

Defined in: subscriptions/src/coupon.ts:23

Currency of amountOff — a discount only applies to invoices in the same currency.

Inherited from ​

Coupon.currency


duration? ​

> optional duration?: CouponDuration

Defined in: subscriptions/src/coupon.ts:25

Recurring applicability. Default 'once'. Informational for one-off invoices.

Inherited from ​

Coupon.duration


maxRedemptions? ​

> optional maxRedemptions?: number

Defined in: subscriptions/src/coupon.ts:27

Stop accepting the coupon after this many redemptions.

Inherited from ​

Coupon.maxRedemptions


metadata? ​

> optional metadata?: Record<string, unknown>

Defined in: subscriptions/src/coupon.ts:30

Inherited from ​

Coupon.metadata


percentOff? ​

> optional percentOff?: number

Defined in: subscriptions/src/coupon.ts:19

Percent off (0–100). Mutually exclusive with amountOff.

Inherited from ​

Coupon.percentOff


redeemBy? ​

> optional redeemBy?: number

Defined in: subscriptions/src/coupon.ts:29

Epoch ms after which the coupon is expired.

Inherited from ​

Coupon.redeemBy


redemptions ​

> redemptions: number

Defined in: subscriptions/src/coupon.ts:112

Released under the MIT License.