VVIX Licenciasv0.0.19
DEVELOPERS · WEBHOOKS v1

Eventos salientes firmados y reintentables.

Integra ERP, CRM, automatizaciones o sistemas internos con entregas HMAC-SHA256, event IDs estables, dead-letter y replay administrativo.

Envelope v1

{
  "id": "evt_01...",
  "type": "order.paid",
  "version": "1",
  "created_at": "2026-08-16T11:20:00-05:00",
  "data": { ... }
}

Headers de seguridad

X-VIX-Webhook-Id: evt_01...
X-VIX-Webhook-Delivery: 01...
X-VIX-Webhook-Secret-Version: 2
X-VIX-Webhook-Event: order.paid
X-VIX-Webhook-Timestamp: 1786897200
X-VIX-Webhook-Signature: v1=<hex>

La firma es HMAC-SHA256(secret, timestamp + "." + event_id + "." + raw_body). Verifica siempre el body crudo antes de parsear JSON.

Ejemplo PHP

$timestamp = $_SERVER['HTTP_X_VIX_WEBHOOK_TIMESTAMP'] ?? '';
$eventId   = $_SERVER['HTTP_X_VIX_WEBHOOK_ID'] ?? '';
$received  = $_SERVER['HTTP_X_VIX_WEBHOOK_SIGNATURE'] ?? '';
$rawBody   = file_get_contents('php://input');

$expected = 'v1='.hash_hmac(
    'sha256',
    $timestamp.'.'.$eventId.'.'.$rawBody,
    $webhookSecret
);

if (!hash_equals($expected, $received)) {
    http_response_code(401);
    exit;
}

if (abs(time() - (int) $timestamp) > 300) {
    http_response_code(401);
    exit;
}

Idempotencia

Guarda X-VIX-Webhook-Id como clave única. Los reintentos y replays pueden volver a presentar el mismo evento, por lo que tu receptor debe ser idempotente.

Eventos

webhook.testEvento de prueba
order.paidPedido pagado
payment.refundedPago reembolsado
license.issuedLicencia emitida
license.suspendedLicencia suspendida
license.reactivatedLicencia reactivada
license.revokedLicencia revocada
subscription.renewedSuscripción renovada
subscription.payment_failedPago recurrente fallido
subscription.grace_startedSuscripción en gracia
subscription.expiredSuscripción vencida
subscription.plan_changedPlan cambiado
support.ticket.createdTicket creado
support.ticket.repliedRespuesta pública de soporte
support.ticket.status_changedEstado de ticket cambiado
release.publishedRelease publicada
release.withdrawnRelease retirada