import type * as Whop from "../index.mjs"; export interface Plan { /** Account that sells this variant; `null` for standalone invoice variants. */ account: Whop.AccountSummary | null; /** Whether adaptive pricing is enabled for this variant. Raw setting — does not check processor compatibility or feature flags. */ adaptive_pricing_enabled: boolean; /** 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 distinguish this variant within its product, as a map of attribute name to value, e.g. `{"color": "Blue", "size": "Large"}`. Names are snake_case identifiers and come back in alphabetical order. Every attributed variant on a product carries the same attribute names and a distinct set of values; the product lists the full option set as `variant_attributes`. `null` when the variant has no attributes. */ attributes: Record | null; /** Number of days between recurring charges, such as 30 for monthly or 365 for annual. `null` for one-time variants. */ billing_period: number | null; /** Billing model for this variant. */ billing_type: Plan.BillingType; /** How long the cancellation discount lasts: `0` forever, `1` the next payment only, or a number of calendar months from when the customer accepts it. `null` when none is offered or the actor lacks the `plan:basic:read` scope. */ cancel_discount_intervals: number | null; /** Cancellation discount as a whole-number percentage. `null` when none is offered or the actor lacks the `plan:basic:read` scope. */ cancel_discount_percentage: number | null; /** Variant-level checkout styling (`background_color`, `button_color`, `font_family`, `border_style`); `null` inherits the account default. */ checkout_styling: Record | null; /** Whether tax is collected on purchases of this variant, based on the account's tax configuration. */ collect_tax: boolean; /** When the variant was created, as an ISO 8601 timestamp. */ created_at: string; /** Three-letter ISO 4217 code of the currency every price on this variant is stated in, lowercase: the variant's own currency, or the `presentment_currency` the read asked for when the variant can be converted into it. */ currency: Plan.Currency; custom_fields: Whop.PlanCustomField[]; /** Whether the variant can be deleted (it has no memberships or waitlist entries). `null` unless the actor has the `plan:basic:read` scope on the variant's account. */ deletable: boolean | null; /** Customer-visible variant description. Maximum 1000 characters. `null` if no description is set. */ description: string | null; /** The configuration governing a checkout for this variant, resolved through every layer (the variant's own and the account's) — the shape a session's `payment_method_configuration` carries. Apply it over the payment method types catalogue for the offerable set. `null` means platform defaults; `payment_method_configuration` stays the variant's own editable override. */ effective_payment_method_configuration: Whop.CheckoutSessionPaymentMethodConfiguration | null; /** Access duration in days for expiration-based variants, such as 365 for a one-year pass. `null` for variants without an expiration. */ expiration_days: number | null; /** Human-readable price for display (currency + interval) in `currency`, e.g. "$10 / month". */ formatted_price: string; /** Variant ID, prefixed `plan_`. */ id: string; /** Pricing-tier image (`url`, `blurhash`) shown on the product page; `null` when no image is set. */ image: Record | null; /** Initial purchase price, in `currency`. */ initial_price: number; /** Total charged at checkout for one unit, before promo codes and tax: `initial_price` plus the first `renewal_price` for recurring variants, or `initial_price` alone while a free trial applies. The trial does not apply when the viewing user has already used one for this variant. Stated in `currency`. */ initial_price_due: Whop.Money; /** Private notes not shown to customers. `null` unless the actor has the `plan:basic:read` scope on the variant's account. */ internal_notes: string | null; /** Invoice this variant was generated for; `null` unless created for an invoice. */ invoice: Record | null; /** Active memberships through this variant. `null` unless the actor has the `plan:basic:read` scope on the variant's account. */ member_count: number | null; /** Custom key-value pairs stored on the variant. Included in webhook payloads for payment and membership events. Maximum 50 keys, 100 characters per key, 500 characters per value. The reserved keys `custom_cta` and `custom_cta_url`, when set, override the product's checkout call to action for this variant. */ metadata: Record | null; /** Whether a cancellation discount is offered. `null` unless the actor has the `plan:basic:read` scope on the variant's account. */ offer_cancel_discount: boolean | null; /** Payment method configuration (`enabled`, `disabled`, `include_platform_defaults`); `null` when variant uses default settings. */ payment_method_configuration: Record | null; /** Product this variant belongs to; `null` for standalone variants. */ product: Record | null; /** URL where customers can purchase this variant directly. */ purchase_url: string; /** Sales method for this variant. */ release_method: Plan.ReleaseMethod; /** Recurring price charged every billing period, in `currency`. */ renewal_price: number; /** Stock keeping unit, free text set by the seller (e.g. `TSHIRT-LARGE-BLUE`). Not enforced unique. `null` when unset. */ sku: string | null; /** Installment payments required before the subscription pauses. Must be greater than 1. `null` if split pay is not configured. */ split_pay_required_payments: number | null; /** Units available for purchase. `null` unless the actor has the `plan:basic:read` scope on the variant's account. */ stock: number | null; /** Original initial price shown with a strikethrough, in `currency`. `null` when no strikethrough is set. */ strike_through_initial_price: number | null; /** Original renewal price shown with a strikethrough, in `currency`. `null` when no strikethrough is set. */ strike_through_renewal_price: number | null; /** How tax is handled for this variant, including whether tax is included in the price, added at checkout, or not configured. */ tax_type: Plan.TaxType; /** 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. `null` inherits the account default. */ three_ds_level: Plan.ThreeDsLevel | null; /** Variant display name shown to customers. Maximum 30 characters. A variant created without one defaults to its attribute values joined with ` / `. `null` if no title has been set. */ title: string | null; /** Free trial days before the first renewal charge. `null` if no trial is configured or the user has already used a trial for this variant. */ trial_period_days: number | null; /** Whether the variant has unlimited stock. When `true`, the `stock` field is ignored; waitlist variants always report `true`. */ unlimited_stock: boolean; /** When the variant was last updated, as an ISO 8601 timestamp. */ updated_at: string; /** Controls where this variant can be seen. When `hidden`, the variant is reachable only by its direct link. */ visibility: Plan.Visibility; } export declare namespace Plan { /** Billing model for this variant. */ const BillingType: { readonly Renewal: "renewal"; readonly OneTime: "one_time"; }; type BillingType = (typeof BillingType)[keyof typeof BillingType]; /** Three-letter ISO 4217 code of the currency every price on this variant is stated in, lowercase: the variant's own currency, or the `presentment_currency` the read asked for when the variant can be converted into it. */ const Currency: { readonly Usd: "usd"; readonly Sgd: "sgd"; readonly Inr: "inr"; readonly Aud: "aud"; readonly Brl: "brl"; readonly Cad: "cad"; readonly Dkk: "dkk"; readonly Eur: "eur"; readonly Nok: "nok"; readonly Gbp: "gbp"; readonly Sek: "sek"; readonly Chf: "chf"; readonly Hkd: "hkd"; readonly Huf: "huf"; readonly Jpy: "jpy"; readonly Mxn: "mxn"; readonly Myr: "myr"; readonly Pln: "pln"; readonly Czk: "czk"; readonly Nzd: "nzd"; readonly Aed: "aed"; readonly Eth: "eth"; readonly Ape: "ape"; readonly Cop: "cop"; readonly Ron: "ron"; readonly Thb: "thb"; readonly Bgn: "bgn"; readonly Idr: "idr"; readonly Dop: "dop"; readonly Php: "php"; readonly Try: "try"; readonly Krw: "krw"; readonly Twd: "twd"; readonly Vnd: "vnd"; readonly Pkr: "pkr"; readonly Clp: "clp"; readonly Uyu: "uyu"; readonly Ars: "ars"; readonly Zar: "zar"; readonly Dzd: "dzd"; readonly Tnd: "tnd"; readonly Mad: "mad"; readonly Kes: "kes"; readonly Kwd: "kwd"; readonly Jod: "jod"; readonly All: "all"; readonly Xcd: "xcd"; readonly Amd: "amd"; readonly Bsd: "bsd"; readonly Bhd: "bhd"; readonly Bob: "bob"; readonly Bam: "bam"; readonly Khr: "khr"; readonly Crc: "crc"; readonly Xof: "xof"; readonly Egp: "egp"; readonly Etb: "etb"; readonly Gmd: "gmd"; readonly Ghs: "ghs"; readonly Gtq: "gtq"; readonly Gyd: "gyd"; readonly Ils: "ils"; readonly Jmd: "jmd"; readonly Mop: "mop"; readonly Mga: "mga"; readonly Mur: "mur"; readonly Mdl: "mdl"; readonly Mnt: "mnt"; readonly Nad: "nad"; readonly Ngn: "ngn"; readonly Mkd: "mkd"; readonly Omr: "omr"; readonly Pyg: "pyg"; readonly Pen: "pen"; readonly Qar: "qar"; readonly Rwf: "rwf"; readonly Sar: "sar"; readonly Rsd: "rsd"; readonly Lkr: "lkr"; readonly Tzs: "tzs"; readonly Ttd: "ttd"; readonly Uzs: "uzs"; readonly Rub: "rub"; readonly Btc: "btc"; readonly Cny: "cny"; readonly Usdt: "usdt"; readonly Kzt: "kzt"; readonly Awg: "awg"; readonly WhopUsd: "whop_usd"; readonly Xau: "xau"; }; type Currency = (typeof Currency)[keyof typeof Currency]; /** Sales method for this variant. */ const ReleaseMethod: { readonly BuyNow: "buy_now"; readonly Waitlist: "waitlist"; }; type ReleaseMethod = (typeof ReleaseMethod)[keyof typeof ReleaseMethod]; /** How tax is handled for this variant, including whether tax is included in the price, added at checkout, or not configured. */ const TaxType: { readonly Inclusive: "inclusive"; readonly Exclusive: "exclusive"; readonly Unspecified: "unspecified"; }; type TaxType = (typeof TaxType)[keyof typeof TaxType]; /** 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. `null` inherits 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]; /** Controls where this variant can be seen. When `hidden`, the variant is reachable only by its direct link. */ const Visibility: { readonly Visible: "visible"; readonly Hidden: "hidden"; readonly Archived: "archived"; readonly QuickLink: "quick_link"; }; type Visibility = (typeof Visibility)[keyof typeof Visibility]; }