import type * as Whop from "../index.js"; /** * A setup intent allows a user to save a payment method for future use without making an immediate purchase. */ export interface SetupIntentLegacy { /** The checkout session configuration associated with this setup intent. Null if no checkout session was used. */ checkout_configuration: SetupIntentLegacy.CheckoutConfiguration | null; /** The company that initiated this setup intent. Null if the company has been deleted. */ company: SetupIntentLegacy.Company | null; /** The datetime the setup intent was created. */ created_at: string; /** A human-readable error message explaining why the setup intent failed. Null if no error occurred. */ error_message: string | null; /** The unique identifier for the setup intent. */ id: string; /** The company member associated with this setup intent. Null if the user is not a member. */ member: SetupIntentLegacy.Member | null; /** Custom key-value pairs attached to this setup intent. Null if no metadata was provided. */ metadata: Record | null; /** The saved payment method created by this setup intent. Null if the setup has not completed successfully. */ payment_method: SetupIntentLegacy.PaymentMethod | null; /** The current status of the setup intent. */ status: Whop.SetupIntentStatuses; /** Whether 3D Secure authentication was completed when this payment method was set up. */ three_ds_verified: boolean; } export declare namespace SetupIntentLegacy { /** * The checkout session configuration associated with this setup intent. Null if no checkout session was used. */ interface CheckoutConfiguration { /** The unique identifier for the checkout session. */ id: string; } /** * The company that initiated this setup intent. Null if the company has been deleted. */ interface Company { /** The unique identifier for the company. */ id: string; } /** * The company member associated with this setup intent. Null if the user is not a member. */ interface Member { /** The unique identifier for the company member. */ id: string; /** The user for this member, if any. */ user: Member.User | null; } namespace Member { /** * The user for this member, if any. */ interface User { /** The digital mailing address of the user. */ email: string | null; /** The unique identifier for the company member user. */ id: string; /** The user's full name. */ name: string | null; /** The whop username. */ username: string; } } /** * The saved payment method created by this setup intent. Null if the setup has not completed successfully. */ interface PaymentMethod { /** The card data associated with the payment method, if its a debit or credit card. */ card: PaymentMethod.Card | null; /** The datetime the payment token was created. */ created_at: string; /** The unique identifier for the payment token. */ id: string; /** The mailing address associated with the payment method's user */ mailing_address: PaymentMethod.MailingAddress | null; /** The payment method type of the payment method */ payment_method_type: Whop.PaymentMethodTypes; } namespace PaymentMethod { /** * The card data associated with the payment method, if its a debit or credit card. */ interface Card { /** The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined. */ brand: Whop.CardBrands | null; /** The two-digit expiration month of the card (1-12). Null if not available. */ exp_month: number | null; /** The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available. */ exp_year: number | null; /** The last four digits of the card number. Null if not available. */ last4: string | null; } /** * The mailing address associated with the payment method's user */ interface MailingAddress { /** The city of the address. */ city: string | null; /** The country of the address. */ country: string | null; /** The line 1 of the address. */ line1: string | null; /** The line 2 of the address. */ line2: string | null; /** The name of the customer. */ name: string | null; /** The postal code of the address. */ postal_code: string | null; /** The state of the address. */ state: string | null; } } }