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

# Webhooks

> Los webhooks le permiten configurar un sistema de notificaciones que puede usarse para recibir actualizaciones sobre ciertas solicitudes realizadas a la API de Yiksi Pay.

<Note>
  En pocas palabras<br />
  Los webhooks envían notificaciones en tiempo real a tu servidor cuando ocurren eventos—depósitos, retiros, intercambios y más. En lugar de consultar la API, tu servidor recibe actualizaciones instantáneas cuando se completan las transacciones.
</Note>

## Requisitos Previos

Antes de configurar webhooks, asegúrate de tener:

<Steps>
  <Step title="Clave API">
    Obtén tu clave API desde el [Panel de Yiksi Pay](https://dashboard.yiksipay.com). Navega a **Developers** para generar una.
  </Step>

  <Step title="Endpoint de Webhook">
    Crea un endpoint POST en tu servidor que pueda recibir cargas JSON y devolver una respuesta `200 OK`.
  </Step>

  <Step title="URL HTTPS (Producción)">
    Para producción, tu URL de webhook debe usar HTTPS. Para pruebas locales, usa herramientas como [ngrok](https://ngrok.com/) o [webhook.site](https://webhook.site).
  </Step>

  <Step title="Configuración de URL">
    Configura tu URL de webhook en la página de desarrolladores desde tu espacio de inicio.
  </Step>
</Steps>

## Cómo Funciona

Cuando realizas una solicitud a un endpoint de API, esperas obtener una respuesta casi inmediata. Sin embargo, algunas solicitudes pueden tardar mucho tiempo en procesarse, lo que puede generar errores de tiempo de espera. Para evitar un error de tiempo de espera, se devuelve una respuesta pendiente. Dado que tus registros deben actualizarse con el estado final de la solicitud, necesitas:

1. Realizar una solicitud de actualización (comúnmente conocido como polling) o,
2. Escuchar eventos mediante el uso de una URL de webhook.

<Tip>
  Consejo útil<br />
  Recomendamos que utilice webhooks para proporcionar valor a sus clientes en lugar de usar callbacks o polling. Con los callbacks, no tenemos control sobre lo que sucede del lado del cliente. Tampoco usted. Los callbacks pueden fallar si la conexión de red del dispositivo del cliente falla o es débil, o si el dispositivo se apaga después de una transacción.
</Tip>

## Polling vs Webhooks

El polling requiere realizar una solicitud `GET` a intervalos regulares para obtener el estado final de una solicitud. Por ejemplo, cuando emite una dirección a un cliente para depósitos, sigue realizando solicitudes de transacciones vinculadas a la dirección hasta que encuentre una.

Con webhooks, el servidor de recursos, Yiksi Pay en este caso, envía actualizaciones a su servidor cuando cambia el estado de su solicitud. El cambio en el estado de una solicitud se conoce como evento. Normalmente escuchará estos eventos en un endpoint POST llamado su URL de webhook.

La siguiente tabla destaca algunas diferencias entre polling y webhooks:

|                            | **Polling** | **Webhooks** |
| -------------------------- | ----------- | ------------ |
| **Modo de actualización**  | Manual      | Automático   |
| **Limitación de tasa**     | Sí          | No           |
| **Impactado por escalado** | Sí          | No           |

## Crear una URL de webhook

Una URL de webhook es simplemente un endpoint POST al que un servidor de recursos envía actualizaciones. La URL necesita analizar una solicitud JSON y devolver un `200 OK`:

<CodeGroup>
  ```javascript webhook.js theme={null}
  // Usando Express
  app.post("/my/webhook/url", function(req, res) {
      // Recuperar el cuerpo de la solicitud
      const event = req.body;
      // Hacer algo con el evento
      res.send(200);
  });
  ```

  ```php webhook.php theme={null}
  <?php
  // Recuperar el cuerpo de la solicitud and parse it as JSON
  $input = file_get_contents("php://input");
  $event = json_decode($input, true);

  // Verificar errores de análisis JSON
  if (json_last_error() !== JSON_ERROR_NONE) {
      http_response_code(400); // Solicitud incorrecta
      echo json_encode(["error" => "Invalid JSON"]);
      exit();
  }

  // Hacer algo con $event
  // Por ejemplo, registrar el evento o procesarlo
  // log_event($event);

  // Enviar una respuesta exitosa
  http_response_code(200); // Código de estado HTTP 200 OK
  echo json_encode(["status" => "success"]);
  ?>
  ```
</CodeGroup>

Cuando su URL de webhook recibe un evento, necesita analizar y reconocer el evento. Reconocer un evento significa devolver un `200 OK` en el encabezado HTTP. Sin un `200 OK` en el encabezado de respuesta, seguiremos enviando eventos durante las próximas 2 horas y 35 minutos:

* Intentaremos enviar webhooks 5 veces con un retraso creciente entre cada intento, comenzando con 5 minutos y aumentando exponencialmente hasta 80 minutos. La duración total de estos 5 intentos abarcará aproximadamente 2 horas y 35 minutos.

<Warning>
  Evite tareas de larga duración<br />
  Si tiene tareas de larga duración en su función de webhook, debe reconocer el evento antes de ejecutar las tareas de larga duración. Las tareas de larga duración conducirán a un tiempo de espera de solicitud y una respuesta de error automática de su servidor. Sin una respuesta 200 OK, reintentamos como se describe en el párrafo anterior.
</Warning>

## Probar Webhooks localmente

Durante el desarrollo, puede configurar su URL de webhook en su entorno de billetera maestra de PRUEBA a una dirección local, como `http://localhost` o `127.0.0.1`.

Para exponer su servidor local a Internet con fines de prueba, considere usar una herramienta como [ngrok](https://ngrok.com/) o [webhook.site](https://webhook.site). Estas herramientas le permiten ver cómo se ve la carga útil del webhook y simular eventos de webhook localmente antes de implementar su aplicación en un entorno en vivo.

Con estas herramientas, puede asegurarse de que su integración de webhook funcione correctamente y manejar cualquier problema en un entorno local controlado antes de pasar a producción.

### Reenviar Webhook de Transacción

En caso de que por alguna razón no reciba el webhook de transacción y el tiempo de espera haya transcurrido, hemos proporcionado una API que puede usar para reenviar un webhook de transacción

<Warning>
  ¡Úselo con precaución!<br />
  Como esto puede llevar a procesar transacciones ya completadas, asegúrese de tener una validación adecuada al usar este endpoint.
</Warning>

<CodeGroup>
  ```bash resend.cmd theme={null}
  curl --request POST \
    --url https://api.yiksipay.com/v1/wallets/{walletId}/transactions/webhooks/resend \
    --header 'Content-Type: application/json' \
    --header 'x-api-key: <api-key>' \
    --data '{
    "id": "TRANSACTION_ID"
  }'
  ```

  ```js resend.js theme={null}
  const options = {
    method: 'POST',
    headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
    body: '{"id":"TRANSACTION_ID"}'
  };

  fetch('https://api.yiksipay.com/v1/wallets/{walletId}/transactions/webhooks/resend', options)
    .then(response => response.json())
    .then(response => console.log(response))
    .catch(err => console.error(err));
  ```
</CodeGroup>

## Verificar el origen del evento

Dado que su URL de webhook está disponible públicamente, necesita verificar que los eventos provengan de Yiksi Pay y no de un actor malicioso. Hay dos formas de asegurar que los eventos a su URL de webhook provengan de Yiksi Pay:

1. Validación de firma (recomendado)

### Validación de firma

Los eventos enviados desde Yiksi Pay llevan el encabezado x-yiksipay-signature. El valor de este encabezado es una firma HMAC SHA512 de la carga útil del evento firmada usando su clave secreta. La verificación de la firma del encabezado debe realizarse antes de procesar el evento:

<CodeGroup>
  ```js signature.js theme={null}
  const crypto = require('crypto');
  const apiKey = process.env.WALLET_API_KEY;
  // Usando Express
  app.post("/my/webhook/url", function(req, res) {
      //validar evento
      const hash = crypto.createHmac('sha512', apiKey).update(JSON.stringify(req.body)).digest('hex');
      if (hash == req.headers['x-yiksipay-signature']) {
      // Recuperar el cuerpo de la solicitud
      const event = req.body;
      // Hacer algo con el evento  
      }
      res.send(200);
  });
  ```

  ```php signature.php theme={null}
  <?php

  // Recuperar el cuerpo de la solicitud
  $body = file_get_contents('php://input');

  // Obtener la clave API del entorno
  $apiKey = getenv('WALLET_API_KEY');

  // Usando HMAC-SHA512 para hash
  $signature = hash_hmac('sha512', $body, $apiKey);

  // Verificar si la firma coincide con la proporcionada en los encabezados
  if ($signature === $_SERVER['HTTP_X_YIKSIPAY_SIGNATURE']) {
      // La firma es válida, proceder con el procesamiento del evento
      $event = json_decode($body, true);
      // Hacer algo con $event
  }

  // Enviar una respuesta 200 OK
  http_response_code(200);
  ```

  ```python signature.py theme={null}
  import hmac
  import hashlib
  import json
  from flask import Flask, request, jsonify

  app = Flask(__name__)

  @app.route("/my/webhook/url", methods=["POST"])
  def webhook():
      # Recuperar el cuerpo de la solicitud
      body = request.get_data()

      # Obtener la clave API
      api_key = os.environ.get('WALLET_API_KEY')

      # Usando HMAC-SHA512 para hash
      signature = hmac.new(api_key.encode('utf-8'), body, hashlib.sha512).hexdigest()

      # Verificar si la firma coincide con la proporcionada en los encabezados
      if signature == request.headers.get('X-YiksiPay-Signature'):
          # La firma es válida, proceder con el procesamiento del evento
          event = json.loads(body.decode('utf-8'))
          # Hacer algo con el evento

      # Enviar una respuesta 200 OK
      return '', 200
  ```
</CodeGroup>

## Lista de verificación para poner en producción

Ahora que ha creado exitosamente su URL de webhook, aquí hay algunas formas de asegurar que obtenga una experiencia agradable:

* Agregue la URL de webhook en su página de desarrolladores en el panel de [Yiksi Pay](https://dashboard.yiksipay.com/developers)
* Asegúrese de que su URL de webhook esté disponible públicamente (las URLs de localhost no pueden recibir eventos)
* Si usa `.htaccess`, recuerde agregar el `/` al final de la URL
* Pruebe su webhook para asegurarse de que está recibiendo el cuerpo JSON y devolviendo una respuesta HTTP `200 OK`
* Si su función de webhook tiene tareas de larga duración, primero debe reconocer la recepción del webhook devolviendo un `200 OK` antes de proceder con las tareas de larga duración
* Si no obtenemos una respuesta HTTP `200 OK` de sus webhooks, lo marcamos como un intento fallido
* Intentaremos enviar webhooks 5 veces con un retraso creciente entre cada intento, comenzando con 5 minutos y aumentando exponencialmente hasta 80 minutos. La duración total de estos 5 intentos abarcará aproximadamente 2 horas y 35 minutos.

## Tipos de eventos

Estos son los eventos que actualmente generamos. Agregaremos más a esta lista a medida que integremos más acciones en el futuro.

## Ejemplos de Eventos

A continuación se muestran ejemplos de cargas útiles de webhook para algunos de los eventos más comunes:

<Tabs>
  <Tab title="Depósito Exitoso">
    ```json theme={null}
    {
        "event": "deposit.success",
        "data": {
            "id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
            "reference": "LSk5RLfSrR",
            "senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
            "recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
            "amount": "10.0",
            "amountPaid": "10.0",
            "fee": null,
            "currency": "USD",
            "blockNumber": 6928760,
            "blockHash": "0x5f2e0ed782752b9559e7a3d89c0fb9f6706e4866e74ba7a434cf933bb3f02a2b",
            "hash": "0x94c733496df59c15e5a489f20374096bba31166a8e149ceea4d410e3e5821357",
            "confirmations": 6,
            "confirmed": true,
            "gasPrice": "1201381238",
            "gasUsed": "62159",
            "gasFee": "0.000074676656372842",
            "status": "SUCCESS",
            "type": "DEPOSIT",
            "note": null,
            "amlScreening": {
                "provider": "ofac",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": null,
            "network": "testnet",
            "chainId": 11155111,
            "metadata": {
                "user_id": 1
            },
            "createdAt": "2024-10-23T11:19:58.451Z",
            "updatedAt": "2024-10-23T11:19:58.451Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "testnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": {
                "id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
                "address": "0xe1037B45b48390285e5067424053fa35c478296b",
                "name": "Customer 1",
                "isActive": true,
                "type": "INTERNAL",
                "derivationPath": "m/44'/60'/0'/0/87",
                "metadata": {
                    "user_id": 1
                },
                "configurations": {
                    "aml": {
                        "status": "success",
                        "message": "Address is not sanctioned",
                        "provider": "ofac"
                    },
                    "showPrivateKey": false,
                    "disableAutoSweep": false,
                    "enableGaslessWithdraw": false
                },
                "network": "testnet",
                "createdAt": "2024-10-23T11:13:40.446Z",
                "updatedAt": "2024-10-23T11:13:40.446Z"
            },
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum testnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "testnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>

  <Tab title="Depósito en Proceso">
    ```json theme={null}
    {
        "event": "deposit.processing",
        "data": {
            "id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
            "reference": "LSk5RLfSrR",
            "senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
            "recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
            "amount": "10.0",
            "amountPaid": "10.0",
            "fee": null,
            "currency": "USD",
            "blockNumber": null,
            "blockHash": null,
            "hash": null,
            "confirmations": 0,
            "confirmed": false,
            "gasPrice": null,
            "gasUsed": null,
            "gasFee": null,
            "status": "PROCESSING",
            "type": "DEPOSIT",
            "note": null,
            "amlScreening": {
                "provider": "ofac",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": null,
            "network": "testnet",
            "chainId": 11155111,
            "metadata": {
                "user_id": 1
            },
            "createdAt": "2024-10-23T11:19:58.451Z",
            "updatedAt": "2024-10-23T11:19:58.451Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "testnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": {
                "id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
                "address": "0xe1037B45b48390285e5067424053fa35c478296b",
                "name": "Customer 1",
                "isActive": true,
                "type": "INTERNAL",
                "derivationPath": "m/44'/60'/0'/0/87",
                "metadata": {
                    "user_id": 1
                },
                "configurations": {
                    "aml": {
                        "status": "success",
                        "message": "Address is not sanctioned",
                        "provider": "ofac"
                    },
                    "showPrivateKey": false,
                    "disableAutoSweep": false,
                    "enableGaslessWithdraw": false
                },
                "network": "testnet",
                "createdAt": "2024-10-23T11:13:40.446Z",
                "updatedAt": "2024-10-23T11:13:40.446Z"
            },
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum testnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "testnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>

  <Tab title="Retiro Exitoso">
    ```json theme={null}
    {
        "event": "withdraw.success",
        "data": {
            "id": "081d6315-159f-4c38-b02a-c4708836c5bd",
            "reference": "y8lvy55cK",
            "senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
            "recipientAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
            "amount": "10",
            "amountPaid": "10",
            "fee": null,
            "currency": "USD",
            "blockNumber": 6928833,
            "blockHash": "0x0a3ff5314f333ae0b48a66f96c58731c434af5d8a26b107103b15d0b9d6f817d",
            "hash": "0xded90bc7f3d98f5ff0c3a97f711717192e83e01d89ac1ff4483ae6fd9d229e6d",
            "confirmations": 6,
            "confirmed": true,
            "gasPrice": "2166177614",
            "gasUsed": "45047",
            "gasFee": "0.000097579802977858",
            "status": "SUCCESS",
            "type": "WITHDRAW",
            "note": null,
            "amlScreening": {
                "provider": "ofac",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": null,
            "network": "testnet",
            "chainId": 11155111,
            "metadata": null,
            "createdAt": "2024-10-23T11:33:58.765Z",
            "updatedAt": "2024-10-23T11:35:16.015Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "testnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": null,
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum testnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "testnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>

  <Tab title="Firmado Exitoso">
    ```json theme={null}
    {
        "event": "signed.success",
        "data": {
            "id": "c69e421b-c90d-4a34-abeb-307ddb02e0a2",
            "reference": "2mT7rWfrn7",
            "senderAddress": "0x48197e643FfE94C045E96268c3d749eFd5Cf62d6",
            "recipientAddress": "0x3fF694f48d28006D5cBF3f8655aA4700479684b0",
            "tokenAddress": "0x0000000000000000000000000000000000000000",
            "amount": "0.001",
            "amountPaid": "0.001",
            "amountUSD": "0.80577",
            "rateUSD": "805.77",
            "fee": null,
            "feeHash": null,
            "currency": "BNB",
            "toCurrency": null,
            "blockNumber": null,
            "blockHash": null,
            "hash": "0x27fd26f4edc0792424ec712cea093e1f4fab1558d1162988246e975729f3d867",
            "confirmations": null,
            "confirmed": true,
            "gasPrice": null,
            "gasUsed": null,
            "gasFee": null,
            "status": "SUCCESS",
            "type": "SIGNED",
            "note": null,
            "amlScreening": {
            "provider": "ofac, fbi, tether, circle",
            "status": "success",
            "message": "Address is not sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": null,
            "network": "testnet",
            "chainId": null,
            "metadata": null,
            "toAmount": null,
            "signedTransaction": "0xf86b078407270e00825208943ff694f48d28006d5cbf3f8655aa4700479684b087038d7ea4c680008081e6a0241a95edfae9702b92ce6fa63cf2d67e4023289639be31f5e7e598ceea3f57fca03a5a28366728989ada7c59bd60625711cb0be88dc8a378c9323b37b81ee92a59",
            "rate": null,
            "createdAt": "2025-08-11T16:54:11.441Z",
            "updatedAt": "2025-08-11T16:54:11.441Z",
            "asset": {
            "id": "4250e3a2-29b7-48ed-9aad-2b5dff38e361",
            "name": "Binance Coin",
            "symbol": "BNB",
            "decimals": 18,
            "address": "0x0000000000000000000000000000000000000000",
            "standard": null,
            "currency": "BNB",
            "isActive": true,
            "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771445000/crypto-assets/bnb-smart-chain.png",
            "network": "testnet",
            "isNative": true,
            "createdAt": "2025-08-01T12:36:47.204Z",
            "updatedAt": "2025-08-01T12:36:47.204Z"
            },
            "address": null,
            "blockchain": {
            "id": "3953d0bc-4d9c-4dab-9814-bc204ea86028",
            "name": "BNB smart chain",
            "symbol": "bnb",
            "slug": "bnb-smart-chain",
            "derivationPath": "m/44'/60'/0'/0",
            "isEvmCompatible": true,
            "isL2": false,
            "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771445000/crypto-assets/bnb-smart-chain.png",
            "isActive": true,
            "tokenStandard": "BEP20",
            "createdAt": "2025-08-01T12:36:47.166Z",
            "updatedAt": "2025-08-01T12:36:47.166Z"
            },
            "wallet": {
            "id": "acff0ed8-0592-4942-848a-6d0a3559c279",
            "name": "BNB Wallet",
            "description": "bnb",
            "address": "0x48197e643FfE94C045E96268c3d749eFd5Cf62d6",
            "derivationPath": "m/44'/60'/0'/0/0",
            "isActive": true,
            "status": "ACTIVE",
            "network": "testnet",
            "configurations": {
                "withdrawal": {
                "gasless": {
                    "isActive": false,
                    "operator": "gt",
                    "threshold": 0
                }
                },
                "autoSweeping": {
                "isActive": false,
                "threshold": 0
                }
            },
            "createdAt": "2025-08-01T17:25:56.817Z",
            "updatedAt": "2025-08-04T15:24:38.130Z",
            "business": {
                "id": "2773e655-7995-4a8a-a727-c58c87f521b2",
                "name": "Business",
                "sector": "embedded finance & banking-as-a-service (baas)",
                "userId": "33cf150f-c81f-4dc5-92fc-1fd4155e644b",
                "status": "ACTIVE",
                "pipedriveOrganizationId": "507",
                "createdAt": "2025-08-01T17:23:21.996Z",
                "updatedAt": "2025-08-01T17:23:22.780Z"
            }
            },
            "beneficiary": null,
            "toAsset": null,
            "toBlockchain": null,
            "toWallet": null
        }
    }
    ```
  </Tab>

  <Tab title="Firmado Fallido">
    ```json theme={null}
    {
        "event": "signed.failed",
        "data": {
            "id": "c69e421b-c90d-4a34-abeb-307ddb02e0a2",
            "reference": "2mT7rWfrn7",
            "senderAddress": "0x48197e643FfE94C045E96268c3d749eFd5Cf62d6",
            "recipientAddress": "0x3fF694f48d28006D5cBF3f8655aA4700479684b0",
            "tokenAddress": "0x0000000000000000000000000000000000000000",
            "amount": "0.001",
            "amountPaid": "0.001",
            "amountUSD": "0.80577",
            "rateUSD": "805.77",
            "fee": null,
            "feeHash": null,
            "currency": "BNB",
            "toCurrency": null,
            "blockNumber": null,
            "blockHash": null,
            "hash": "0x27fd26f4edc0792424ec712cea093e1f4fab1558d1162988246e975729f3d867",
            "confirmations": null,
            "confirmed": true,
            "gasPrice": null,
            "gasUsed": null,
            "gasFee": null,
            "status": "FAILED",
            "type": "SIGNED",
            "note": null,
            "amlScreening": {
            "provider": "ofac, fbi, tether, circle",
            "status": "success",
            "message": "Address is not sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": null,
            "network": "testnet",
            "chainId": null,
            "metadata": null,
            "toAmount": null,
            "rate": null,
            "createdAt": "2025-08-11T16:54:11.441Z",
            "updatedAt": "2025-08-11T16:54:11.441Z",
            "asset": {
            "id": "4250e3a2-29b7-48ed-9aad-2b5dff38e361",
            "name": "Binance Coin",
            "symbol": "BNB",
            "decimals": 18,
            "address": "0x0000000000000000000000000000000000000000",
            "standard": null,
            "currency": "BNB",
            "isActive": true,
            "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771445000/crypto-assets/bnb-smart-chain.png",
            "network": "testnet",
            "isNative": true,
            "createdAt": "2025-08-01T12:36:47.204Z",
            "updatedAt": "2025-08-01T12:36:47.204Z"
            },
            "address": null,
            "blockchain": {
            "id": "3953d0bc-4d9c-4dab-9814-bc204ea86028",
            "name": "BNB smart chain",
            "symbol": "bnb",
            "slug": "bnb-smart-chain",
            "derivationPath": "m/44'/60'/0'/0",
            "isEvmCompatible": true,
            "isL2": false,
            "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771445000/crypto-assets/bnb-smart-chain.png",
            "isActive": true,
            "tokenStandard": "BEP20",
            "createdAt": "2025-08-01T12:36:47.166Z",
            "updatedAt": "2025-08-01T12:36:47.166Z"
            },
            "wallet": {
            "id": "acff0ed8-0592-4942-848a-6d0a3559c279",
            "name": "BNB Wallet",
            "description": "bnb",
            "address": "0x48197e643FfE94C045E96268c3d749eFd5Cf62d6",
            "derivationPath": "m/44'/60'/0'/0/0",
            "isActive": true,
            "status": "ACTIVE",
            "network": "testnet",
            "configurations": {
                "withdrawal": {
                "gasless": {
                    "isActive": false,
                    "operator": "gt",
                    "threshold": 0
                }
                },
                "autoSweeping": {
                "isActive": false,
                "threshold": 0
                }
            },
            "createdAt": "2025-08-01T17:25:56.817Z",
            "updatedAt": "2025-08-04T15:24:38.130Z",
            "business": {
                "id": "2773e655-7995-4a8a-a727-c58c87f521b2",
                "name": "Business",
                "sector": "embedded finance & banking-as-a-service (baas)",
                "userId": "33cf150f-c81f-4dc5-92fc-1fd4155e644b",
                "status": "ACTIVE",
                "pipedriveOrganizationId": "507",
                "createdAt": "2025-08-01T17:23:21.996Z",
                "updatedAt": "2025-08-01T17:23:22.780Z"
            }
            },
            "beneficiary": null,
            "toAsset": null,
            "toBlockchain": null,
            "toWallet": null
        }
    }
    ```
  </Tab>

  <Tab title="Intercambio Exitoso">
    ```json theme={null}
    {
        "event": "swap.success",
        "data": {
            "id": "99a2b490-0798-460b-9265-4d99f182fe52",
            "reference": "ZMxcorDGtf",
            "senderAddress": "0xAA2d5fd5e7bE97E214f8565DCf3a4862719960b5",
            "recipientAddress": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
            "tokenAddress": null,
            "amount": "5",
            "amountPaid": null,
            "fee": null,
            "currency": null,
            "blockNumber": 28888586,
            "blockHash": null,
            "hash": "0x4cfaf5b9526d2ef7df576844e8ea8739f523e9166c9e0a73a574e663270cd750",
            "confirmations": null,
            "confirmed": true,
            "gasPrice": null,
            "gasUsed": null,
            "gasFee": "0.000000183414563983",
            "status": "SUCCESS",
            "type": "SWAP",
            "note": null,
            "amlScreening": {
                "provider": "ofac, fbi, tether, circle",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": true,
            "assetSweptAt": "2025-04-13T17:48:58.610Z",
            "assetSweptGasFee": "0.000000223941716904",
            "assetSweptHash": "0xaf92bb24dc9d3bd6c2ec6245a41c2461291513fdc7f748c843c6576e484522eb",
            "assetSweptSenderAddress": "0xeeeeee9eC4769A09a76A83C7bC42b185872860eE",
            "assetSweptRecipientAddress": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
            "assetSweptAmount": "4.965214",
            "reason": null,
            "network": "mainnet",
            "chainId": null,
            "metadata": null,
            "toAmount": "4.965398",
            "rate": "0.9930796000000001",
            "createdAt": "2025-04-13T17:48:36.689Z",
            "updatedAt": "2025-04-13T17:48:58.611Z",
            "asset": {
                "id": "3a18a31a-86ad-44a0-9b9c-cdb69d535c64",
                "name": "USD Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "standard": null,
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "mainnet",
                "isNative": false,
                "createdAt": "2024-06-08T12:59:11.303Z",
                "updatedAt": "2024-06-09T10:39:24.429Z"
            },
            "address": null,
            "blockchain": {
                "id": "28a730d3-211b-40f7-bb8f-dd589dcc738e",
                "name": "base",
                "symbol": "eth",
                "slug": "base",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "isL2": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771445007/crypto-assets/base.png",
                "isActive": true,
                "tokenStandard": null,
                "createdAt": "2024-06-07T11:09:56.586Z",
                "updatedAt": "2024-11-26T15:26:21.825Z"
            },
            "wallet": {
                "id": "6b741fbc-8a9c-48a1-92b0-ae7b52de8b9e",
                "name": "Base Mainnet Wallet",
                "description": "This is base mainnet wallet",
                "address": "0xAA2d5fd5e7bE97E214f8565DCf3a4862719960b5",
                "derivationPath": "m/44'/60'/0'/0/41",
                "isActive": true,
                "status": "ACTIVE",
                "network": "mainnet",
                "configurations": {
                    "withdrawal": {
                        "gasless": {
                            "isActive": true
                        }
                    },
                    "autoSweeping": {
                        "isActive": true
                    }
                },
                "createdAt": "2024-06-15T02:53:23.409Z",
                "updatedAt": "2025-04-01T21:27:57.022Z",
                "business": {
                    "id": "a109729b-3b97-4fb3-a90a-769a0cbf6a25",
                    "name": "Yiksi Pay",
                    "sector": "infrastructure",
                    "status": "ACTIVE",
                    "createdAt": "2023-04-28T17:40:18.541Z",
                    "updatedAt": "2024-06-13T19:57:03.064Z"
                }
            },
            "beneficiary": null,
            "toAsset": {
                "id": "065ff109-9d31-4c7d-bd0e-13314d2ed5f6",
                "name": "Tether USD",
                "symbol": "USDT",
                "decimals": 6,
                "address": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
                "standard": null,
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444993/crypto-assets/USDT.png",
                "network": "mainnet",
                "isNative": false,
                "createdAt": "2024-10-08T13:22:13.802Z",
                "updatedAt": "2024-10-08T13:22:13.802Z"
            },
            "toBlockchain": {
                "id": "a5e8779c-9f8d-4a67-839d-c278eebf87f1",
                "name": "optimism",
                "symbol": "eth",
                "slug": "optimism",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "isL2": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771445010/crypto-assets/optimism.png",
                "isActive": true,
                "tokenStandard": null,
                "createdAt": "2024-10-08T13:04:21.649Z",
                "updatedAt": "2024-11-26T15:26:23.105Z"
            },
            "toWallet": {
                "id": "d2f9a93c-e8d6-4768-bc09-be4750e7eacb",
                "name": "Optimism Mainnet Wallet",
                "description": "This is optimism mainnet master wallet",
                "address": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "mainnet",
                "configurations": null,
                "createdAt": "2024-11-23T07:31:57.897Z",
                "updatedAt": "2024-11-24T05:40:46.225Z"
            }
        }
    }
    ```
  </Tab>

  <Tab title="Barrido de Depósito Exitoso">
    ```json theme={null}
    {
        "event": "deposit.swept.success",
        "data": {
            "id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
            "reference": "LSk5RLfSrR",
            "senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
            "recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
            "amount": "10.0",
            "amountPaid": "10.0",
            "fee": null,
            "currency": "USD",
            "blockNumber": 6928760,
            "blockHash": "0x5f2e0ed782752b9559e7a3d89c0fb9f6706e4866e74ba7a434cf933bb3f02a2b",
            "hash": "0x94c733496df59c15e5a489f20374096bba31166a8e149ceea4d410e3e5821357",
            "confirmations": 6,
            "confirmed": true,
            "gasPrice": "1201381238",
            "gasUsed": "62159",
            "gasFee": "0.000074676656372842",
            "status": "SUCCESS",
            "type": "DEPOSIT",
            "note": null,
            "amlScreening": {
                "provider": "ofac",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": true,
            "assetSweptAt": "2024-10-23T11:28:52.848Z",
            "assetSweptGasFee": "0.000074597672027028",
            "assetSweptHash": "0xe5ae1c025b81ff83a03189fad1c0f5bd502cd0b394bed6765603f9ba05bfe147",
            "assetSweptSenderAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
            "assetSweptRecipientAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
            "assetSweptAmount": "10.0",
            "reason": "Funds swept successfully",
            "network": "testnet",
            "chainId": 11155111,
            "metadata": {
                "user_id": 1
            },
            "createdAt": "2024-10-23T11:19:58.451Z",
            "updatedAt": "2024-10-23T11:28:52.889Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "testnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": {
                "id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
                "address": "0xe1037B45b48390285e5067424053fa35c478296b",
                "name": "Customer 1",
                "isActive": true,
                "type": "INTERNAL",
                "derivationPath": "m/44'/60'/0'/0/87",
                "metadata": {
                    "user_id": 1
                },
                "configurations": {
                    "aml": {
                        "status": "success",
                        "message": "Address is not sanctioned",
                        "provider": "ofac"
                    },
                    "showPrivateKey": false,
                    "disableAutoSweep": false,
                    "enableGaslessWithdraw": false
                },
                "network": "testnet",
                "createdAt": "2024-10-23T11:13:40.446Z",
                "updatedAt": "2024-10-23T11:13:40.446Z"
            },
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum testnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "testnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>

  <Tab title="Retiro Fallido">
    ```json theme={null}
    {
        "event": "withdraw.failed",
        "data": {
            "id": "081d6315-159f-4c38-b02a-c4708836c5bd",
            "reference": "y8lvy55cK",
            "senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
            "recipientAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
            "amount": "10",
            "amountPaid": "10",
            "fee": null,
            "currency": "USD",
            "blockNumber": 6928833,
            "blockHash": "0x0a3ff5314f333ae0b48a66f96c58731c434af5d8a26b107103b15d0b9d6f817d",
            "hash": "0xded90bc7f3d98f5ff0c3a97f711717192e83e01d89ac1ff4483ae6fd9d229e6d",
            "confirmations": 6,
            "confirmed": true,
            "gasPrice": "2166177614",
            "gasUsed": "45047",
            "gasFee": "0.000097579802977858",
            "status": "FAILED",
            "type": "WITHDRAW",
            "note": null,
            "amlScreening": {
                "provider": "ofac",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": "Insufficient funds to pay for network fee sweeping assets",
            "network": "testnet",
            "chainId": 11155111,
            "metadata": null,
            "createdAt": "2024-10-23T11:33:58.765Z",
            "updatedAt": "2024-10-23T11:35:16.015Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "testnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": null,
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum testnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "testnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>

  <Tab title="Intercambio Fallido">
    ```json theme={null}
    {
        "event": "swap.failed",
        "data": {
             "id": "99a2b490-0798-460b-9265-4d99f182fe52",
                "reference": "ZMxcorDGtf",
                "senderAddress": "0xAA2d5fd5e7bE97E214f8565DCf3a4862719960b5",
                "recipientAddress": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
                "tokenAddress": null,
                "amount": "5",
                "amountPaid": null,
                "fee": null,
                "currency": null,
                "blockNumber": 28888586,
                "blockHash": null,
                "hash": "0x4cfaf5b9526d2ef7df576844e8ea8739f523e9166c9e0a73a574e663270cd750",
                "confirmations": null,
                "confirmed": true,
                "gasPrice": null,
                "gasUsed": null,
                "gasFee": "0.000000183414563983",
                "status": "FAILED",
                "type": "SWAP",
                "note": null,
                "amlScreening": {
                    "provider": "ofac, fbi, tether, circle",
                    "status": "success",
                    "message": "Address is not sanctioned"
                },
                "assetSwept": true,
                "assetSweptAt": "2025-04-13T17:48:58.610Z",
                "assetSweptGasFee": "0.000000223941716904",
                "assetSweptHash": "0xaf92bb24dc9d3bd6c2ec6245a41c2461291513fdc7f748c843c6576e484522eb",
                "assetSweptSenderAddress": "0xeeeeee9eC4769A09a76A83C7bC42b185872860eE",
                "assetSweptRecipientAddress": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
                "assetSweptAmount": "4.965214",
                "reason": "Insufficient liquidity for swap",
                "network": "mainnet",
                "chainId": null,
                "metadata": null,
                "toAmount": "4.965398",
                "rate": "0.9930796000000001",
                "createdAt": "2025-04-13T17:48:36.689Z",
                "updatedAt": "2025-04-13T17:48:58.611Z",
                "asset": {
                    "id": "3a18a31a-86ad-44a0-9b9c-cdb69d535c64",
                    "name": "USD Coin",
                    "symbol": "USDC",
                    "decimals": 6,
                    "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                    "standard": null,
                    "isActive": true,
                    "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                    "network": "mainnet",
                    "isNative": false,
                    "createdAt": "2024-06-08T12:59:11.303Z",
                    "updatedAt": "2024-06-09T10:39:24.429Z"
                },
                "address": null,
                "blockchain": {
                    "id": "28a730d3-211b-40f7-bb8f-dd589dcc738e",
                    "name": "base",
                    "symbol": "eth",
                    "slug": "base",
                    "derivationPath": "m/44'/60'/0'/0",
                    "isEvmCompatible": true,
                    "isL2": true,
                    "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771445007/crypto-assets/base.png",
                    "isActive": true,
                    "tokenStandard": null,
                    "createdAt": "2024-06-07T11:09:56.586Z",
                    "updatedAt": "2024-11-26T15:26:21.825Z"
                },
                "wallet": {
                    "id": "6b741fbc-8a9c-48a1-92b0-ae7b52de8b9e",
                    "name": "Base Mainnet Wallet",
                    "description": "This is base mainnet wallet",
                    "address": "0xAA2d5fd5e7bE97E214f8565DCf3a4862719960b5",
                    "derivationPath": "m/44'/60'/0'/0/41",
                    "isActive": true,
                    "status": "ACTIVE",
                    "network": "mainnet",
                    "configurations": {
                        "withdrawal": {
                            "gasless": {
                                "isActive": true
                            }
                        },
                        "autoSweeping": {
                            "isActive": true
                        }
                    },
                    "createdAt": "2024-06-15T02:53:23.409Z",
                    "updatedAt": "2025-04-01T21:27:57.022Z",
                    "business": {
                        "id": "a109729b-3b97-4fb3-a90a-769a0cbf6a25",
                        "name": "Yiksi Pay",
                        "sector": "infrastructure",
                        "status": "ACTIVE",
                        "createdAt": "2023-04-28T17:40:18.541Z",
                        "updatedAt": "2024-06-13T19:57:03.064Z"
                    }
                },
                "beneficiary": null,
                "toAsset": {
                    "id": "065ff109-9d31-4c7d-bd0e-13314d2ed5f6",
                    "name": "Tether USD",
                    "symbol": "USDT",
                    "decimals": 6,
                    "address": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
                    "standard": null,
                    "isActive": true,
                    "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444993/crypto-assets/USDT.png",
                    "network": "mainnet",
                    "isNative": false,
                    "createdAt": "2024-10-08T13:22:13.802Z",
                    "updatedAt": "2024-10-08T13:22:13.802Z"
                },
                "toBlockchain": {
                    "id": "a5e8779c-9f8d-4a67-839d-c278eebf87f1",
                    "name": "optimism",
                    "symbol": "eth",
                    "slug": "optimism",
                    "derivationPath": "m/44'/60'/0'/0",
                    "isEvmCompatible": true,
                    "isL2": true,
                    "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771445010/crypto-assets/optimism.png",
                    "isActive": true,
                    "tokenStandard": null,
                    "createdAt": "2024-10-08T13:04:21.649Z",
                    "updatedAt": "2024-11-26T15:26:23.105Z"
                },
                "toWallet": {
                    "id": "d2f9a93c-e8d6-4768-bc09-be4750e7eacb",
                    "name": "Optimism Mainnet Wallet",
                    "description": "This is optimism mainnet master wallet",
                    "address": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
                    "derivationPath": "m/44'/60'/0'/0/0",
                    "isActive": true,
                    "status": "ACTIVE",
                    "network": "mainnet",
                    "configurations": null,
                    "createdAt": "2024-11-23T07:31:57.897Z",
                    "updatedAt": "2024-11-24T05:40:46.225Z"
                }
        }
    }
    ```
  </Tab>

  <Tab title="Depósito Fallido">
    ```json theme={null}
    {
        "event": "deposit.failed",
        "data": {
            "id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
            "reference": "LSk5RLfSrR",
            "senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
            "recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
            "amount": "10.0",
            "amountPaid": "10.0",
            "fee": null,
            "currency": "USD",
            "blockNumber": 6928760,
            "blockHash": "0x5f2e0ed782752b9559e7a3d89c0fb9f6706e4866e74ba7a434cf933bb3f02a2b",
            "hash": "0x94c733496df59c15e5a489f20374096bba31166a8e149ceea4d410e3e5821357",
            "confirmations": 6,
            "confirmed": true,
            "gasPrice": "1201381238",
            "gasUsed": "62159",
            "gasFee": "0.000074676656372842",
            "status": "FAILED",
            "type": "DEPOSIT",
            "note": null,
            "amlScreening": {
                "provider": "ofac",
                "status": "failed",
                "message": "Address is sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": "AML screening failed - sanctioned address",
            "network": "testnet",
            "chainId": 11155111,
            "metadata": {
                "user_id": 1
            },
            "createdAt": "2024-10-23T11:19:58.451Z",
            "updatedAt": "2024-10-23T11:19:58.451Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "testnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": {
                "id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
                "address": "0xe1037B45b48390285e5067424053fa35c478296b",
                "name": "Customer 1",
                "isActive": true,
                "type": "INTERNAL",
                "derivationPath": "m/44'/60'/0'/0/87",
                "metadata": {
                    "user_id": 1
                },
                "configurations": {
                    "aml": {
                        "status": "failed",
                        "message": "Address is sanctioned",
                        "provider": "ofac"
                    },
                    "showPrivateKey": false,
                    "disableAutoSweep": false,
                    "enableGaslessWithdraw": false
                },
                "network": "testnet",
                "createdAt": "2024-10-23T11:13:40.446Z",
                "updatedAt": "2024-10-23T11:13:40.446Z"
            },
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum testnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "testnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>

  <Tab title="Barrido de Depósito Fallido">
    ```json theme={null}
    {
        "event": "deposit.swept.failed",
        "data": {
            "id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
            "reference": "LSk5RLfSrR",
            "senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
            "recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
            "amount": "10.0",
            "amountPaid": "10.0",
            "fee": null,
            "currency": "USD",
            "blockNumber": 6928760,
            "blockHash": "0x5f2e0ed782752b9559e7a3d89c0fb9f6706e4866e74ba7a434cf933bb3f02a2b",
            "hash": "0x94c733496df59c15e5a489f20374096bba31166a8e149ceea4d410e3e5821357",
            "confirmations": 6,
            "confirmed": true,
            "gasPrice": "1201381238",
            "gasUsed": "62159",
            "gasFee": "0.000074676656372842",
            "status": "SUCCESS",
            "type": "DEPOSIT",
            "note": null,
            "amlScreening": {
                "provider": "ofac",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": false,
            "assetSweptAt": null,
            "assetSweptGasFee": "0.000074597672027028",
            "assetSweptHash": "0xe5ae1c025b81ff83a03189fad1c0f5bd502cd0b394bed6765603f9ba05bfe147",
            "assetSweptSenderAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
            "assetSweptRecipientAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
            "assetSweptAmount": "10.0",
            "reason": "Insufficient funds to pay for network fee sweeping assets",
            "network": "testnet",
            "chainId": 11155111,
            "metadata": {
                "user_id": 1
            },
            "createdAt": "2024-10-23T11:19:58.451Z",
            "updatedAt": "2024-10-23T11:28:52.889Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "testnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": {
                "id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
                "address": "0xe1037B45b48390285e5067424053fa35c478296b",
                "name": "Customer 1",
                "isActive": true,
                "type": "INTERNAL",
                "derivationPath": "m/44'/60'/0'/0/87",
                "metadata": {
                    "user_id": 1
                },
                "configurations": {
                    "aml": {
                        "status": "success",
                        "message": "Address is not sanctioned",
                        "provider": "ofac"
                    },
                    "showPrivateKey": false,
                    "disableAutoSweep": false,
                    "enableGaslessWithdraw": false
                },
                "network": "testnet",
                "createdAt": "2024-10-23T11:13:40.446Z",
                "updatedAt": "2024-10-23T11:13:40.446Z"
            },
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum testnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "testnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>

  <Tab title="Staking Success">
    ```json theme={null}
    {
        "event": "staking.success",
        "data": {
            "id": "7e8f9a2b-3c4d-5e6f-7a8b-9c0d1e2f3a4b",
            "reference": "STK123456",
            "senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
            "recipientAddress": "0xStakingContractAddress",
            "amount": "100.0",
            "amountPaid": "100.0",
            "fee": "0.5",
            "currency": "USD",
            "blockNumber": 6928900,
            "blockHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
            "hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
            "confirmations": 12,
            "confirmed": true,
            "gasPrice": "2000000000",
            "gasUsed": "150000",
            "gasFee": "0.0003",
            "status": "SUCCESS",
            "type": "STAKING",
            "note": "Staking 100 USDC",
            "amlScreening": {
                "provider": "ofac",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": null,
            "network": "mainnet",
            "chainId": 1,
            "metadata": {
                "staking_pool": "USDC_POOL",
                "apy": "5.2"
            },
            "createdAt": "2024-10-23T12:00:00.000Z",
            "updatedAt": "2024-10-23T12:05:00.000Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0xA0b86a33E6441b8c4C8C8C8C8C8C8C8C8C8C8C8C",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "mainnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": null,
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum mainnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "mainnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>

  <Tab title="Custom Smart Contract Success">
    ```json theme={null}
    {
        "event": "custom-smart-contract.success",
        "data": {
            "id": "9a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
            "reference": "CSC789012",
            "senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
            "recipientAddress": "0xCustomContractAddress",
            "amount": "50.0",
            "amountPaid": "50.0",
            "fee": "0.25",
            "currency": "USD",
            "blockNumber": 6929000,
            "blockHash": "0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba",
            "hash": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
            "confirmations": 8,
            "confirmed": true,
            "gasPrice": "2500000000",
            "gasUsed": "100000",
            "gasFee": "0.00025",
            "status": "SUCCESS",
            "type": "CUSTOM_SMART_CONTRACT",
            "note": "Custom contract interaction",
            "amlScreening": {
                "provider": "ofac",
                "status": "success",
                "message": "Address is not sanctioned"
            },
            "assetSwept": null,
            "assetSweptAt": null,
            "assetSweptGasFee": null,
            "assetSweptHash": null,
            "assetSweptSenderAddress": null,
            "assetSweptRecipientAddress": null,
            "assetSweptAmount": null,
            "reason": null,
            "network": "mainnet",
            "chainId": 1,
            "metadata": {
                "contract_function": "transfer",
                "contract_address": "0xCustomContractAddress",
                "function_params": {
                    "to": "0xRecipientAddress",
                    "amount": "50000000"
                }
            },
            "createdAt": "2024-10-23T13:00:00.000Z",
            "updatedAt": "2024-10-23T13:02:00.000Z",
            "asset": {
                "id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
                "name": "USDC Coin",
                "symbol": "USDC",
                "decimals": 6,
                "address": "0xA0b86a33E6441b8c4C8C8C8C8C8C8C8C8C8C8C8C",
                "standard": "ERC20",
                "isActive": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444992/crypto-assets/USDC.png",
                "network": "mainnet",
                "createdAt": "2024-05-14T11:53:33.682Z",
                "updatedAt": "2024-06-14T22:32:12.589Z"
            },
            "address": null,
            "blockchain": {
                "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
                "name": "ethereum",
                "symbol": "eth",
                "slug": "ethereum",
                "derivationPath": "m/44'/60'/0'/0",
                "isEvmCompatible": true,
                "logoUrl": "https://res.cloudinary.com/dkgdc1vnl/image/upload/v1771444998/crypto-assets/ethereum.png",
                "isActive": true,
                "tokenStandard": "ERC20",
                "createdAt": "2024-05-14T11:53:33.095Z",
                "updatedAt": "2024-06-14T22:32:11.983Z"
            },
            "wallet": {
                "id": "d236a191-c1d4-423c-a439-54ce6542ca41",
                "name": "Ethereum Master Wallet",
                "description": "This is ethereum mainnet master wallet",
                "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
                "derivationPath": "m/44'/60'/0'/0/0",
                "isActive": true,
                "status": "ACTIVE",
                "network": "mainnet",
                "createdAt": "2024-08-22T09:48:56.322Z",
                "updatedAt": "2024-10-23T10:52:34.332Z",
                "business": {
                    "id": "4b96c271-35eb-45e8-b558-6a53f95df601",
                    "name": "Test One Inc",
                    "sector": "Fintech",
                    "status": "ACTIVE",
                    "createdAt": "2024-08-22T09:28:37.522Z",
                    "updatedAt": "2024-08-22T09:28:37.522Z"
                }
            },
            "beneficiary": null
        }
    }
    ```
  </Tab>
</Tabs>

## Lista Completa de Eventos

| Evento                            | Descripción                                                                                                                                                                                                             |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `deposit.success`                 | Se activa cuando una transacción de depósito se recibe y confirma exitosamente en la blockchain.                                                                                                                        |
| `deposit.processing`              | Se activa cuando una transacción de depósito se está procesando.                                                                                                                                                        |
| `deposit.failed`                  | Se activa cuando una transacción de depósito no se procesa o confirma.                                                                                                                                                  |
| `deposit.cancelled`               | Se activa cuando una transacción de depósito se cancela antes de completarse.                                                                                                                                           |
| `deposit.swept.success`           | Se activa cuando los fondos de un depósito se barren (transfieren) exitosamente a la billetera maestra.                                                                                                                 |
| `deposit.swept.failed`            | Se activa cuando el proceso de barrido automático falla al transferir fondos a la billetera maestra.                                                                                                                    |
| `withdraw.success`                | Se activa cuando una transacción de retiro se ejecuta y confirma exitosamente en la blockchain.                                                                                                                         |
| `withdraw.failed`                 | Se activa cuando una transacción de retiro falla al ejecutarse. Esto puede ocurrir debido a fondos insuficientes, congestión de red u otros problemas relacionados con blockchain.                                      |
| `withdraw.cancelled`              | Se activa cuando una transacción de retiro se cancela antes de completarse.                                                                                                                                             |
| `signed.success`                  | Se activa cuando una transacción firmada se ejecuta exitosamente, sin embargo, la transacción no se transmite en la blockchain.                                                                                         |
| `signed.failed`                   | Se activa cuando una transacción firmada falla al ejecutarse. Esto puede ocurrir debido a congestión de red u otros problemas relacionados con blockchain.                                                              |
| `signed.cancelled`                | Se activa cuando una transacción firmada se cancela antes de completarse.                                                                                                                                               |
| `swap.success`                    | Se activa cuando una transacción de intercambio se ejecuta exitosamente y los activos se intercambian.                                                                                                                  |
| `swap.failed`                     | Se activa cuando una transacción de intercambio falla al ejecutarse. Esto puede ocurrir debido a fondos insuficientes, congestión de red o errores del contrato de intercambio.                                         |
| `swap.cancelled`                  | Se activa cuando una transacción de intercambio se cancela antes de completarse.                                                                                                                                        |
| `custom-smart-contract.success`   | Se activa cuando una transacción de contrato inteligente personalizado se ejecuta exitosamente. Esto indica que la interacción del contrato se completó exitosamente en la blockchain.                                  |
| `custom-smart-contract.failed`    | Se activa cuando una transacción de contrato inteligente personalizado falla al ejecutarse. Esto puede ocurrir debido a varias razones como fondos insuficientes, congestión de red o errores del contrato inteligente. |
| `custom-smart-contract.cancelled` | Se activa cuando una transacción de contrato inteligente personalizado se cancela antes de completarse.                                                                                                                 |
| `staking.success`                 | Se activa cuando una transacción de staking se ejecuta exitosamente y los activos se hacen stake.                                                                                                                       |
| `staking.failed`                  | Se activa cuando una transacción de staking falla al ejecutarse. Esto puede ocurrir debido a fondos insuficientes, congestión de red o errores del contrato de staking.                                                 |
| `staking.cancelled`               | Se activa cuando una transacción de staking se cancela antes de completarse.                                                                                                                                            |
| `unstaking.success`               | Se activa cuando una transacción de unstaking se ejecuta exitosamente y los activos se retiran del stake.                                                                                                               |
| `unstaking.failed`                | Se activa cuando una transacción de unstaking falla al ejecutarse. Esto puede ocurrir debido a saldo en stake insuficiente, congestión de red o errores del contrato de staking.                                        |
| `unstaking.cancelled`             | Se activa cuando una transacción de unstaking se cancela antes de completarse.                                                                                                                                          |
| `unstaking.withdraw.success`      | Se activa cuando los activos retirados del stake se retiran exitosamente a la dirección del usuario.                                                                                                                    |
| `unstaking.withdraw.failed`       | Se activa cuando el retiro de activos retirados del stake falla al ejecutarse. Esto puede ocurrir debido a saldo insuficiente, congestión de red u otros problemas relacionados con blockchain.                         |
| `unstaking.withdraw.cancelled`    | Se activa cuando una transacción de retiro de unstaking se cancela antes de completarse.                                                                                                                                |
| `restaking.success`               | Se activa cuando una transacción de re-staking se ejecuta exitosamente y los activos se vuelven a hacer stake.                                                                                                          |
| `restaking.failed`                | Se activa cuando una transacción de re-staking falla al ejecutarse. Esto puede ocurrir debido a fondos insuficientes, congestión de red o errores del contrato de staking.                                              |
| `restaking.cancelled`             | Se activa cuando una transacción de re-staking se cancela antes de completarse.                                                                                                                                         |
| `salvage.success`                 | Se activa cuando una operación de salvamento se ejecuta exitosamente y los activos se recuperan.                                                                                                                        |
| `salvage.failed`                  | Se activa cuando una operación de salvamento falla al ejecutarse. Esto puede ocurrir debido a fondos insuficientes, congestión de red o errores del contrato de salvamento.                                             |
| `salvage.cancelled`               | Se activa cuando una operación de salvamento se cancela antes de completarse.                                                                                                                                           |

## Tipos y Estados de Transacciones

### Tipos de Transacciones

Los siguientes tipos de transacciones se utilizan en las cargas útiles de webhook:

| Tipo                    | Descripción                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------------ |
| `DEPOSIT`               | Una transacción de depósito donde los fondos se reciben en una dirección de billetera            |
| `WITHDRAW`              | Una transacción de retiro donde los fondos se envían desde una billetera a una dirección externa |
| `SIGNED`                | Una transacción firmada donde la transacción solo se firma y no se transmite a la red            |
| `SALVAGE`               | Una operación de salvamento para recuperar fondos bloqueados o perdidos                          |
| `AUTO_SETTLEMENT`       | Una transacción de liquidación automática                                                        |
| `STAKING`               | Una transacción de staking donde los activos se hacen stake                                      |
| `UNSTAKING`             | Una transacción de unstaking donde los activos en stake se retiran                               |
| `RESTAKING`             | Una transacción de re-staking donde los activos se vuelven a hacer stake                         |
| `UNSTAKING_WITHDRAW`    | Un retiro de activos retirados del stake                                                         |
| `CUSTOM_SMART_CONTRACT` | Una interacción de contrato inteligente personalizado                                            |
| `SWAP`                  | Una transacción de intercambio donde un activo se intercambia por otro                           |

### Estados de Transacciones

Los siguientes estados indican el estado actual de una transacción:

| Estado       | Descripción                                                       |
| ------------ | ----------------------------------------------------------------- |
| `PENDING`    | La transacción se está procesando pero aún no se confirma         |
| `PROCESSING` | La transacción se está procesando actualmente                     |
| `SUCCESS`    | La transacción se ha ejecutado y confirmado exitosamente          |
| `FAILED`     | La transacción falló al ejecutarse o fue rechazada                |
| `INCOMPLETE` | La transacción está incompleta y puede requerir pasos adicionales |
| `CANCELLED`  | La transacción se canceló antes de completarse                    |

<Note>
  Estos tipos y estados de transacciones se utilizan en los campos `type` y `status` de las cargas útiles de webhook para ayudarlo a comprender qué tipo de transacción ocurrió y su estado actual.
</Note>

¡Feliz codificación! ❤️
