Resumen

Recibe eventos en tiempo real en tu backend.

Los webhooks te permiten recibir notificaciones en tiempo real cuando ocurren eventos en SouthGames. Configura endpoints en Configuracion > Webhooks en la consola.

Como funciona

  1. Configuras una URL de webhook en la consola
  2. Seleccionas los eventos que te interesan (o todos con *)
  3. SouthGames envia un POST a tu URL cuando ocurre un evento
  4. Tu servidor responde con un status 2xx

Formato del request

POST https://tu-servidor.com/webhooks/southgames
Content-Type: application/json
X-SouthGames-Signature: sha256=abc123...
X-SouthGames-Event: game.played
{
  "event": "game.played",
  "timestamp": "2025-01-15T10:30:00Z",
  "data": {
    "campaignId": "campaign_abc",
    "externalUserId": "user_123",
    "won": true
  }
}

Reintentos

Si tu servidor no responde con 2xx, SouthGames reintenta hasta 3 veces con backoff exponencial:

IntentoDelay
1Inmediato
2~2 segundos
3~4 segundos

Cada request tiene un timeout de 10 segundos.

Configuracion

  1. Ve a Configuracion > Webhooks en la consola
  2. Haz clic en "Crear webhook"
  3. Ingresa la URL y un secret
  4. Selecciona los eventos
  5. Guarda

El secret se usa para firmar los requests con HMAC-SHA256. Ver Verificacion.