/** * @example * { * account_id: "biz_xxxxxxxxxxxxxx" * } */ export interface CreateSetupIntentsRequest { /** The account to save the payment method for, prefixed `biz_`. */ account_id: string; /** A confirmation token describing a payment method the buyer just supplied, collected by the payment elements in setup mode. Provide this or `payment_method_id`, not both. The buyer is resolved from the token's billing email, or from `email`, and may still have a step to complete — poll Retrieve setup status for what to do next. */ confirmation_token?: string | null; /** The currency the saved payment method will be used with, as a lowercase ISO 4217 code. Controls which currency-specific payment methods are available. Defaults to `usd`. */ currency?: string | null; /** Overrides the buyer email carried on the confirmation token, resolving or creating the user the method belongs to. Ignored unless `confirmation_token` is provided, and when the token was created by a signed-in buyer or the caller is the buyer. */ email?: string | null; /** Custom metadata to attach to the setup intent. Returned on the setup intent and its webhooks. */ metadata?: Record | null; /** Who the saved payment method belongs to. Pass `account_id` to save it on the account itself, which needs `payment:charge` on the account. Pass your own user ID, prefixed `user_`, to save it on the authenticated user. Omit it to save it on the buyer: the caller when it is the buyer, otherwise the user the confirmation token names. Not available with `payment_method_id`, which keeps its current owner, or with `purpose`. */ owner_id?: string | null; /** An existing payment method to re-verify and save, prefixed `payt_`. Provide this or `confirmation_token`, not both. Not available to a buyer credential. */ payment_method_id?: string | null; /** What the saved payment method will pay for. Set to `ads_billing` when saving a card to pay for Whop Ads on `account_id`: the card is verified by Whop Ads, the merchant that charges it, which helps minimize security declines on ad payments, and it requires `ad_campaign:create` on `account_id`. Omit it for any other payment method. */ purpose?: CreateSetupIntentsRequest.Purpose | null; /** Where the buyer continues after completing an off-site step. An absolute https URL without credentials, at most 2,048 characters. */ return_url?: string | 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. Applies to this setup only, and only while the buyer is present: ignored with `payment_method_id`, which re-verifies off session. Not available with `purpose: ads_billing`. Defaults to `frictionless_if_required`. */ three_ds_level?: CreateSetupIntentsRequest.ThreeDsLevel | null; } export declare namespace CreateSetupIntentsRequest { /** What the saved payment method will pay for. Set to `ads_billing` when saving a card to pay for Whop Ads on `account_id`: the card is verified by Whop Ads, the merchant that charges it, which helps minimize security declines on ad payments, and it requires `ad_campaign:create` on `account_id`. Omit it for any other payment method. */ const Purpose: { readonly AdsBilling: "ads_billing"; }; type Purpose = (typeof Purpose)[keyof typeof Purpose]; /** 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. Applies to this setup only, and only while the buyer is present: ignored with `payment_method_id`, which re-verifies off session. Not available with `purpose: ads_billing`. Defaults to `frictionless_if_required`. */ const ThreeDsLevel: { readonly MandateChallenge: "mandate_challenge"; readonly MandateIfRequired: "mandate_if_required"; readonly FrictionlessIfRequired: "frictionless_if_required"; }; type ThreeDsLevel = (typeof ThreeDsLevel)[keyof typeof ThreeDsLevel]; }