BReB — QR

GET

Consulta

Consulta el estado y los detalles de un QR generado usando su id. Usa este endpoint para hacer polling y detectar cuándo el cliente ha completado el pago.

GEThttps://qrvbreb.vepay.com.co/api/qr/{id}

Headers

HeaderValorReq.
AuthorizationBearer {token}Sí

Path Parameter

ParámetroTipoDescripción
idstringID del QR obtenido en la respuesta de 02 — Generar QR.

cURL

cURL
curl --location 'https://qrvbreb.vepay.com.co/api/qr/QR_ID_AQUI' \
--header 'Authorization: Bearer TU_JWT_TOKEN'

Ejemplo JavaScript — Polling

JavaScript
// Polling cada 3 segundos hasta confirmar el pago
const pollQRStatus = (qrId, token) => {
  const interval = setInterval(async () => {
    const res = await fetch(
      `https://qrvbreb.vepay.com.co/api/qr/${qrId}`,
      { headers: { 'Authorization': `Bearer ${token}` } }
    );
    const qr = await res.json();

    if (qr.status === 'PAID' || qr.status === 'COMPLETED') {
      clearInterval(interval);
      console.log('✓ Pago confirmado', qr);
      // Actualiza tu UI y base de datos
    }

    if (qr.status === 'EXPIRED') {
      clearInterval(interval);
      console.log('QR expirado');
    }
  }, 3000);
};

pollQRStatus('QR_ID_AQUI', token);

En esta página