import type * as Whop from "../../../../index.js"; /** * @example * { * id: "id" * } */ export interface UpdateVariantsRequest { /** Variant ID, prefixed `plan_`. */ id: string; /** Whether this variant accepts local currency payments via adaptive pricing. */ adaptive_pricing_enabled?: boolean | null; /** Whether more than one unit can be purchased in an order. Renewal variants cannot enable it. When `false`, checkouts, carts, and invoices reject a quantity above 1. */ allow_multiple_quantity?: boolean; /** Attribute values that make this variant one variant of its product, as a map of attribute name to value, e.g. `{"size": "Large", "color": "Blue"}`. Names are normalized to snake_case identifiers (`Ring Size` becomes `ring_size`) and come back in alphabetical order. Every variant on a product must carry the same attribute names and a distinct set of values. Send `null` to make the variant an ordinary pricing option again. */ attributes?: Record | null; /** Recurring billing interval in days, such as 30 for monthly or 365 for annual. */ billing_period?: number | null; /** How long the retention discount lasts: `0` forever, `1` the next payment only, or a number of calendar months from when the customer accepts it. Required when `offer_cancel_discount` is true. */ cancel_discount_intervals?: number | null; /** Percentage taken off each discounted renewal, as a whole number from 1 to 100. Required when `offer_cancel_discount` is true. */ cancel_discount_percentage?: number | null; /** Checkout styling overrides for this variant. */ checkout_styling?: Record | null; /** The three-letter ISO currency code for the variant's pricing. Defaults to USD. */ currency?: string; /** An array of custom field definitions to collect from customers at checkout. Omitting this field clears existing custom fields. */ custom_fields?: UpdateVariantsRequest.CustomFields.Item[] | null; /** A text description of the variant displayed to customers on the product page. */ description?: string | null; /** Access duration in days before the membership expires. */ expiration_days?: number | null; /** An image displayed on the product page to represent this variant. */ image?: UpdateVariantsRequest.Image | null; /** Initial amount charged in the variant's currency, e.g. 10.43 for $10.43. A paid fiat variant charges at least 1.00 in its currency; use 0 for free. */ initial_price?: number | null; /** Private notes visible only to the account owner. Not shown to customers. */ internal_notes?: string | null; /** Custom key-value pairs to store on the variant. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value. The reserved keys `custom_cta` (a checkout call-to-action button label — one of the product custom CTA values, e.g. `subscribe`, `get_offer`) and `custom_cta_url` (a URL the button links to; web or `tel:`) override the product's call to action for this variant and are validated on save. */ metadata?: Record | null; /** Whether to offer a retention discount when a customer attempts to cancel. */ offer_cancel_discount?: boolean | null; /** Override the default tax classification for this specific variant. */ override_tax_type?: string; /** Explicit payment method configuration for the variant. When not provided, the account's defaults apply. Send at least one of `enabled` or `disabled`; an omitted one is empty. */ payment_method_configuration?: UpdateVariantsRequest.PaymentMethodConfiguration | null; /** Sales method for this variant. */ release_method?: string; /** The amount charged each billing period for recurring variants, in the variant's currency. A paid fiat variant charges at least 1.00 in its currency. */ renewal_price?: number | null; /** Stock keeping unit for this variant. Maximum 100 characters. Free text, not enforced unique. */ sku?: string | null; /** Installment payments required before the subscription pauses, from 2 to 115. Only valid on `renewal` variants. */ split_pay_required_payments?: number | null; /** The maximum number of units available for purchase. Ignored when unlimited_stock is true. */ stock?: number | null; /** A comparison price displayed with a strikethrough for the initial price. */ strike_through_initial_price?: number | null; /** A comparison price displayed with a strikethrough for the renewal price. */ strike_through_renewal_price?: number | null; /** 3D Secure behavior for supported on-session card payments. `mandate_challenge` requires a 3DS challenge before payment processing; `mandate_if_required` mandates a challenge only when the payment processor requires it; `frictionless_if_required` uses the regular frictionless 3DS flow. Payments of $1,000 or more use `mandate_if_required` unless `mandate_challenge` is selected. Risk and authentication recovery requirements can override the preference. Send `null` to inherit the account default. */ three_ds_level?: UpdateVariantsRequest.ThreeDsLevel | null; /** The display name of the variant shown to customers on the product page. Maximum 30 characters. */ title?: string | null; /** Free trial duration before the first recurring charge. */ trial_period_days?: number | null; /** Whether the variant has unlimited stock. When true, the stock field is ignored. */ unlimited_stock?: boolean | null; /** Whether the variant is visible to customers or hidden from public view. */ visibility?: string; } export declare namespace UpdateVariantsRequest { type CustomFields = CustomFields.Item[]; namespace CustomFields { interface Item { /** The type of the custom field. */ field_type?: Item.FieldType | undefined; /** The ID of the custom field (if being updated). */ id?: string | undefined; /** The name of the custom field. */ name?: string | undefined; /** The order of the field. */ order?: number | undefined; /** An example response displayed in the input field. */ placeholder?: (string | null) | undefined; /** Whether or not the field is required. */ required?: boolean | undefined; } namespace Item { /** The type of the custom field. */ const FieldType: { readonly Text: "text"; }; type FieldType = (typeof FieldType)[keyof typeof FieldType]; } } /** * An image displayed on the product page to represent this variant. */ interface Image { direct_upload_id?: string | undefined; id?: string | undefined; } /** * Explicit payment method configuration for the variant. When not provided, the account's defaults apply. Send at least one of `enabled` or `disabled`; an omitted one is empty. */ interface PaymentMethodConfiguration { /** Payment method types explicitly disabled for this variant — the `type` values from the payment method types catalogue. Types Whop no longer offers, and the read-only `unknown` placeholder, are dropped. */ disabled?: Whop.PaymentMethodTypes[] | undefined; /** Payment method types explicitly enabled for this variant — the `type` values from the payment method types catalogue. Types Whop no longer offers, and the read-only `unknown` placeholder, are dropped. */ enabled?: Whop.PaymentMethodTypes[] | undefined; include_platform_defaults?: boolean | undefined; } /** 3D Secure behavior for supported on-session card payments. `mandate_challenge` requires a 3DS challenge before payment processing; `mandate_if_required` mandates a challenge only when the payment processor requires it; `frictionless_if_required` uses the regular frictionless 3DS flow. Payments of $1,000 or more use `mandate_if_required` unless `mandate_challenge` is selected. Risk and authentication recovery requirements can override the preference. Send `null` to inherit the account default. */ const ThreeDsLevel: { readonly MandateChallenge: "mandate_challenge"; readonly MandateIfRequired: "mandate_if_required"; readonly FrictionlessIfRequired: "frictionless_if_required"; }; type ThreeDsLevel = (typeof ThreeDsLevel)[keyof typeof ThreeDsLevel]; }