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 { MethodsClient } from "../resources/methods/client/Client.mjs"; import { PaypalLinkSessionsClient } from "../resources/paypalLinkSessions/client/Client.mjs"; import { SupportedMethodsClient } from "../resources/supportedMethods/client/Client.mjs"; export declare namespace PayoutsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * Payouts represent money sent from an account or user balance to an external destination, such as a bank account, wallet, or other saved payout method. * * Use the Payouts API to create and track payouts, manage saved payout methods, and show expected arrival details for funds leaving Whop. */ export declare class PayoutsClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _methods: MethodsClient | undefined; protected _paypalLinkSessions: PaypalLinkSessionsClient | undefined; protected _supportedMethods: SupportedMethodsClient | undefined; constructor(options?: PayoutsClient.Options); get methods(): MethodsClient; get paypalLinkSessions(): PaypalLinkSessionsClient; get supportedMethods(): SupportedMethodsClient; /** * Lists an account's or user's payouts, newest first. * * @param {Whop.ListPayoutsRequest} request * @param {PayoutsClient.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.payouts.list() */ list(request?: Whop.ListPayoutsRequest, requestOptions?: PayoutsClient.RequestOptions): Promise>; /** * Sends money from an account or user balance to a saved payout method for that owner. * * @param {Whop.CreatePayoutsRequest} request * @param {PayoutsClient.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.payouts.create({ * amount: 50, * payout_method_id: "potk_xxxxxxxxxxxxxx" * }) */ create(request: Whop.CreatePayoutsRequest, requestOptions?: PayoutsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Creates a short-lived, provider-backed quote of a payout's fee, exchange rate, and destination amount. No funds move until you submit the returned `quote_token` to `POST /payouts`. * * @param {Whop.CreateQuotePayoutsRequest} request * @param {PayoutsClient.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.payouts.createQuote({ * payout_method_id: "potk_xxxxxxxxxxxxxx" * }) */ createQuote(request: Whop.CreateQuotePayoutsRequest, requestOptions?: PayoutsClient.RequestOptions): core.HttpResponsePromise; private __createQuote; /** * Retrieves a payout by its `wdrl_` ID, or by the `cofr_` conversion request ID a payout carries as `payout_request_id`. Authentication is optional: anyone with the ID can view tracking details, including notes, trace code, exchange rate, and payout request ID, while accounting fields require `payout:withdrawal:read` on the account or user that owns the payout. A supplied invalid credential returns 401. * * @param {Whop.RetrievePayoutsRequest} request * @param {PayoutsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.payouts.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrievePayoutsRequest, requestOptions?: PayoutsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Cancels a payout before it is sent to the payout provider, or asks the provider to stop one already sent. While the payout is `in_review`, or `processing` with nothing sent yet (see `cancelable`), it is canceled and the funds, fees included, return to the balance. Once sent, the response is 202 with a `cancellation` object, and the payout reads `canceled` only if the provider confirms it stopped. A `requested` payout returns 409 until it reaches review, a payout the provider can no longer stop returns 409 with error type `not_cancelable`, and canceling an already-canceled payout returns it unchanged. * * @param {Whop.CancelPayoutsRequest} request * @param {PayoutsClient.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.payouts.cancel({ * id: "id" * }) */ cancel(request: Whop.CancelPayoutsRequest, requestOptions?: PayoutsClient.RequestOptions): core.HttpResponsePromise; private __cancel; }