Integration recipes

Common patterns for wiring WOWsino into an existing operator stack.

Recipe 1 · Plug-in (keep your PAM)

You own the player accounts, real wallet, and game integration. WOWsino runs the engagement layer.

  1. On signup in your PAM, also POST /v1/players with your internal id as external_ref.
  2. On every settled wager, fire two events: a tournament/quest score (POST /v1/tournaments/<id>/score) and a jackpot contribution (POST /v1/jackpots/<id>/contribute) for whichever pools the game contributes to. Both are idempotent on source_wager_id.
  3. On first deposit, fire a journey event so welcome journeys advance: POST /v1/journeys/event { trigger: "first_deposit" }.
  4. Subscribe to bonus.granted, lootbox.opened, journey.completed webhooks. When you receive one, credit the player's WINZ in your own wallet (or just display the WINZ balance from WOWsino if you're using ours).
Time to first event: most plug-in customers are firing live events through to staging within 1-2 engineering days. Production switch-over is a feature-flag.

Recipe 2 · White-label (use our PAM)

WOWsino is your full operator backbone. You own licensing, PSP, KYC vendor, marketing.

  1. Onboard via your account manager. We provision a tenant with service_mode: white_label and configure your brand (logo, colors, copy, custom domain).
  2. Configure your PSP adapter (Nuvei / MiFinity / Trustly / your choice) — credentials go in our secrets store.
  3. Configure your KYC adapter (Sumsub / Onfido / Persona).
  4. Configure your game-aggregator adapter (Hub88 / Pragmatic / Relax).
  5. Your player site (built by us or by you) talks to /v1/* for everything: player register, deposit, withdraw, play, claim bonus, see VIP progress, etc.
  6. Your operator team uses the WOWsino admin under your subdomain.

Recipe 3 · Run a "Reload Friday" campaign

  1. Create the bonus template once via the operator admin: reload, 50% match, $200 cap, 25× wagering.
  2. Create a CRM segment: min_vip_level=2 AND last_deposit_at < now() - 7d.
  3. Create a campaign that grants the template to that segment.
  4. Execute the campaign (idempotent per execution id).
  5. Subscribe to bonus.granted webhooks to notify players via your email/SMS provider.

Recipe 4 · Add a daily lootbox to your VIP tier

  1. Operator admin: create a lootbox template (e.g. gold tier, $2.50 EV target, prize_table operator-defined or per-tier default).
  2. For each eligible player at midnight, your scheduler calls POST /v1/lootbox/<id>/open with a deterministic idempotency_key like daily-lb-2025-05-19-{playerId}.
  3. Webhook lootbox.opened fires for each open. Use it to push an in-app notification to the player.

Recipe 5 · Crash-recovery for wager pipeline

Your wager-settlement worker died mid-batch. On restart, re-fire every wager event from your queue with the same source_wager_id. Each WOWsino endpoint is idempotent on it: jackpot contributions, tournament scores, journey events all collapse cleanly. No double-credits, no skipped events.

Recipe 6 · Verify a webhook (Express.js)

import express from 'express';
import { createHmac, timingSafeEqual } from 'node:crypto';

const app = express();
const SECRET = process.env.WOWSINO_WEBHOOK_SECRET;

app.post('/webhooks/wowsino',
  express.raw({ type: 'application/json' }),
  (req, res) => {
    const sig = req.headers['x-wowsino-signature'];
    const raw = req.body.toString('utf8');
    const m = /^t=(\d+),v1=([0-9a-f]+)$/.exec(sig);
    if (!m) return res.status(400).end();
    if (Math.abs(Date.now()/1000 - Number(m[1])) > 300)
      return res.status(400).end();
    const expected = createHmac('sha256', SECRET).update(`${m[1]}.${raw}`).digest('hex');
    if (!timingSafeEqual(Buffer.from(m[2],'hex'), Buffer.from(expected,'hex')))
      return res.status(400).end();

    const event = JSON.parse(raw);
    // Process event by type
    handle(event);
    res.json({ ok: true });
  },
);