import type * as Whop from "../index.js"; export interface SetupIntent { /** The account the payment method is saved for, prefixed `biz_`. */ account_id: string | null; /** The checkout configuration this setup was created through, prefixed `ch_`. Null for a setup created through this API rather than a hosted checkout. */ checkout_configuration_id: string | null; /** The credential a buyer's surface presents to poll this setup and set its return URL — hand it to the elements' `handleNextAction`. Only on setups created through this API, and always null in list responses — retrieve the setup intent for it. */ client_secret: string | null; /** When the setup intent was created, as an ISO 8601 timestamp. */ created_at: string; /** Setup intent ID, prefixed `sint_`. */ id: string; /** Why the setup ended where it did, or `null` when nothing has failed. Present on `canceled` — a buyer who abandoned carries no code, one refused by the provider does. Dropped once the setup succeeds. */ last_setup_error: Whop.SetupLastSetupError | null; /** The buyer's member record on the account, prefixed `mber_`. Null without the member:basic:read permission, unless the caller is the buyer. */ member_id: string | null; /** Your own key-value data attached when the setup intent was created. */ metadata: Record | null; /** The method behind this setup shaped for display: a buyer-facing name, the standard icon set, and the card's brand, last four, issuer identification number, and expiry when it was a card. Null until a method was collected. */ payment_instrument: Whop.PaymentInstrument | null; /** The saved payment method, prefixed `payt_`, ready to charge with Create Payment. Null until the setup has `succeeded`. */ payment_method_id: string | null; /** The kind of instrument being saved, for example `card` or `us_bank_account`. */ payment_method_type: Whop.PaymentMethodTypes | null; /** Where the buyer lands after completing an off-site step, or `null` to leave them where they are. */ return_url: string | null; /** How far the setup has got. **A 201 or 200 means we answered, not that the method was saved — always branch on this.** `requires_action` — the buyer has a step outstanding; hand `client_secret` to the elements or poll Retrieve setup status. `processing` — the processor is deciding. `succeeded` — the method is saved, and only this one means saved. `canceled` — abandoned or refused; see `last_setup_error`. */ status: SetupIntent.Status; /** 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. The setting requested for this setup, or `null` when unset. */ three_ds_level: SetupIntent.ThreeDsLevel | null; /** True when the buyer completed 3D Secure while saving this payment method. */ three_ds_verified: boolean; /** When the setup intent was last updated, as an ISO 8601 timestamp. */ updated_at: string; /** The user saving the payment method. Null when the buyer is a company rather than a user. */ user: Whop.UserSummary | null; } export declare namespace SetupIntent { /** How far the setup has got. **A 201 or 200 means we answered, not that the method was saved — always branch on this.** `requires_action` — the buyer has a step outstanding; hand `client_secret` to the elements or poll Retrieve setup status. `processing` — the processor is deciding. `succeeded` — the method is saved, and only this one means saved. `canceled` — abandoned or refused; see `last_setup_error`. */ const Status: { readonly Processing: "processing"; readonly Succeeded: "succeeded"; readonly Canceled: "canceled"; readonly RequiresAction: "requires_action"; }; type Status = (typeof Status)[keyof typeof Status]; /** 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. The setting requested for this setup, or `null` when unset. */ const ThreeDsLevel: { readonly MandateChallenge: "mandate_challenge"; readonly MandateIfRequired: "mandate_if_required"; readonly FrictionlessIfRequired: "frictionless_if_required"; }; type ThreeDsLevel = (typeof ThreeDsLevel)[keyof typeof ThreeDsLevel]; }