> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/propiedades/maxattempts.md).

# maxAttempts

Maximum number of document capture attempts.

## Details

**Attribute:** `max-attempts`

**Type:** `number`

**Supported values:** `0` or higher

**Default value:** the one from the capture engine (the property is only sent if it is defined)

## Morphology

```typescript
selphid.maxAttempts = 3;
```

## Description

Maximum number of capture attempts that the user can make in `facephi-selphid-widget` before the widget considers the process exhausted.

When the limit is exceeded, the widget emits [maxAttemptsExceeded](/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/eventos/maxattemptsexceeded.md) and stops retrying the capture. Without this property, the Integration had to keep track of retries on its own starting from [extractionTimeout](/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/eventos/extractiontimeout.md) and [timeoutErrorButtonClick](/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/eventos/timeouterrorbuttonclick.md).

### Considerations

If the property is not defined, the widget does not send it to the engine and the default value of the capture engine is applied.

This property limits the attempts of the entire capture Flow. It does not replace [captureRetries](/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/propiedades/captureretries.md), which controls the capture retries for each side of the document.

***

## Example

```jsx
<facephi-selphid-widget
    maxAttempts={3}
    onMaxAttemptsExceeded={(event) => {
      console.log('Intentos agotados:', event.detail.detail);
    }}
/>
```
