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

# Tipos del SDK

> Tipos TypeScript exportados por @zopay/js.

`@zopay/js` exporta tipos TypeScript públicos para que tu código tipe correctamente las opciones del widget y el poller, y el shape que tu callback `checkStatus` debe devolver.

```ts theme={null}
import type {
  PaymentIntent,
  StatusInfo,
  MountPaymentWidgetOptions,
  CreatePollerOptions,
} from "@zopay/js";
```

## `PaymentIntent`

El envelope que tu backend devuelve tras crear el intent y le pasas al widget en `options.intent`. Mismo shape que la respuesta de [`POST /payment-intents`](/api-reference/endpoints/post-payment-intents).

## `StatusInfo`

El shape que el callback `checkStatus` debe devolver. Lo más fácil: pasa la respuesta del API a [`normalizeIntent`](/sdk-reference/normalize-intent) y deja que produzca el `StatusInfo` por ti.

Campos clave que el widget consume:

| Campo             | Tipo                                                             | Notas                                                                                                      |
| ----------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `phase`           | `"pending" \| "partial" \| "completed" \| "failed" \| "expired"` | Estado lógico del intent. `normalizeIntent` lo deriva de `status` + `partial_payment` + `amount_received`. |
| `amountReceived`  | `number`                                                         | Cumulativo. Para mostrar barras de progreso de pago parcial.                                               |
| `amountRemaining` | `number`                                                         | Lo que falta para completar.                                                                               |
| `txHash`          | `string \| null`                                                 | Hash del último depósito, cuando existe.                                                                   |
| `addressReceiver` | `string \| null`                                                 | Dirección que recibió el último depósito.                                                                  |

## `MountPaymentWidgetOptions`

Configuración del widget. Ver tabla completa en [`mountPaymentWidget`](/sdk-reference/mount-payment-widget#parámetros).

## `CreatePollerOptions`

Configuración del poller sin UI. Ver [`createPoller`](/sdk-reference/create-poller).
