---
title: "Receive FlashWins Events"
url: "https://help.flowsplay.world/en/article/flashwins-events"
language: "en"
last_updated: "2026-06-03T10:32:53.638Z"
---

# Receive FlashWins Events

To deliver real-time win notifications, your application can subscribe to our push event service using Server-Sent Events (SSE). This works the same way as Jackpots. Use these events to update your own widget the moment a prize is won, with no polling.

This applies when you run your own widget in API mode. The FlowsPlay widget handles events for you.

![](https://cdn-assets.productfruits.com/2705b301-8ffc-48ef-8cc3-92b20c8d3ed1)

## Overview

There are two kinds of channel:

-   **Broadcast channel:** general updates for a campaign, such as a notification that another player has won.
-   **Player channel:** a private notification sent to a single player when they win.

## Sequence overview

1.  Your widget opens an `EventSource` connection to each channel it needs.
2.  The platform pushes events to those channels in real-time as they happen.
3.  Your handler reads each message, checks the `reason` field, and updates the widget.

## Subscribing

Subscribe with a standard `EventSource` connection. The channel name is built from your workspace ID and the campaign or player ID:

```
Broadcast: https://push-events.flows.world/subscribe?channel=<WorkspaceId>_broadcast_<FlashWinGroupId>
Player:    https://push-events.flows.world/subscribe?channel=<WorkspaceId>_user_<PlayerId>
```

Broadcast channel:

```
const broadcastSource = new EventSource(
  "https://push-events.flows.world/subscribe?channel=<WorkspaceId>_broadcast_<FlashWinGroupId>"
);
broadcastSource.onmessage = (event) => {
  const data = JSON.parse(event.data);
  // update the widget or show that another player has won
};
```

Player channel:

```
const playerSource = new EventSource(
  "https://push-events.flows.world/subscribe?channel=<WorkspaceId>_user_<PlayerId>"
);
playerSource.onmessage = (event) => {
  const data = JSON.parse(event.data);
  if (data.reason === "flashwin_won") {
    // show your win screen using data.value and data.currency
  }
};
```

## Win event

When a player wins, the player channel carries a `flashwin_won` event with these fields:

| Field | Meaning |
| --- | --- |
| `reason` | The event type. For a win this is<br>`flashwin_won`<br>. |
| `flashwin` | The campaign the win belongs to. |
| `flashwinInstance` | The current campaign instance. |
| `flashwinNewInstance` | The next campaign instance. |
| `value` | The prize amount. |
| `currency` | The currency of the prize. |
| `channel` | The channel the event was sent on. |

```
{
  "reason": "flashwin_won",
  "flashwin": "Ab12Cd34",
  "flashwinInstance": "Ab12Cd34_7",
  "flashwinNewInstance": "Ab12Cd34_8",
  "channel": "<WorkspaceId>_user_<PlayerId>",
  "currency": "EUR",
  "value": "50.00"
}
```

## Broadcast events

The broadcast channel also carries general campaign events, such as a notification that another player has won. These follow the same model as Jackpots. The exact event names and example payloads are confirmed by the Flows team.

## Best practices

-   Open one connection per channel and reuse it. Reconnect if the connection drops.
-   Always check the `reason` field before acting, and ignore any event types you do not handle.

Use the events to show a win screen, update the remaining prize count, or trigger an animation. The prize itself is credited to the player automatically by the platform.

## Related topics

-   [API Integration](https://help.flowsplay.world/en/article/flashwins-api) - fetch campaign data and manage opt-in
