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

# Previsualizar código QR

> Este endpoint permite previsualizar los detalles de un código QR antes de procesar un payout

### Cuerpo

<ParamField body="onBehalfOf" type="string" required>
  El identificador del usuario o entidad en cuyo nombre se realiza el payout
</ParamField>

<ParamField body="qrCodeHash" type="string" required>
  El hash del código QR del cual previsualizar los detalles
</ParamField>

<ParamField body="country" type="string" required>
  El código de país del código QR (por ejemplo, "BO")
</ParamField>

### Respuesta

<ResponseField name="qrCodeId" type="string">
  El identificador del código QR
</ResponseField>

<ResponseField name="isOpen" type="boolean">
  Indica si el código QR es abierto, es decir, admite cualquier monto (true cuando localAmount es 0)
</ResponseField>

<ResponseField name="localAmount" type="number">
  El monto en moneda local del código QR
</ResponseField>

<ResponseField name="currency" type="string">
  El código de la moneda local (por ejemplo, "BOB")
</ResponseField>

<ResponseField name="usdcAmount" type="number">
  El monto equivalente en USDC
</ResponseField>

<ResponseField name="usdcRate" type="number">
  El tipo de cambio usado para la conversión a USDC
</ResponseField>

<ResponseField name="recipientName" type="string">
  El nombre del destinatario
</ResponseField>

<ResponseField name="recipientLegalId" type="string">
  El documento legal (CI) del destinatario
</ResponseField>

<ResponseField name="isExpired" type="boolean">
  Indica si el código QR ya expiró
</ResponseField>

<ResponseField name="description" type="string">
  Descripción o notas del pago por código QR
</ResponseField>

<ResponseField name="destinationAccountNumber" type="string">
  El número de cuenta de destino del pago
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://stablecoin-api.sandbox.getmeru.com/v1/payouts/qr-codes/preview' \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data-raw '{
      "onBehalfOf": "123",
      "qrCodeHash": "abc123def456",
      "country": "BO"
  }'
  ```

  ```js Javascript theme={null}
  const response = await fetch('https://stablecoin-api.sandbox.getmeru.com/v1/payouts/qr-codes/preview', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'api-key': '<api-key>'
    },
    body: JSON.stringify({
      onBehalfOf: '123',
      qrCodeHash: 'abc123def456',
      country: 'BO'
    })
  });

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "qrCodeId": "QR123456789",
    "isOpen": false,
    "localAmount": 100.50,
    "currency": "BOB",
    "usdcAmount": 14.25,
    "usdcRate": 7.05,
    "recipientName": "Juan Pérez",
    "recipientLegalId": "12345678",
    "isExpired": false,
    "description": "Payment for services",
    "destinationAccountNumber": "1234567890"
  }
  ```
</ResponseExample>

### Respuestas de error

<ResponseExample>
  ```json 400 theme={null}
  {
    "success": false,
    "error": "Invalid QR code hash format"
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized. Please check your authentication credentials."
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": "QR code not found"
  }
  ```

  ```json 410 theme={null}
  {
    "success": false,
    "error": "QR code has expired"
  }
  ```
</ResponseExample>
