> 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 capture engine’s default (the property is only sent if defined)

## Morphology

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

## Description

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

When the limit is exceeded, the widget emits [maxAttemptsExceeded](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/eventos/maxattemptsexceeded.md) and stops retrying the capture. Without this property, the integration had to track retries itself based on [extractionTimeout](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/eventos/extractiontimeout.md) and [timeoutErrorButtonClick](https://docs.facephi.com/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 capture engine’s default value is applied.

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

***

## Example

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