/** The kinds of code the API hands back from v2/discount-code/validate. */ export type TDiscountCodeType = | 'PERCENTAGE' | 'FIXED_AMOUNT' | 'EXTEND_TRIAL_DAYS' | 'AGENCY_CREDITS'; /** Response from POST v2/discount-code/validate. */ export interface IValidateDiscountResponse { success?: boolean; message?: string; valid?: boolean; discount_type?: TDiscountCodeType; discount_value?: number; applicable_plans?: string[]; /** Billing cycles the discount lasts on a Stripe subscription; null is every cycle. */ duration_months?: number | null; /** Whether the code is mirrored on Stripe, so this checkout can take it. */ stripe?: boolean; }