# Notificaciones/Webhooks

{% hint style="success" %}
Únete a nuestro [*<mark style="color:blue;">espacio de Slack</mark>*](https://join.slack.com/t/preauth-soporte/shared_invite/zt-18pzujyy8-F6cZBsHmZ_5OZFd16fnnWw) y te ayudaremos con tus dudas
{% endhint %}

### Configuración

En el [apartado para desarrolladores](https://dashboard.preauth.io/panel/devs) puedes configurar una URL por la cual recibir notificaciones.

![](/files/EJDqyfQnYlWUQPB8jlCY)

Cuando tengas todo configurado para recibir notificaciones, lo que haremos es enviarte la información que corresponda a cada evento por medio de un POST a la URL especificada.

### Eventos:

#### 1 Orden por desincronizarse

Esto sucede cuando, por alguna razón, la tarjeta falla al verificar su estado. El comercio debe decidir si capturar la transacción autorizada o ponerse en contacto con el usuario para tomarle una nueva tarjeta.

```javascript
{
   "type":"order.liveness.fail",
   "order":{
      "id": "4085-whOdSyS2FkGmm4j9feJNeMh0SjQDgLa5xAUENBkajsfQK",
      "reference": "order_00001",
      "currency": "PEN",
      "country": "PE",
      "limit_date": "2022-10-10",
      "amount": 15000,
      "status": "in_progress",
      "pending_amount": 15000,
      "captured_amount": 0,
      "meta": {},
      "created_at": "2021-10-15 20:31:07",
      "updated_at": "2021-10-15 20:35:28"
    }
}
```

#### 2 Orden desincronizada

Esto sucede cuando, por alguna razón, nos es imposible retomar una preautorización.

```javascript
{
   "type":"order.desynchronized",
   "order":{
      "id": "4085-whOdSyS2FkGmm4j9feJNeMh0SjQDgLa5xAUENBkajsfQK",
      "reference": "order_00001",
      "currency": "PEN",
      "country": "PE",
      "limit_date": "2022-10-10",
      "amount": 15000,
      "status": "desynchronized",
      "pending_amount": 15000,
      "captured_amount": 0,
      "meta": {},
      "created_at": "2021-10-15 20:31:07",
      "updated_at": "2021-10-15 20:35:28"
    }
}
```

**3 Orden capturada**

Esto sucede cuando se ha ejecutado el cobro parcial o total del monto autorizado.

```javascript
{
   "type":"order.captured",
    "order":{
      "id": "4085-whOdSyS2FkGmm4j9feJNeMh0SjQDgLa5xAUENBkajsfQK",
      "reference": "order_00001",
      "currency": "PEN",
      "country": "PE",
      "limit_date": "2022-10-10",
      "amount": 15000,
      "status": "in_progress",
      "pending_amount": 10000,
      "captured_amount": 5000,
      "meta": {},
      "created_at": "2021-10-15 20:31:07",
      "updated_at": "2021-10-15 20:35:28"
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.preauth.io/notificaciones.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
