> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# WithdrawElement

> Recoge un importe de pago y un método de pago guardado, agrupa las opciones de entrega estándar e instantánea con comisiones en vivo y estimaciones de llegada, y recoge un nuevo método de pago cuando es necesario. Cuando el host no gestiona el flujo, el elemento lista los métodos y crea el pago por sí mismo: pasa `accessToken` (o confía en la sesión del visitante en el mismo origen). Un host que ya se comunica con la API de pagos puede seguir proporcionando métodos, límites e indicadores de carga; al confirmar, se emite `withdrawalRequested` para que ese host cree el pago.

> [!NOTE]
>
> Esta página documenta `@whop/elements@1.10.0` y `@whop/elements-react@1.10.0`.

*Desde `v1.0.0`.*

Se monta dentro de [`Wallet`](https://docs.whop.com/es/elements/latest/wallet/overview). `accountId` y `accessToken` provienen de ahí. Pasa las props y los callbacks a través de las opciones de creación o de las props de React. Conserva el handle creado, o la `ref` de React, para llamar a `refresh()`.

> [!NOTE]
>
> Puedes montar este elemento **en línea** (`create`) o abrirlo como un overlay **modal** (`createOverlay`).

```tsx React theme={null}
import { WhopElements, Wallet, WithdrawElement } from "@whop/elements-react";
import { loadWhop } from "@whop/elements";

function Example() {
  return (
    <WhopElements elements={loadWhop()}>
      <Wallet /* options */>
        <WithdrawElement onAmountChanged={(e) => console.log(e)} onCountryChanged={(e) => console.log(e)} onSupportedMethodChanged={(e) => console.log(e)} onAddMethodRequested={(e) => console.log(e)} onPlaidLinkRequested={(e) => console.log(e)} onMethodVerificationCompleted={(e) => console.log(e)} onRenameMethodRequested={(e) => console.log(e)} onRemoveMethodRequested={(e) => console.log(e)} onPayoutQuoteRequested={(e) => console.log(e)} onWithdrawalRequested={(e) => console.log(e)} onDone={(e) => console.log(e)} />
      </Wallet>
    </WhopElements>
  );
}
```

```html JavaScript theme={null}
<script src="https://cdn.whop.com/elements/amber/elements.js" data-whop-elements></script>
<script type="module">
  const wallet = window.WhopElements().wallet.create({ /* options */ });
  wallet.create('withdraw', {
    onAmountChanged: (e) => console.log(e),
    onCountryChanged: (e) => console.log(e),
    onSupportedMethodChanged: (e) => console.log(e),
    onAddMethodRequested: (e) => console.log(e),
    onPlaidLinkRequested: (e) => console.log(e),
    onMethodVerificationCompleted: (e) => console.log(e),
    onRenameMethodRequested: (e) => console.log(e),
    onRemoveMethodRequested: (e) => console.log(e),
    onPayoutQuoteRequested: (e) => console.log(e),
    onWithdrawalRequested: (e) => console.log(e),
    onDone: (e) => console.log(e)
  }).mount('#wallet-withdraw');
</script>
```

Datos de ejemplo. [Abre el Playground](https://docs.whop.com/es/elements/latest/wallet/overview#playground).

## Props

**accessToken** `string`

Un token con alcance limitado para listar los métodos de pago y crear el pago; necesita `payout:withdraw_funds`, `payout:destination:read` y `payout:create_destination` para añadir un banco. Si se omite, las llamadas llevan la propia sesión del visitante, que solo responde en el mismo origen.

**succeeded** `boolean`

Si el pago confirmado se creó correctamente. Por defecto es `false`.

**loading** `boolean`

Si se están cargando los métodos de pago y los límites. Por defecto es `false`.

**methods** `WithdrawalMethod[]`

Métodos de pago guardados con presupuestos para el importe actual. Por defecto es `[]`.

**propiedades**

**id** `string` *required*

**createdAt** `string | null`

**nickname** `string | null`

**accountReference** `string | null`

**payerName** `string | null`

**destinationCurrency** `string` *required*

**isDefault** `boolean` *required*

**iconUrl** `string | null`

**name** `string | null`

**deliveryType** `string` *required*

**supportsStandard** `boolean` *required*

**supportsInstant** `boolean` *required*

**bankVerificationState** `string | null`

**unavailableReason** `string | null`

**feeStructure** `object | null`

**propiedades**

**percentage** `number` *required*

**fixedAmount** `number` *required*

**currency** `string` *required*

**standardEstimatedArrival** `string | null`

**instantEstimatedArrival** `string | null`

**quote** `WithdrawalQuote | null`

**propiedades**

**amount** `number` *required*

**currency** `string` *required*

**destinationCurrency** `string` *required*

**exchangeRate** `number` *required*

**minLimit** `number` *required*

**maxLimit** `number | null`

**instantUnavailableReason** `"minimum_crypto_sales_not_met" | null`

**standard** `WithdrawalQuoteSpeed | null`

**propiedades**

**estimatedArrival** `string | null`

**fee** `number` *required*

**totalReceived** `number` *required*

**currency** `string`

**destinationCurrency** `string`

**exchangeRate** `number`

**minLimit** `number`

**maxLimit** `number | null`

**instant** `WithdrawalQuoteSpeed | null`

**propiedades**

**estimatedArrival** `string | null`

**fee** `number` *required*

**totalReceived** `number` *required*

**currency** `string`

**destinationCurrency** `string`

**exchangeRate** `number`

**minLimit** `number`

**maxLimit** `number | null`

**error** `string`

Un error del lado del host que se muestra dentro de la pantalla actual. Por defecto es `""`.

**availableBalance** `number`

Saldo liquidado disponible para los métodos de pago estándar. Por defecto es `0`.

**pendingBalance** `number`

Saldo pendiente que puede estar disponible para los métodos de pago instantáneo. Por defecto es `0`.

**payoutCountry** `string`

El país ISO 3166-1 alfa-2 de la cuenta de pagos. Por defecto es `"US"`.

**supportedMethods** `WithdrawalSupportedMethod[]`

Métodos de pago que se pueden añadir en el país seleccionado, incluidos los campos obligatorios. Por defecto es `[]`.

**propiedades**

**id** `string` *required*

**name** `string | null`

**iconUrl** `string | null`

**deliveryType** `string` *required*

**supportsStandard** `boolean` *required*

**supportsInstant** `boolean` *required*

**supportsPlaid** `boolean`

**feeStructure** `object | null`

**propiedades**

**percentage** `number` *required*

**fixedAmount** `number` *required*

**currency** `string` *required*

**quotes** `WithdrawalQuote[]` *required*

**propiedades**

**amount** `number` *required*

**currency** `string` *required*

**destinationCurrency** `string` *required*

**exchangeRate** `number` *required*

**minLimit** `number` *required*

**maxLimit** `number | null`

**instantUnavailableReason** `"minimum_crypto_sales_not_met" | null`

**standard** `WithdrawalQuoteSpeed | null`

**propiedades**

**estimatedArrival** `string | null`

**fee** `number` *required*

**totalReceived** `number` *required*

**currency** `string`

**destinationCurrency** `string`

**exchangeRate** `number`

**minLimit** `number`

**maxLimit** `number | null`

**instant** `WithdrawalQuoteSpeed | null`

**propiedades**

**estimatedArrival** `string | null`

**fee** `number` *required*

**totalReceived** `number` *required*

**currency** `string`

**destinationCurrency** `string`

**exchangeRate** `number`

**minLimit** `number`

**maxLimit** `number | null`

**requiredFields** `WithdrawalRequiredField[]` *required*

**propiedades**

**id** `string` *required*

**label** `string` *required*

**inputType** `string` *required*

**required** `boolean` *required*

**sensitive** `boolean` *required*

**placeholder** `string | null`

**validation** `string | null`

**options** `string[] | null`

**supportedMethodsLoading** `boolean`

Si se están cargando los métodos de pago admitidos para el país seleccionado. Por defecto es `false`.

**limits** `WithdrawalLimits`

Límites de pago estándar e instantáneo en vivo. Por defecto es `{"standard":{"maxAmount":0},"instant":{"maxAmount":0}}`.

**propiedades**

**standard** `object` *required*

**propiedades**

**maxAmount** `number` *required*

**errorCode** `string | null`

**errorMessage** `string | null`

**instant** `object` *required*

**propiedades**

**maxAmount** `number` *required*

**dailyAmountRemaining** `number | null`

**resetsAt** `string | null`

**errorCode** `string | null`

**errorMessage** `string | null`

**quoteLoading** `boolean`

Si se está volviendo a calcular el precio del importe actual. Por defecto es `false`.

**payoutQuoteRequired** `boolean`

Si este pago debe usar un presupuesto exacto respaldado por el proveedor antes de la confirmación. Por defecto es `false`.

**payoutQuote** `WithdrawalPayoutQuote | null`

El presupuesto de pago exacto y de corta duración para la confirmación. Incluye serverTime para que el presupuesto se cronometre según su vida útil restante y no según el reloj del dispositivo. Incluye recommendedMethod para ofrecer un método más barato a través del flujo de conexión sin cambiar el método seleccionado. Por defecto es `null`.

**propiedades**

**requestId** `string` *required*

**payoutMethodId** `string` *required*

**speed** `"standard" | "instant"` *required*

**id** `string` *required*

**amount** `WithdrawalMoney` *required*

**propiedades**

**currency** `string` *required*

**amount** `string` *required*

**decimals** `number` *required*

**display\_decimals** `number` *required*

**fee** `WithdrawalMoney` *required*

**propiedades**

**currency** `string` *required*

**amount** `string` *required*

**decimals** `number` *required*

**display\_decimals** `number` *required*

**netAmount** `WithdrawalMoney` *required*

**propiedades**

**currency** `string` *required*

**amount** `string` *required*

**decimals** `number` *required*

**display\_decimals** `number` *required*

**destinationAmount** `WithdrawalMoney` *required*

**propiedades**

**currency** `string` *required*

**amount** `string` *required*

**decimals** `number` *required*

**display\_decimals** `number` *required*

**exchangeRate** `number` *required*

**serverTime** `string`

**expiresAt** `string` *required*

**quoteToken** `string` *required*

**recommendedMethod** `object | null`

**propiedades**

**supportedPayoutMethodId** `string` *required*

**name** `string` *required*

**country** `string` *required*

**destinationCurrency** `string` *required*

**estimatedSavings** `WithdrawalMoney` *required*

**propiedades**

**currency** `string` *required*

**amount** `string` *required*

**decimals** `number` *required*

**display\_decimals** `number` *required*

**estimatedFee** `WithdrawalMoney` *required*

**propiedades**

**currency** `string` *required*

**amount** `string` *required*

**decimals** `number` *required*

**display\_decimals** `number` *required*

**estimatedArrival** `string | null`

**payoutQuoteLoading** `boolean`

Si se está creando un presupuesto de pago exacto. Por defecto es `false`.

**payoutQuoteError** `string`

El error de la solicitud actual de presupuesto de pago exacto, si lo hay. Por defecto es `""`.

**payoutQuoteRetryRequired** `boolean`

Si la última solicitud de presupuesto no fue concluyente y debe reintentarse con el mismo ID de solicitud. Por defecto es `false`.

**withdrawalRetryRequired** `boolean`

Si el último resultado del pago no fue concluyente y debe reintentarse exactamente. Por defecto es `false`.

**unresolvedWithdrawalRequest** `WithdrawalRequest | null`

La solicitud de pago exacta sin resolver que se debe reintentar después de que el elemento se vuelva a montar. Por defecto es `null`.

**propiedades**

**amount** `number` *required*

**currency** `string` *required*

**payoutMethodId** `string` *required*

**presentedFee** `number` *required*

**quoteId** `string`

**quoteToken** `string`

**speed** `"standard" | "instant"` *required*

**notes** `string`

**acknowledgeBankWarning** `boolean`

**savingMethod** `boolean`

Si se está guardando un nuevo método de pago. Por defecto es `false`.

**submitting** `boolean`

Si se está creando el pago confirmado. Por defecto es `false`.

**bankWarning** `boolean`

True cuando el último pago se rechazó porque el banco no pudo confirmar el nombre del titular de la cuenta. Muestra una opción para corregir o confirmar; al confirmar, se vuelve a emitir withdrawalRequested con acknowledgeBankWarning establecido. Vuelve a establecerlo en false al gestionar cada withdrawalRequested: la opción aparece con el cambio a true, así que un indicador que se deja en true oculta todos los rechazos posteriores. Por defecto es `false`.

**createdMethodId** `string`

El método creado más recientemente, que se selecciona cuando aparece en los métodos. Por defecto es `""`.

**plaidUnavailable** `boolean`

Se establece cuando el pagador salió de Plaid Link o este no se pudo abrir. Desbloquea la introducción manual en una vía que, de otro modo, requiere vincular. Por defecto es `false`.

**linkingBank** `boolean`

Si hay una vinculación bancaria en curso: la sesión de Plaid está abierta o se está guardando el método vinculado. Por defecto es `false`.

## Eventos

Pasa los callbacks en las opciones de creación o como props de React.

### `onAmountChanged`

El importe cambió y se debe volver a calcular su precio.

**payload** `object`

**propiedades**

**amount** `number` *required*

### `onCountryChanged`

El país para añadir métodos cambió y se deben actualizar los métodos admitidos.

**payload** `object`

**propiedades**

**country** `string` *required*

### `onSupportedMethodChanged`

Se seleccionó un método de pago admitido y se deben cargar sus campos obligatorios exactos.

**payload** `object`

**propiedades**

**country** `string` *required*

**supportedPayoutMethodId** `string` *required*

**destinationCurrency** `string` *required*

### `onAddMethodRequested`

El pagador envió el formulario dinámico para añadir un método de pago.

**payload** `WithdrawalCreateMethodInput`

**propiedades**

**country** `string` *required*

**supportedPayoutMethodId** `string` *required*

**destinationCurrency** `string` *required*

**nickname** `string` *required*

**fields** `Record\<string, string\>` *required*

### `onPlaidLinkRequested`

El pagador eligió vincular su banco a través de Plaid en lugar de escribir los datos. Abre Plaid Link al recibirlo.

**payload** `object`

**propiedades**

**country** `string` *required*

**supportedPayoutMethodId** `string` *required*

**destinationCurrency** `string` *required*

### `onMethodVerificationCompleted`

El método de pago recién añadido terminó su paso de verificación.

### `onRenameMethodRequested`

El pagador solicitó cambiar el nombre de un método de pago guardado.

**payload** `object`

**propiedades**

**methodId** `string` *required*

### `onRemoveMethodRequested`

El pagador solicitó eliminar un método de pago guardado.

**payload** `object`

**propiedades**

**methodId** `string` *required*

### `onPayoutQuoteRequested`

El pagador solicitó un presupuesto exacto de corta duración antes de confirmar un pago.

**payload** `WithdrawalPayoutQuoteRequest`

**propiedades**

**requestId** `string` *required*

**amount** `number` *required*

**currency** `string` *required*

**payoutMethodId** `string` *required*

**speed** `"standard" | "instant"` *required*

### `onWithdrawalRequested`

El pagador confirmó el pago. Cuando el host gestiona el flujo, crea el pago al recibirlo. Cuando el elemento lo creó, este evento se dispara tras el éxito para que el host pueda actualizar los saldos: no crees un segundo pago.

**payload** `WithdrawalRequest`

**propiedades**

**amount** `number` *required*

**currency** `string` *required*

**payoutMethodId** `string` *required*

**presentedFee** `number` *required*

**quoteId** `string`

**quoteToken** `string`

**speed** `"standard" | "instant"` *required*

**notes** `string`

**acknowledgeBankWarning** `boolean`

### `onDone`

El pagador terminó de revisar un pago correcto.

### `onLoaderStart`

Se ejecuta después de que el esqueleto de carga se pinta por primera vez y antes de `onReady`.

### `onReady`

Se ejecuta después del primer pintado completo del elemento.

### `onError`

Se ejecuta cuando el elemento no se carga o falla. El contenido de respaldo permanece visible. Usa `code` para el manejo programático. `sourceKey` identifica una fuente de estado del host que falló.

**e** `object`

**propiedades**

**message** `string` *required*

**code** `string`

**sourceKey** `string`

## Métodos

Llámalos en el handle que devuelve `create`, o a través de una `ref` de React.

### `refresh`

Vuelve a obtener los métodos de pago guardados y los límites. Llámalo después de que algo por tu parte cambie a dónde puede pagar la cuenta.

**Devuelve** `Promise<void>`

### `mount`

Monta el elemento en `target` y comienza a cargarlo. Los componentes de React se montan solos.

**Parámetros**

**target** `string | HTMLElement` *required*

### `destroy`

Elimina el elemento y libera su frame y sus suscripciones. Puedes llamarlo más de una vez. React elimina el elemento automáticamente.

### `update`

Combina nuevas props en el elemento montado. En React, cambia las props del componente en su lugar.

**Parámetros**

**options** `Partial\<WithdrawElementProps\>` *required*

## Estilos

Este elemento no expone nombres de clase para estilos. Usa `appearance` (tema, color de acento, variables) para cambiar su estilo.


## Related topics

- [Wallet](https://docs.whop.com/es/elements/latest/wallet/overview.md)
- [ActionsElement](https://docs.whop.com/es/elements/latest/wallet/actions.md)
- [SendElement](https://docs.whop.com/es/elements/latest/wallet/send.md)
