PAM IntegrationOutbound webhooks

Outbound webhooks

Webhooks are the outbound direction — PlaylogiQ calling your systems when something happens. They are optional and independent of the inbound event ingestion.

A PAM integration typically needs only inbound ingestion. Webhooks are for when you want PlaylogiQ to notify an external system (data warehouse, ops tooling, a BI pipeline) of platform-side events.

Configuring an endpoint

Settings → Webhooks → add an endpoint URL, a signing secret, and the events to subscribe to.

Delivery semantics

  • PlaylogiQ POSTs a JSON body to your endpoint.
  • Delivery is at-least-once with a persistent queue and exponential backoff on failure: retries at roughly 1m → 5m → 15m → 1h, up to 5 attempts, after which the delivery is marked failed.
  • Every attempt is recorded in a delivery log you can inspect in the dashboard (status, response code, timing).
  • A 2xx response marks the delivery successful; anything else (or a timeout, default 10s) reschedules it.

Verifying the signature

Each request carries an HMAC-SHA256 signature of the raw body, keyed by your endpoint’s secret:

X-PlaylogiQ-Signature: sha256=<hex>

Recompute and compare (constant-time) to authenticate the call:

import { createHmac, timingSafeEqual } from "node:crypto"
 
function verify(rawBody, header, secret) {
  const expected = "sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex")
  const a = Buffer.from(header)
  const b = Buffer.from(expected)
  return a.length === b.length && timingSafeEqual(a, b)
}

Always verify against the raw request body (before JSON parsing) — any re-serialization will change the bytes and break the signature.

Payload shape

{
  "event": "player.created",
  "payload": { "…": "event-specific data" }
}

The event field identifies the subscribed event; payload carries its data.

Event catalog

The events an endpoint can subscribe to today:

EventFires whenPayload
player.createdA player is created in the dashboard{ player_id, external_id }
player.updatedA player record is updatedplayer fields
player.status_changedA player’s status changes{ player_id, status, … }
segment.recomputedA segment’s membership is recomputed by the workersegment + membership summary
campaign.createdA campaign is created{ campaign_id, … }
bonus.grantedA bonus is granted to a playerbonus + player refs

This outbound catalog is intentionally small today — it covers platform-side lifecycle signals, not a mirror of the inbound event stream. It grows additively; new event names may be added over time. Subscribe only to the events you need. (Note these are platform events, distinct from the canonical player events the PAM sends in.)

No transactional callbacks to the PAM

By design, PlaylogiQ does not make synchronous, transactional calls back to a PAM (e.g. to grant a bonus in the wallet). The platform consumes the PAM’s event stream and drives CRM/gamification off it; it does not act as a controller of the PAM’s ledger. Webhooks are notifications, not commands.