/** * Paddle Node - Version 1 * Discriminator: resource=coupon, operation=create */ interface Credentials { paddleApi: CredentialReference; } /** Create a coupon */ export type PaddleV1CouponCreateParams = { resource: 'coupon'; operation: 'create'; /** * Either product (valid for specified products or subscription plans) or checkout (valid for any checkout) * @displayOptions.show { jsonParameters: [false] } * @default checkout */ couponType?: 'checkout' | 'product' | Expression; /** * Comma-separated list of product IDs. Required if coupon_type is product. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @displayOptions.show { couponType: ["product"], jsonParameters: [false] } * @default [] */ productIds?: string[]; /** * Either flat or percentage * @displayOptions.show { jsonParameters: [false] } * @default flat */ discountType?: 'flat' | 'percentage' | Expression; /** * Discount amount in currency * @displayOptions.show { discountType: ["flat"], jsonParameters: [false] } * @default 1 */ discountAmount?: number | Expression; /** * The currency must match the balance currency specified in your account * @displayOptions.show { discountType: ["flat"], jsonParameters: [false] } * @default EUR */ currency?: 'ARS' | 'AUD' | 'BRL' | 'CAD' | 'CHF' | 'CNY' | 'CZK' | 'DKK' | 'EUR' | 'GBP' | 'HKD' | 'HUF' | 'INR' | 'JPY' | 'KRW' | 'MXN' | 'NOK' | 'NZD' | 'PLN' | 'RUB' | 'SEK' | 'SGD' | 'THB' | 'TWD' | 'USD' | 'ZAR' | Expression; /** * JSON Parameters * @default false */ jsonParameters?: boolean | Expression; /** * Attributes in JSON form * @displayOptions.show { jsonParameters: [true] } */ additionalFieldsJson?: IDataObject | string | Expression; /** * Additional Fields * @displayOptions.show { jsonParameters: [false] } * @default {} */ additionalFields?: { /** Number of times a coupon can be used in a checkout. This will be set to 999,999 by default, if not specified. * @default 1 */ allowedUses?: number | Expression; /** Will be randomly generated if not specified */ couponCode?: string | Expression | PlaceholderValue; /** Prefix for generated codes. Not valid if coupon_code is specified. */ couponPrefix?: string | Expression | PlaceholderValue; /** Description of the coupon. This will be displayed in the Seller Dashboard. */ description?: string | Expression | PlaceholderValue; /** The coupon will expire on the date at 00:00:00 UTC */ expires?: string | Expression; /** The name of the coupon group this coupon should be assigned to */ group?: string | Expression | PlaceholderValue; /** Number of coupons to generate. Not valid if coupon_code is specified. * @default 1 */ numberOfCoupons?: number | Expression; /** If the coupon is used on subscription products, this indicates whether the discount should apply to recurring payments after the initial purchase * @default false */ recurring?: boolean | Expression; }; }; export type PaddleV1CouponCreateNode = { type: 'n8n-nodes-base.paddle'; version: 1; credentials?: Credentials; config: NodeConfig; };