import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs"; import * as core from "../../../../core/index.mjs"; import * as Whop from "../../../index.mjs"; import { CustomerTrackingClient } from "../resources/customerTracking/client/Client.mjs"; import { FeesClient } from "../resources/fees/client/Client.mjs"; import { FinancingProvidersClient } from "../resources/financingProviders/client/Client.mjs"; import { PreferencesClient } from "../resources/preferences/client/Client.mjs"; import { ReservesClient } from "../resources/reserves/client/Client.mjs"; export declare namespace AccountsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * An Account represents a person or business on Whop that can have its own profile, wallet, and account-scoped settings. Use accounts for customers, creators, merchants, sellers, or connected businesses your integration supports. * * Use the Accounts API to create accounts, list accounts visible to your credentials, retrieve or update an account, suspend or delete a connected account managed by your platform, and retrieve the account associated with the current API key. */ export declare class AccountsClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _customerTracking: CustomerTrackingClient | undefined; protected _fees: FeesClient | undefined; protected _financingProviders: FinancingProvidersClient | undefined; protected _preferences: PreferencesClient | undefined; protected _reserves: ReservesClient | undefined; constructor(options?: AccountsClient.Options); get customerTracking(): CustomerTrackingClient; get fees(): FeesClient; get financingProviders(): FinancingProvidersClient; get preferences(): PreferencesClient; get reserves(): ReservesClient; /** * Lists accounts visible to the credential. User tokens return the user's business accounts; Account API keys return the requesting account and its connected accounts. * * @param {Whop.ListAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.list() */ list(request?: Whop.ListAccountsRequest, requestOptions?: AccountsClient.RequestOptions): Promise>; /** * Creates an account. User tokens create business accounts; Account API keys create connected accounts. Tax fields (`tax_remitted_by`, `tax_type`, `product_tax_code_id`, `business_address`, `tax_identifiers`) are configured with Update Account, not at creation. * * @param {Whop.CreateAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.create() */ create(request?: Whop.CreateAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves the account associated with the current Account API key. * * @param {Whop.MeAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.me() */ me(request?: Whop.MeAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __me; /** * @deprecated * * Finds accounts by name among the accounts the credential can list. Support searches cover every company and return only the 50 best matches. * * @param {Whop.SearchAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.search({ * query: "query" * }) */ search(request: Whop.SearchAccountsRequest, requestOptions?: AccountsClient.RequestOptions): Promise>; /** * Retrieves an account visible to the credential by ID or public route, including its crypto wallet. * * @param {Whop.RetrieveAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Deletes a connected account directly owned by the authenticated platform account. The account must have no settled, pending, or reserved balance in any currency and no active, trialing, or past-due memberships. The account stops resolving immediately, and its products, plans, and team access are removed in the background; payment history is retained. Deletion cannot be undone through the API. This cannot delete the platform account itself or an account owned by another platform. * * @param {Whop.DeleteAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.delete({ * id: "id" * }) */ delete(request: Whop.DeleteAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Updates an account. User tokens can update business accounts; Account API keys can update connected accounts. * * @param {Whop.UpdateAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.update({ * id: "id" * }) */ update(request: Whop.UpdateAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Starts an LLC or C-Corp formation for a business account. The application is validated and the response returns a hosted checkout URL; once paid, the filing is submitted. Track progress through the account's [`company_formation`](/api-reference/beta/accounts/retrieve-account) field on Retrieve Account. * * @param {Whop.FormCompanyAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.formCompany({ * id: "id", * business_address: { * city: "Austin", * country: "US", * line1: "4180 Burnet Rd", * line2: "Suite 2", * postal_code: "78756", * state: "TX" * }, * business_name: "Shine Time Auto Detailing", * business_phone: "+15125550142", * business_website: "https://shinetime.example", * entity_suffix: "LLC", * entity_type: "llc", * expedite_ein: true, * formation_state: "WY", * founders: [{ * address: { * city: "Austin", * country: "US", * line1: "907 Ridgemont Dr", * line2: "Apt 4", * postal_code: "78704", * state: "TX" * }, * date_of_birth: "1988-03-14", * email: "marcus@shinetime.example", * first_name: "Marcus", * is_primary: true, * last_name: "Webb", * ownership_percentage: 100, * phone: "+15125550142", * roles: ["president"], * ssn: "123-45-6789" * }], * share_structure: { * number_of_shares: 123, * value: 123 * }, * use_registered_agent: true * }) */ formCompany(request: Whop.FormCompanyAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __formCompany; /** * Queues one background retry of the account's failed ads payments across its campaigns, using the account's configured ads payment methods. A queued response does not mean payment succeeded; read each campaign's `delivery_status` and `issues` for the outcome. Successful settlement clears the payment block without changing a configured `active` or `paused` status; a legacy `payment_failed` status becomes `paused`. Returns an error when the account has no failed ads payments, or while a previous retry for the account is queued or running. * * @param {Whop.RetryAdsPaymentAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.retryAdsPayment({ * id: "id" * }) */ retryAdsPayment(request: Whop.RetryAdsPaymentAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __retryAdsPayment; /** * Suspends a connected account directly owned by the authenticated platform account. This cannot suspend the platform account itself or an account owned by another platform. * * @param {Whop.SuspendAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.suspend({ * id: "id" * }) */ suspend(request: Whop.SuspendAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __suspend; /** * Transfers ownership of the account to another user, identified by user ID or email address. If the recipient already holds the owner role, ownership moves immediately; otherwise they get an invite and ownership moves when they accept. The Whop CLI and MCP can hand off a business their user owns as a partner (`as_partner: true`) with the `partner:handoff` scope; other OAuth apps cannot transfer ownership. * * @param {Whop.TransferOwnershipAccountsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.accounts.transferOwnership({ * id: "id", * identifier: "marcus@shinetime.example" * }) */ transferOwnership(request: Whop.TransferOwnershipAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise; private __transferOwnership; }